Den::RSafeMessage Class Reference
class Den::RSafeMessage : public RMessage2
|
Supplementing
RMessage2
with additional methods for transferring handle ownership and completing with logging
Public Member Functions
|
|
RSafeMessage
()
|
|
~RSafeMessage
()
|
IMPORT_C void
|
Adopt
(
RSafeMessage
&)
|
IMPORT_C void
|
Complete
(
TInt
)
|
IMPORT_C void
|
Duplicate
(const
RSafeMessage
&)
|
IMPORT_C
TInt
|
GetDesMaxLengthL
(
TInt
)
|
IMPORT_C void
|
PanicClient
(const
TDesC
&,
TInt
)
|
IMPORT_C
TInt
|
Read
(
TInt
,
TDes8
&,
TInt
)
|
IMPORT_C
TInt
|
Read
(
TInt
,
TDes16
&,
TInt
)
|
IMPORT_C void
|
ReadL
(
TInt
,
TDes16
&,
TInt
)
|
IMPORT_C void
|
ReadL
(
TInt
,
TDes8
&,
TInt
)
|
IMPORT_C void
|
ResetHandle
()
|
IMPORT_C
TInt
|
Write
(
TInt
, const
TDesC8
&,
TInt
)
|
IMPORT_C
TInt
|
Write
(
TInt
, const
TPckg
<
TUint32
> &,
TInt
)
|
IMPORT_C
TInt
|
Write
(
TInt
, const
TDesC16
&,
TInt
)
|
IMPORT_C void
|
WriteL
(
TInt
, const
TDesC8
&,
TInt
)
|
IMPORT_C void
|
WriteL
(
TInt
, const
TPckg
<
TUint32
> &,
TInt
)
|
IMPORT_C void
|
WriteL
(
TInt
, const
TDesC16
&,
TInt
)
|
Constructor & Destructor Documentation
RSafeMessage()
RSafeMessage
|
(
|
)
|
[inline]
|
Only a default constructor is supported; safe messages get initialised by adopting their handle from another instance, by downcasting from a received
RMessage2
(ugly but safe since safe messages never add members or virtuals), or (rarely) by duplicating another instance, which diminishes safety.
RSafeMessage(const RMessage2 &)
~RSafeMessage()
IMPORT_C
|
~RSafeMessage
|
(
|
)
|
|
Because we strive to maintain a single owner for a message and to pass by reference when ownership it's generally an error for the handle to be set upon destruction.
Member Functions Documentation
Adopt(RSafeMessage &)
Take over a message. Beyond being a simple copy this resets the source's handle so that double-ownership is avoided
Complete(TInt)
IMPORT_C void
|
Complete
|
(
|
TInt
|
aReason
|
)
|
const
|
Complete the message with the given reason code, with detailed logging
Duplicate(const RSafeMessage &)
Duplicate a message, including aliasing the handle & so raising the risk of a double-complete
GetDesMaxLengthL(TInt)
IMPORT_C
TInt
|
GetDesMaxLengthL
|
(
|
TInt
|
aParam
|
)
|
const
|
PanicClient(const TDesC &, TInt)
IMPORT_C void
|
PanicClient
|
(
|
const
TDesC
&
|
aCategory,
|
|
TInt
|
aReason
|
|
)
|
const
|
Read(TInt, TDes8 &, TInt)
Perform a read and kill the client if it has supplied a bad descriptor
Read(TInt, TDes16 &, TInt)
ReadL(TInt, TDes16 &, TInt)
IMPORT_C void
|
ReadL
|
(
|
TInt
|
aSrcParamIndex,
|
|
TDes16
&
|
aDes,
|
|
TInt
|
anOffset = 0
|
|
)
|
const
|
Perform a read and kill the client if it has supplied a bad descriptor
ReadL(TInt, TDes8 &, TInt)
IMPORT_C void
|
ReadL
|
(
|
TInt
|
aSrcParamIndex,
|
|
TDes8
&
|
aDes,
|
|
TInt
|
anOffset = 0
|
|
)
|
const
|
ResetHandle()
IMPORT_C void
|
ResetHandle
|
(
|
)
|
|
Null the handle, so this safe message no longer references a client request. This is normally done automatically by completing or panicking the client or transferring message ownership, so this will seldom need to be called explicitly
Write(TInt, const TDesC8 &, TInt)
Perform a write and kill the client if it has supplied a bad descriptor
Write(TInt, const TPckg< TUint32 > &, TInt)
Perform a write and kill the client if it has supplied a bad descriptor
Write(TInt, const TDesC16 &, TInt)
WriteL(TInt, const TDesC8 &, TInt)
IMPORT_C void
|
WriteL
|
(
|
TInt
|
aDstParamIndex,
|
|
const
TDesC8
&
|
aDes,
|
|
TInt
|
anOffset = 0
|
|
)
|
const
|
Perform a write and kill the client if it has supplied a bad descriptor
WriteL(TInt, const TPckg< TUint32 > &, TInt)
IMPORT_C void
|
WriteL
|
(
|
TInt
|
aDstParamIndex,
|
|
const
TPckg
<
TUint32
> &
|
aDes,
|
|
TInt
|
anOffset = 0
|
|
)
|
const
|
Perform a write and kill the client if it has supplied a bad descriptor
WriteL(TInt, const TDesC16 &, TInt)
IMPORT_C void
|
WriteL
|
(
|
TInt
|
aDstParamIndex,
|
|
const
TDesC16
&
|
aDes,
|
|
TInt
|
anOffset = 0
|
|
)
|
const
|
Perform a write and kill the client if it has supplied a bad descriptor
operator=(const RSafeMessage &)
operator=(const RMessage2 &)
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.