author | Petteri Saari <petteri.saari@digia.com> |
Thu, 25 Nov 2010 13:59:42 +0200 | |
branch | MSRP_FrameWork |
changeset 58 | cdb720e67852 |
parent 25 | 505ad3f0ce5c |
permissions | -rw-r--r-- |
25
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
1 |
/* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
3 |
* All rights reserved. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html." |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
8 |
* Initial Contributors: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
9 |
* Nokia Corporation - initial contribution. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
10 |
* Contributors: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
11 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
12 |
* Description: |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
13 |
* MSRP Implementation |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
14 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
15 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
16 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
17 |
#ifndef CMSRPMESSAGEIDHEADER_H |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
18 |
#define CMSRPMESSAGEIDHEADER_H |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
19 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
20 |
// INCLUDES |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
21 |
#include "CMsrpHeaderBase.h" |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
22 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
23 |
// CLASS DECLARATION |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
24 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
25 |
* @publishedAll |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
26 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
27 |
* Class provides functions for setting and getting MSRP "Message-ID" header field |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
28 |
* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
29 |
* @lib msrpclient.lib |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
30 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
31 |
class CMSRPMessageIdHeader : public CMSRPHeaderBase |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
32 |
{ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
33 |
public: // Constructors and destructor |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
34 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
35 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
36 |
* Creates a new instance of CMSRMessageIdHeader |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
37 |
* @param aMessageId unique message identifier |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
38 |
* @return a new instance of CMSRPMessageIdHeader |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
39 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
40 |
IMPORT_C static CMSRPMessageIdHeader* NewL( const TDesC8& aMessageId ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
41 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
42 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
43 |
* Creates a new instance of CMSRPMessageIdHeader and puts it to CleanupStack |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
44 |
* @param aMessageId unique message identifier |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
45 |
* @return a new instance of CMSRPMessageIdHeader |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
46 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
47 |
IMPORT_C static CMSRPMessageIdHeader* NewLC( const TDesC8& aMessageId ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
48 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
49 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
50 |
* Creates a new instance of CMSRMessageIdHeader |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
51 |
* @return a new instance of CMSRPMessageIdHeader |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
52 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
53 |
static CMSRPMessageIdHeader* NewL( ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
54 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
55 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
56 |
* Destructor, deletes the resources of CMSRPMessageIdHeader. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
57 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
58 |
IMPORT_C ~CMSRPMessageIdHeader(); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
59 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
60 |
public: // New functions |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
61 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
62 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
63 |
* Constructs an instance of a CMSRPMessageIdHeader from a RReadStream |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
64 |
* @param aReadStream a stream containing the value of the |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
65 |
* externalized object (header name not included). |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
66 |
* @return an instance of a CMSRPMessageIdHeader |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
67 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
68 |
IMPORT_C static CMSRPMessageIdHeader* |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
69 |
InternalizeValueL( RReadStream& aReadStream ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
70 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
71 |
public: // From CMSRPHeaderBase |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
72 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
73 |
IMPORT_C void ExternalizeValueL( RWriteStream& aWriteStream ) const; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
74 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
75 |
protected: // From CMSRPHeaderBase |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
76 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
77 |
RStringF Name() const; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
78 |
HBufC8* ToTextValueL() const; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
79 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
80 |
private: // Constructors |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
81 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
82 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
83 |
* Constructor. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
84 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
85 |
CMSRPMessageIdHeader(); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
86 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
87 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
88 |
* Two-phased constructor. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
89 |
* @param aMessageId unique message identifier |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
90 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
91 |
void ConstructL( const TDesC8& aMessageId ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
92 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
93 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
94 |
* Two-phased constructor. |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
95 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
96 |
void ConstructL( ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
97 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
98 |
private: // new functions |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
99 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
100 |
/** |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
101 |
* Internalize external object data |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
102 |
* @param aReadStream a stream containing the value of the |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
103 |
* externalized object (header name not included). |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
104 |
*/ |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
105 |
void DoInternalizeValueL( RReadStream& aReadStream ); |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
106 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
107 |
private: // variables |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
108 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
109 |
// value as a string |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
110 |
HBufC8* iIdValue; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
111 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
112 |
}; |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
113 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
114 |
#endif // CMSRPMESSAGEIDHEADER_H |
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
115 |
|
505ad3f0ce5c
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff
changeset
|
116 |
// End of File |