Public Member Type Definitions | |
---|---|
typedef | void(* TCustomValidationFn |
typedef | CMessageParameterBase *(* TMessageParameterFactoryFn |
Public Attributes | |
---|---|
const TInt | KClientMessageVersion |
const TInt | KErrBadMessageSchema |
const TInt | KErrBadParameter |
const TInt | KErrInvalidFunction |
const TInt | KErrNotInitialised |
const TInt | KErrNotValidated |
const TInt | KErrWrongParameterType |
const TInt | KMaxParameters |
const TParameterDetails | KNoParams |
const TInt | KParamTypeMask |
const TInt | KShift16Bit |
const TInt | KValidationFnIndexMask |
Public Member Enumerations | |
---|---|
enum | anonymous { ECMPanicWrongParameterType, ECMPanicBadDescriptor, ECMPanicBadMessageSchema } |
enum | TFlagValues { EFlagParam0Validated, EFlagParam1Validated, EFlagParam2Validated, EFlagParam3Validated, ..., EFlagLogBadMessages } |
enum | TParamType { EParamNull, EParamInt, EParamDes8Read, EParamDes8, ..., EParamPtr } |
enum | TServerFlags { ESrvFlagNone, ESrvFlagDoNotPanicClientOnBadMessageErrors, ESrvFlagLogBadMessages } |
Public Member Functions | |
---|---|
NONSHARABLE_CLASS(CClientMessage) | |
NONSHARABLE_CLASS(CDes16Parameter) | |
NONSHARABLE_CLASS(CDes16ReadParameter) | |
NONSHARABLE_CLASS(CDes8Parameter) | |
NONSHARABLE_CLASS(CDes8ReadParameter) | |
NONSHARABLE_CLASS(CIntParameter) | |
NONSHARABLE_CLASS(CMessageParameterBase) | |
NONSHARABLE_CLASS(CPckgParameter) | |
NONSHARABLE_CLASS(CPtrParameter) |
typedef void(* | TCustomValidationFn |
This typedef is used to simplify the declaration of custom parameter validation functions
typedef CMessageParameterBase *(* | TMessageParameterFactoryFn |
This typedef is used to simplify the declaration of the message schema table defined by the server.
const TInt | KErrBadMessageSchema |
Returned to caller in UREL mode when a message is found to be incorrectly defined in the message schema.
const TInt | KErrBadParameter |
Returned to caller if a message is passed in containing a non-descriptor parameter which doesn't meet the constraints specified in the schema
const TInt | KErrInvalidFunction |
Returned to caller to indicate that the requested message number is not supported by the current server
const TInt | KErrNotInitialised |
Returned to caller to indicate that the ClientMessage framework has not yet been initialised
const TInt | KErrNotValidated |
Returned to caller to indicate that the requested parameter has not yet been validated
const TInt | KErrWrongParameterType |
Returned to caller in UREL mode when the server attempts to call a CMessageParameterBase function which is not defined for the given parameter type. E.g. calling GetIntL() on a Descriptor parameter.
const TInt | KMaxParameters |
This defines the maximum number of parameters that can be stored in a TClientMessageSchema structure. This corresponds to the maximum number of arguments in an RMessage2
const TParameterDetails | KNoParams |
This TParameterDetails structure is used to represent a message with no parameters. This is required as the schema expects a const TParameterDetails*.
const TInt | KParamTypeMask |
This mask is used to select the parameter type from TParameterDetails.iType
const TInt | KShift16Bit |
This is used to shift down the value masked using KValidationFnIndexMask
const TInt | KValidationFnIndexMask |
This mask is used to select the validation function index from TParameterDetails.iType
This is the list of Panic codes used by the ClientMessage framework
Enumerator | Value | Description |
---|---|---|
ECMPanicWrongParameterType | 0 |
This panic is raised in UDEB mode when the server attempts to call a CMessageParameterBase function which is not defined for the given parameter type. E.g. calling GetIntL() on a Descriptor parameter. |
ECMPanicBadDescriptor |
This panic is raised when the server attempts to read from a descriptor in the clients process and supplies a target descriptor that is smaller than the client descriptor. | |
ECMPanicBadMessageSchema |
This panic is raised when a TParameterDetails structure for a given parameter is incorrectly defined in the message schema |
This enum lists the flags currently represented by the TBitFlags32 CClientMessage::iFlags
This Enum lists the currently supported Parameter types. These enum values are used as indices to the Parameter Factory Function which instantiates the appropriate CMessageParammeterBase derived object to represent a given message parameter.
This enum lists the currently supported flags that can be passed to the server in TClientMessageServerData::iFlags. Note that internally this value is stored in a TBitFlags32 type but this type cannot be statically initialised in a dll so the value is passed to the framework in a TInt. The bottom 16 bit flags are reserved for the framework's internal use.
NONSHARABLE_CLASS | ( | CClientMessage | ) |
This class is used by a server to sanitise incoming messages. The class provides a wrapper around an RMessage2 object and provides a method for validation of the message against the constraints defined in the message schema. This class also provides methods for safely accessing the message arguments, and for error handling and logging of bad messages. This class is not intended for derivation.
NONSHARABLE_CLASS | ( | CDes16Parameter | ) |
This class implements the behaviour for a read 16 bit descriptor parameter type. The ValidateL function checks that the MaxLength of the descriptor in the client s process is not less than iMin and that the length of the descriptor does not exceed iMax defined in the message schema.
NONSHARABLE_CLASS | ( | CDes16ReadParameter | ) |
This class implements the behaviour for a read only 16 bit descriptor parameter type. The ValidateL function checks that the length of the descriptor argument in the client s process does not exceed iMax defined in the message schema.
NONSHARABLE_CLASS | ( | CDes8Parameter | ) |
This class implements the behaviour for a read 8 bit descriptor parameter type. The ValidateL function checks that the MaxLength of the descriptor in the client s process is not less than iMin and that the length of the descriptor does not exceed iMax defined in the message schema.
NONSHARABLE_CLASS | ( | CDes8ReadParameter | ) |
This class implements the behaviour for a read only 8 bit descriptor parameter type. The ValidateL function checks that the length of the descriptor argument in the client s process does not exceed iMax defined in the message schema.
NONSHARABLE_CLASS | ( | CIntParameter | ) |
This class implements the behaviour for a TInt parameter type. The ValidateL function reads the Int value from the clients message and checks that the value read is between the iMax and iMin constraints defined in the message schema.
NONSHARABLE_CLASS | ( | CMessageParameterBase | ) |
This is the abstract base class for all message parameter classes. The class defines one pure virtual function, ValidateL, which all derived classes must implement. This class also defines default implementation for the access methods which should be properly defined in all derived classes. This class is not intended for external derivation.
NONSHARABLE_CLASS | ( | CPckgParameter | ) |
This class implements the behaviour for a generic TPckg<> parameter type. The ValidateL function calls the custom validation function passed in to the object on creation.
NONSHARABLE_CLASS | ( | CPtrParameter | ) |
This class implements the behaviour for a Ptr parameter type. The ValidateL function reads the TAny* from the clients message and stores it for retrieval.