32
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: CSrcsMessage definition
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef _SRCSMESSAGE_H
|
|
20 |
#define _SRCSMESSAGE_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
|
|
25 |
|
|
26 |
// CLASS DECLARATION
|
|
27 |
|
|
28 |
/**
|
|
29 |
* RMessage2 container class.
|
|
30 |
* Ties together client requests and helper objects dealing with them.
|
|
31 |
* Messages must be completed via this class.
|
|
32 |
*/
|
|
33 |
class CSrcsMessage : public CBase
|
|
34 |
{
|
|
35 |
public: // Constructors and destructor
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Two-phased constructor.
|
|
39 |
* @param aMessage the message to handled
|
|
40 |
*/
|
|
41 |
static CSrcsMessage* NewL( const RMessage2& aMessage );
|
|
42 |
|
|
43 |
/**
|
|
44 |
* Destructor.
|
|
45 |
*/
|
|
46 |
virtual ~CSrcsMessage();
|
|
47 |
|
|
48 |
public: // New functions
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Completes a message with given reason to client.
|
|
52 |
* @param aReason Reason value for complete.
|
|
53 |
* @return none
|
|
54 |
*/
|
|
55 |
void Complete( TInt aReason );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Returns RMessage2 reference to message.
|
|
59 |
* @return Reference to message
|
|
60 |
*/
|
|
61 |
const RMessage2& MessagePtr();
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Returns pointer which can be used to cancel request.
|
|
65 |
* @return Pointer to be used for cancellation
|
|
66 |
*/
|
|
67 |
const TAny* CancelPtr();
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Overload of comparison between CSrcsMessages
|
|
71 |
* @param aMessage Reference to another CSrcsMessage
|
|
72 |
* @return Boolean True = Messages are same
|
|
73 |
* False = Messaged differ.
|
|
74 |
*/
|
|
75 |
TBool operator==( CSrcsMessage& aMessage ) const;
|
|
76 |
|
|
77 |
private:
|
|
78 |
|
|
79 |
/**
|
|
80 |
* C++ default constructor.
|
|
81 |
*/
|
|
82 |
CSrcsMessage( const RMessage2& aMessage );
|
|
83 |
|
|
84 |
private: // Data
|
|
85 |
RMessage2 iMessagePtr; // The message to be completed
|
|
86 |
const TAny* iCancelPtr; // Address of the TRequestStatus of the client-side active object - used for cancelling purposes
|
|
87 |
|
|
88 |
};
|
|
89 |
|
|
90 |
#endif // SRCSMESSAGE_H
|
|
91 |
|
|
92 |
// End of File
|