TIpcArgs Class Reference

class TIpcArgs

A Version 2 client/server class that clients use to package the arguments to be sent to a server.

The object can package up to 4 arguments together with information about each argument's type, width and accessibility; it is also possible for the package to contain zero arguments. In addition to the default constructor, the class has four templated constructors, allowing an object of this type to be constructed for 0, 1, 2, 3 or 4 arguments.

Internally, the arguments are stored in a simple TInt array. Consecutive arguments in a constructor's parameter list are put into consecutive slots in the array. The Set() overloaded functions can be used to set argument values into specific slots within this array.

Public Member Functions
TIpcArgs()
TIpcArgs(T0)
TIpcArgs(T0, T1)
TIpcArgs(T0, T1, T2)
TIpcArgs(T0, T1, T2, T3)
TIpcArgs &PinArgs(TBool, TBool, TBool, TBool)
voidSet(TInt, TNothing)
voidSet(TInt, TInt)
voidSet(TInt, const TAny *)
voidSet(TInt, RHandleBase)
voidSet(TInt, const TDesC8 *)
voidSet(TInt, const TDesC16 *)
voidSet(TInt, TDes8 *)
voidSet(TInt, TDes16 *)
Private Member Functions
voidAssign(TInt &, TNothing)
voidAssign(TInt &, TInt)
voidAssign(TInt &, const TAny *)
voidAssign(TInt &, RHandleBase)
voidAssign(TInt &, const TDesC8 *)
voidAssign(TInt &, const TDesC16 *)
voidAssign(TInt &, TDes8 *)
voidAssign(TInt &, TDes16 *)
TArgType Type(TNothing)
TArgType Type(TInt)
TArgType Type(const TAny *)
TArgType Type(RHandleBase)
TArgType Type(const TDesC8 *)
TArgType Type(const TDesC16 *)
TArgType Type(TDes8 *)
TArgType Type(TDes16 *)
Public Member Enumerations
enumanonymous {
KBitsPerType = 3, KPinArgShift = KBitsPerType*KMaxMessageArguments, KPinArg0 = 1<<(KPinArgShift+0), KPinArg1 = 1<<(KPinArgShift+1), KPinArg2 = 1<<(KPinArgShift+2), KPinArg3 = 1<<(KPinArgShift+3), KPinMask = 0xf<<KPinArgShift
}
enumTArgType {
EUnspecified = 0, EHandle = 1, EFlagDes = 4, EFlagConst = 2, EFlag16Bit = 1, EDes8 = EFlagDes, EDes16 = EFlagDes|EFlag16Bit, EDesC8 = EFlagDes|EFlagConst, EDesC16 = EFlagDes|EFlagConst|EFlag16Bit
}
enumTNothing { ENothing }
Public Attributes
TInt iArgs
TInt iFlags

Constructor & Destructor Documentation

TIpcArgs()

TIpcArgs()[inline]

Default constructor.

An argument package constructed using this constructor has no arguments; however, arguments can subsequently be set into this argument package object using the Set() member functions.

TIpcArgs(T0)

TIpcArgs(T0a0)[inline, explicit]

A templated constructor that constructs the argument package; it takes 1 argument.

Parameters

T0 a0An argument of general class type T0 to be contained by this object.

TIpcArgs(T0, T1)

TIpcArgs(T0a0,
T1a1
)[inline]

A templated constructor that constructs the argument package; it takes 2 arguments.

Parameters

T0 a0An argument of general class type T0 to be contained by this object.
T1 a1An argument of general class type T1 to be contained by this object.

TIpcArgs(T0, T1, T2)

TIpcArgs(T0a0,
T1a1,
T2a2
)[inline]

A templated constructor that constructs the argument package; it takes 3 arguments.

Parameters

T0 a0An argument of general class type T0 to be contained by this object.
T1 a1An argument of general class type T1 to be contained by this object.
T2 a2An argument of general class type T2 to be contained by this object.

TIpcArgs(T0, T1, T2, T3)

TIpcArgs(T0a0,
T1a1,
T2a2,
T3a3
)[inline]

A templated constructor that constructs the argument package; it takes 4 arguments.

Parameters

T0 a0An argument of general class type T0 to be contained by this object.
T1 a1An argument of general class type T1 to be contained by this object.
T2 a2An argument of general class type T2 to be contained by this object.
T3 a3An argument of general class type T3 to be contained by this object.

Member Functions Documentation

Assign(TInt &, TNothing)

voidAssign(TInt &,
TNothing
)[private, static, inline]

Parameters

TInt &
TNothing

Assign(TInt &, TInt)

voidAssign(TInt &aArg,
TIntaValue
)[private, static, inline]

Parameters

TInt & aArg
TInt aValue

Assign(TInt &, const TAny *)

voidAssign(TInt &aArg,
const TAny *aValue
)[private, static, inline]

Parameters

TInt & aArg
const TAny * aValue

Assign(TInt &, RHandleBase)

voidAssign(TInt &aArg,
RHandleBaseaValue
)[private, static, inline]

Parameters

TInt & aArg
RHandleBase aValue

Assign(TInt &, const TDesC8 *)

voidAssign(TInt &aArg,
const TDesC8 *aValue
)[private, static, inline]

Parameters

TInt & aArg
const TDesC8 * aValue

Assign(TInt &, const TDesC16 *)

voidAssign(TInt &aArg,
const TDesC16 *aValue
)[private, static, inline]

Parameters

TInt & aArg
const TDesC16 * aValue

Assign(TInt &, TDes8 *)

voidAssign(TInt &aArg,
TDes8 *aValue
)[private, static, inline]

Parameters

