TIpcArgs Class Reference

#include <e32cmn.h>

class TIpcArgs
Public Attributes
TInt iArgs
TInt iFlags
Public Member Enumerations
enumanonymous { KBitsPerType, KPinArgShift, KPinArg0, KPinArg1, ..., KPinMask }
enumTArgType { EUnspecified, EHandle, EFlagDes, EFlagConst, ..., EDesC16 }
enumTNothing { ENothing }
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 *)

Detailed Description

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.

Member Attribute Documentation

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.

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.

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
KBitsPerType3

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

KPinArgShiftKBitsPerType*KMaxMessageArguments

Bit number of the start of the pin flags.

KPinArg01<<(KPinArgShift+0)

Set to pin argument at index 0.

KPinArg11<<(KPinArgShift+1)

Set to pin argument at index 1.

KPinArg21<<(KPinArgShift+2)

Set to pin argument at index 2.

KPinArg31<<(KPinArgShift+3)

Set to pin argument at index 3.

KPinMask0xf<<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.

EnumeratorValueDescription
EUnspecified0

Type not specified.

EHandle1

Handle type.

EFlagDes4

Descriptor type.

EFlagConst2

Read only type.

EFlag16Bit1

16 bit rather than 8 bit.

EDes8EFlagDes

8 bit read/write descriptor.

EDes16EFlagDes|EFlag16Bit

16 bit read/write descriptor.

EDesC8EFlagDes|EFlagConst

8 bit read only descriptor.

EDesC16EFlagDes|EFlagConst|EFlag16Bit

16 bit read only descriptor.

Enum TNothing

Indicates a Null argument.

EnumeratorValueDescription
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.

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
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
a0An argument of general class type T0 to be contained by this object.
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
a0An argument of general class type T0 to be contained by this object.
a1An argument of general class type T1 to be contained by this object.
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
a0An argument of general class type T0 to be contained by this object.
a1An argument of general class type T1 to be contained by this object.
a2An argument of general class type T2 to be contained by this object.
a3An argument of general class type T3 to be contained by this object.

Member Function Documentation

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.

Return Value
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.

Set ( TInt, TNothing )

voidSet(TIntaIndex,
TNothing
)[inline]

Sets an argument to default value and type.

Set ( TInt, TInt )

voidSet(TIntaIndex,
TIntaValue
)[inline]

Sets an argument value of TInt type.

Parameters
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.
aValueThe argument value.

Set ( TInt, const TAny * )

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

Sets an argument value of TAny* type.

Parameters
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.
aValueThe argument value.

Set ( TInt, RHandleBase )

voidSet(TIntaIndex,
RHandleBaseaValue
)[inline]

Sets an argument value of RHandleBase type.

Parameters
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.
aValueThe argument value.

Set ( TInt, const TDesC8 * )

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

Sets an argument value TDesC8* type.

Parameters
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.
aValueThe argument value.

Set ( TInt, const TDesC16 * )

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

Sets an argument value of TDesC16* type.

Parameters
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.
aValueThe argument value.

Set ( TInt, TDes8 * )

voidSet(TIntaIndex,
TDes8 *aValue
)[inline]

Sets an argument value of TDes8* type.

Parameters
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.
aValueThe argument value.

Set ( TInt, TDes16 * )

voidSet(TIntaIndex,
TDes16 *aValue
)[inline]

Sets an argument value of TDes16* type.

Parameters
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.
aValueThe argument value.