class CASN1EncBase : public CBase |
Base class for all ASN.1 types that we can encode.
Public Member Functions | |
---|---|
~CASN1EncBase() | |
IMPORT_C TUint | LengthDER() |
void | SetParent(CASN1EncBase *) |
IMPORT_C void | SetTag(const TTagType, const TASN1Class) |
IMPORT_C void | WriteDERL(TDes8 &, TUint &) |
Protected Member Functions | |
---|---|
CASN1EncBase(const TTagType, const TASN1Class) | |
void | CalculateLengthLengthDER() |
IMPORT_C void | ConstructL() |
void | ContentsLengthChanged() |
Private Member Functions | |
---|---|
void | CalculateContentsLengthDER() |
void | CalculateTagLengthDER() |
TBool | IsConstructed() |
void | WriteContentsDERL(TDes8 &) |
void | WriteHelperL(TDes8 &, TUint &, const TUint, WriteFunc) |
void | WriteLengthDER(TDes8 &) |
void | WriteTagDERL(TDes8 &) |
Protected Attributes | |
---|---|
TUint | iContentsLengthDER |
TUint | iLengthLengthDER |
TUint | iTagLengthDER |
Private Attributes | |
---|---|
TASN1Class | iClass |
CASN1EncBase * | iParent |
TTagType | iType |
IMPORT_C | CASN1EncBase | ( | const TTagType | aType, |
const TASN1Class | aClass | |||
) | [protected] |
Protected constructor
const TTagType aType | Tag type of the new object |
const TASN1Class aClass | Tag class of the new object. |
void | CalculateContentsLengthDER | ( | ) | [private, pure virtual] |
Calculates number of octets in DER content encoding. Must set value of the appropriate data member.
void | CalculateLengthLengthDER | ( | ) | [protected] |
Calculates number of octets in DER length encoding. Must set value of the appropriate data member. Made protected because it is needed by CASN1EncEncoding class.
void | CalculateTagLengthDER | ( | ) | [private] |
Calculates number of octets in DER tag encoding. Must set value of the appropriate data member.
IMPORT_C void | ConstructL | ( | ) | [protected, virtual] |
Must call this version from derived classes in their ConstructL, but only once they're ready to have CalculateContentsLengthDER called on them.
void | ContentsLengthChanged | ( | ) | [protected] |
Derived classes must call this if the length of their contents changes after construction.
IMPORT_C TUint | LengthDER | ( | ) | const |
Gives total number of octets in the DER encoding of this object. Number of octets in DER encoding of this object.
void | SetParent | ( | CASN1EncBase * | aParent | ) |
Sets parent for the object
CASN1EncBase * aParent | Pointer to an ASN.1 object that becomes this object's parent. |
IMPORT_C void | SetTag | ( | const TTagType | aType, |
const TASN1Class | aClass = EContextSpecific | |||
) |
Sets tag type/class of the encoding object
const TTagType aType | Tag type to set |
const TASN1Class aClass = EContextSpecific | Tag class to set. |
void | WriteContentsDERL | ( | TDes8 & | aBuf | ) | const [private, pure virtual] |
Writes DER content encoding into supplied buffer, which is already verified to be big enough. Must be implemented by derived classes.
TDes8 & aBuf | Buffer to write to. |
IMPORT_C void | WriteDERL | ( | TDes8 & | aBuf, |
TUint & | aPos | |||
) | const |
Writes entire DER encoding of this object into the given buffer.
void | WriteHelperL | ( | TDes8 & | aBuf, |
TUint & | aPos, | |||
const TUint | aLength, | |||
WriteFunc | aWriteFunc | |||
) | const [private] |
Helper function, used for efficiency
void | WriteLengthDER | ( | TDes8 & | aBuf | ) | const [private, virtual] |
Writes DER length encoding into supplied buffer, which is already verified to be big enough.
TDes8 & aBuf | Buffer to write to. |
void | WriteTagDERL | ( | TDes8 & | aBuf | ) | const [private] |
Writes DER tag encoding into supplied buffer, which is already verified to be big enough.
TDes8 & aBuf | Buffer to write to. |
CASN1EncBase * | iParent | [private] |
The object owning this one (if we're held in a sequence, for example).