TInt & aArg
TDes8 * aValue

Assign(TInt &, TDes16 *)

voidAssign(TInt &aArg,
TDes16 *aValue
)[private, static, inline]

Parameters

TInt & aArg
TDes16 * aValue

PinArgs(TBool, TBool, TBool, TBool)

TIpcArgs &PinArgs(TBoolaPinArg0 = ETrue,
TBoolaPinArg1 = ETrue,
TBoolaPinArg2 = ETrue,
TBoolaPinArg3 = ETrue
)[inline]

Allows the client to specify whether each argument of the TIpcArgs object will be pinned before being sent to the server.

To pin all the arguments in the TIpcArgs object pass no parameters to this method.

A reference to this TIpcArgs object that can be passed as a parameter to one of the overloads the DSession::Send() and DSession::SendReceive() methods.

Parameters

TBool aPinArg0 = ETrue
TBool aPinArg1 = ETrue
TBool aPinArg2 = ETrue
TBool aPinArg3 = ETrue

Set(TInt, TNothing)

voidSet(TIntaIndex,
TNothing
)[inline]

Sets an argument to default value and type.

Parameters

TInt aIndex
TNothing

Set(TInt, TInt)

voidSet(TIntaIndex,
TIntaValue
)[inline]

Sets an argument value of TInt type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
TInt aValueThe argument value.

Set(TInt, const TAny *)

voidSet(TIntaIndex,
const TAny *aValue
)[inline]

Sets an argument value of TAny* type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
const TAny * aValueThe argument value.

Set(TInt, RHandleBase)

voidSet(TIntaIndex,
RHandleBaseaValue
)[inline]

Sets an argument value of RHandleBase type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
RHandleBase aValueThe argument value.

Set(TInt, const TDesC8 *)

voidSet(TIntaIndex,
const TDesC8 *aValue
)[inline]

Sets an argument value TDesC8* type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
const TDesC8 * aValueThe argument value.

Set(TInt, const TDesC16 *)

voidSet(TIntaIndex,
const TDesC16 *aValue
)[inline]

Sets an argument value of TDesC16* type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
const TDesC16 * aValueThe argument value.

Set(TInt, TDes8 *)

voidSet(TIntaIndex,
TDes8 *aValue
)[inline]

Sets an argument value of TDes8* type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
TDes8 * aValueThe argument value.

Set(TInt, TDes16 *)

voidSet(TIntaIndex,
TDes16 *aValue
)[inline]

Sets an argument value of TDes16* type.

Parameters

TInt aIndexAn index value that identifies the slot in the array of arguments into which the argument value is to be placed. This must be a value in the range 0 to 3.
TDes16 * aValueThe argument value.

Type(TNothing)

TArgType Type(TNothing)[private, static, inline]

Parameters

TNothing

Type(TInt)

TArgType Type(TInt)[private, static, inline]

Parameters

TInt

Type(const TAny *)

TArgType Type(const TAny *)[private, static, inline]

Parameters

const TAny *

Type(RHandleBase)

TArgType Type(RHandleBaseaValue)[private, static, inline]

Parameters

RHandleBase aValue

Type(const TDesC8 *)

TArgType Type(const TDesC8 *)[private, static, inline]

Parameters

const TDesC8 *

Type(const TDesC16 *)

TArgType Type(const TDesC16 *)[private, static, inline]

Parameters

const TDesC16 *

Type(TDes8 *)

TArgType Type(TDes8 *)[private, static, inline]

Parameters

TDes8 *

Type(TDes16 *)

TArgType Type(TDes16 *)[private, static, inline]

Parameters

TDes16 *

Member Enumerations Documentation

Enum anonymous

Enumerators

KBitsPerType = 3

Number of bits of type information used for each of the 4 arguments.

KPinArgShift = KBitsPerType*KMaxMessageArguments

Bit number of the start of the pin flags.

KPinArg0 = 1<<(KPinArgShift+0)

Set to pin argument at index 0.

KPinArg1 = 1<<(KPinArgShift+1)

Set to pin argument at index 1.

KPinArg2 = 1<<(KPinArgShift+2)

Set to pin argument at index 2.

KPinArg3 = 1<<(KPinArgShift+3)

Set to pin argument at index 3.

KPinMask = 0xf<<KPinArgShift

The bits used for the pinning attributes of each argument.

Enum TArgType

Argument types; some of these may be ORed together to specify type, accessibility, and width.

Enumerators

EUnspecified = 0

Type not specified.

EHandle = 1

Handle type.

EFlagDes = 4

Descriptor type.

EFlagConst = 2

Read only type.

EFlag16Bit = 1

16 bit rather than 8 bit.

EDes8 = EFlagDes

8 bit read/write descriptor.

EDes16 = EFlagDes|EFlag16Bit

16 bit read/write descriptor.

EDesC8 = EFlagDes|EFlagConst

8 bit read only descriptor.

EDesC16 = EFlagDes|EFlagConst|EFlag16Bit

16 bit read only descriptor.

Enum TNothing

Indicates a Null argument.

Enumerators

ENothing

An enum value that can be used to indicate an empty or unused argument to a server. For example:

                  TIpcArgs args(arg1, TIpcArgs::ENothing, arg2);

This argument will have an undefined value when the server receives the message.

Member Data Documentation

TInt iArgs

TInt iArgs

The location where the message arguments are stored.

There is no reason to access this data member directly and it should be considered as internal.

TInt iFlags

TInt iFlags

The location where the flag bits describing the argument types are stored.

The symbolic values describing the argument types are internal to Symbian, and there is therefore no reason to access this data member directly. It should be considered as internal.