Main Page Compound List File List Compound Members
tmTransaction Class Reference
#include <tmTransaction.h>
List of all members.
|
Public Member Functions |
nsresult | Init (PRUint32 aClientIPCID, const PRUint8 *aRawMessage, PRUint32 aLength) |
nsresult | Init (PRUint32 aClientIPCID, PRUint32 aID, PRUint32 aAction, nsresult aStatus) |
nsresult | Init (PRUint32 aClientIPCID, PRUint32 aID, PRUint32 aAction, nsresult aStatus, const PRUint8 *aMessage, PRUint32 aLength) |
const PRUint8 * | GetMessage () const |
PRUint32 | GetMessageLength () const |
PRUint32 | GetQueueID () const |
PRUint32 | GetAction () const |
nsresult | GetStatus () const |
PRUint8 * | GetRawMessage () const |
PRUint32 | GetRawMessageLength () const |
PRUint32 | GetOwnerID () const |
void | SetQueueID (PRUint32 aID) |
Protected Member Functions |
nsresult | SetMessage (const PRUint8 *aMessage, PRUint32 aLength) |
nsresult | SetRawMessage (const PRUint8 *aRawMessage, PRUint32 aLength) |
Protected Attributes |
tmMsg | mData |
PRUint8 * | mMessage |
PRUint32 | mMessageLength |
PRUint32 | mOwnerID |
Detailed Description
Data storage for the actual transaction being sent to different listeners. Contains a
tmMsg and a character string that is the actual message being sent to an application.
Member Function Documentation
PRUint32 tmTransaction::GetAction |
( |
|
) |
const [inline] |
|
|
- Returns:
- the action represented by this transaction
|
const PRUint8* tmTransaction::GetMessage |
( |
|
) |
const [inline] |
|
|
- Returns:
- a byte pointer to the message carried by this transaction
|
PRUint32 tmTransaction::GetMessageLength |
( |
|
) |
const [inline] |
|
|
- Returns:
- the length of the message carried by this transaction
|
PRUint32 tmTransaction::GetOwnerID |
( |
|
) |
const [inline] |
|
|
- Returns:
- the client ID (in IPC daemon terms) of the client who initiated the exchange that generated this transaction.
|
PRUint32 tmTransaction::GetQueueID |
( |
|
) |
const [inline] |
|
|
- Returns:
- the id of the destination or sending queue
|
PRUint8* tmTransaction::GetRawMessage |
( |
|
) |
const |
|
|
Creates a copy of both the mData and mMessage variables. Uses malloc to allocate memory. The caller must assume ownership of the allocated space.
- Returns:
- a pointer to the newly malloced memory containing the mData information followed immediately by the mMessage data.
|
PRUint32 tmTransaction::GetRawMessageLength |
( |
|
) |
const [inline] |
|
|
- Returns:
- the length of the flags (mData) and message combined
|
nsresult tmTransaction::GetStatus |
( |
|
) |
const [inline] |
|
|
- Returns:
- the success state, if applicable of the action leading up to this message
|
nsresult tmTransaction::Init |
( |
PRUint32 |
aClientIPCID, |
|
|
PRUint32 |
aID, |
|
|
PRUint32 |
aAction, |
|
|
nsresult |
aStatus, |
|
|
const PRUint8 * |
aMessage, |
|
|
PRUint32 |
aLength |
|
) |
|
|
|
Initializer for transactions that have tmMsg information and additional message information. An example is the attach_reply message that must pass back the name of the queue so the client side tmTransactionService can associate the name with the ID returned in the tmMsg.
- Postcondition:
- on failure of setting message, all data members are cleared
- Returns:
- success of setting the message in the transaction
|
nsresult tmTransaction::Init |
( |
PRUint32 |
aClientIPCID, |
|
|
PRUint32 |
aID, |
|
|
PRUint32 |
aAction, |
|
|
nsresult |
aStatus |
|
) |
|
|
|
Initializer for transactions with only tmMsg data to pass on. Examples include most replies, detach, flush...
- Returns:
- NS_OK
|
nsresult tmTransaction::Init |
( |
PRUint32 |
aClientIPCID, |
|
|
const PRUint8 * |
aRawMessage, |
|
|
PRUint32 |
aLength |
|
) |
|
|
|
Initializer to use when the tmMsg and the message information have already been combined. This initializer seperates the raw message into the tmMsg and the message.
Used by the tmIPCModule & tmTransactionService as they only receive a void* as data and not seperate tmMsg and possible message data
- Postcondition:
- on failure of setting message, all data members are cleared
- Returns:
- success of setting the message in the transaction
|
nsresult tmTransaction::SetMessage |
( |
const PRUint8 * |
aMessage, |
|
|
PRUint32 |
aLength |
|
) |
[protected] |
|
|
This sets the data member mMessage. Ownership of the pointer passed in is not taken. The message is copied into the transaction.
- Returns:
- NS_OK if everything was successful
NS_ERROR_INVALID_ARG if the pointer passed in was null
NS_ERROR_OUT_OF_MEMORY if allocation of space for the copy of the message fails.
|
void tmTransaction::SetQueueID |
( |
PRUint32 |
aID |
) |
[inline] |
|
|
- Returns:
- sets the ID of the destination or source queue
|
nsresult tmTransaction::SetRawMessage |
( |
const PRUint8 * |
aRawMessage, |
|
|
PRUint32 |
aLength |
|
) |
[protected] |
|
|
This sets the value mData and if additional data is present sets the value of the data member mMessage. Ownership of the pointer passed in is not taken. The message is copied into the transaction.
- Returns:
- NS_OK if everything was successful
NS_ERROR_INVALID_ARG if the pointer passed in was null
NS_ERROR_OUT_OF_MEMORY if allocation of space for the copy of the message fails.
|
The documentation for this class was generated from the following file:
Generated on Mon Feb 24 10:22:51 2003 for transaction manager by
1.3-rc3