|
1 /* |
|
2 * Copyright (c) 2008 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: s_vimpstengineavatarextention.h |
|
15 * |
|
16 */ |
|
17 #ifndef __CVIMPSTENGINEAVATAREXTENTION_H |
|
18 #define __CVIMPSTENGINEAVATAREXTENTION_H |
|
19 |
|
20 // INCLUDES |
|
21 #include <e32base.h> |
|
22 |
|
23 #include "mvimpstengineavatarextention.h" |
|
24 #include "TVIMPSTEnums.h" |
|
25 #include "mvimpstenginesessioncntxtobserver.h" |
|
26 #include "cvimpstengineimagehandler.h" |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CVIMPSTEngineRequestMapper; |
|
31 class MPresenceFeatures; |
|
32 class MXIMPContext; |
|
33 class MXIMPIdentity; |
|
34 |
|
35 |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * This Class implements the Contact Management Extention Feature |
|
40 * @lib vimpstengine.lib |
|
41 * @since S60 5.0 |
|
42 */ |
|
43 NONSHARABLE_CLASS( CVIMPSTEngineAvatarExtention ) : public CBase, |
|
44 public MVIMPSTEngineAvatarExtention, |
|
45 public MVIMPSTEngineSessionCntxtObserver |
|
46 |
|
47 { |
|
48 |
|
49 |
|
50 public: // Two-phased constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 * @param aFeatures - Presentity Group |
|
55 * @param aRequestMapper: Request Mapper for XIMP Events |
|
56 */ |
|
57 |
|
58 static CVIMPSTEngineAvatarExtention* NewL( |
|
59 TInt aServiceId, |
|
60 MPresenceFeatures& aFeatures, |
|
61 CVIMPSTEngineRequestMapper& aRequestMapper); |
|
62 /** |
|
63 * Two-phased constructor. |
|
64 * @param aFeatures - Presentity Group |
|
65 * @param aRequestMapper: Request Mapper for XIMP Events |
|
66 */ |
|
67 static CVIMPSTEngineAvatarExtention* NewLC( |
|
68 TInt aServiceId, |
|
69 MPresenceFeatures& aFeatures, |
|
70 CVIMPSTEngineRequestMapper& aRequestMapper); |
|
71 |
|
72 /** |
|
73 * C++ Destructor. |
|
74 */ |
|
75 virtual ~CVIMPSTEngineAvatarExtention(); |
|
76 |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * default constructor |
|
82 * @param aFeatures - Presentity Group |
|
83 * @param aRequestMapper: event observer to get the notifications of the events. |
|
84 */ |
|
85 CVIMPSTEngineAvatarExtention( |
|
86 TInt aServiceId, |
|
87 MPresenceFeatures& aFeatures, |
|
88 CVIMPSTEngineRequestMapper& aRequestMapper); |
|
89 |
|
90 |
|
91 |
|
92 public: // See MVIMPSTEngineAvatarExtention |
|
93 |
|
94 /** |
|
95 * See MVIMPSTEngineAvatarExtention |
|
96 */ |
|
97 TInt UpdateAvtarToServerL(const TDesC& aFilename , |
|
98 const TDesC8& aMimetype); |
|
99 |
|
100 |
|
101 private: |
|
102 /** |
|
103 * See MVIMPSTEngineSessionCntxtObserver |
|
104 */ |
|
105 void HandleSessionContextEventL( const MXIMPContext& aContext, |
|
106 const MXIMPBase& aEvent, |
|
107 TXimpOperation aXimpOperation = EVIMPSTXimpOperationNoOperation); |
|
108 |
|
109 public: // From MVIMPSTEngineExtentionFeatures |
|
110 |
|
111 /** |
|
112 * See MVIMPSTEngineExtentionFeatures |
|
113 */ |
|
114 TVIMPSTEnums::FeatureSupport IsSupported() const; |
|
115 |
|
116 |
|
117 /** |
|
118 * See MVIMPSTEngineExtentionFeatures |
|
119 */ |
|
120 TVIMPSTEnums::ExtentionType Type() const; |
|
121 |
|
122 /** |
|
123 * See MVIMPSTEngineExtentionFeatures |
|
124 */ |
|
125 void SetSupported(TVIMPSTEnums::FeatureSupport aSupported) ; |
|
126 |
|
127 |
|
128 private: |
|
129 // serivice id |
|
130 TInt iServiceId; |
|
131 |
|
132 // not own |
|
133 MPresenceFeatures& iFeatures; |
|
134 |
|
135 //doesnt own |
|
136 CVIMPSTEngineRequestMapper& iRequestMapper; |
|
137 |
|
138 //Whether the extention Feature Supported or not |
|
139 TVIMPSTEnums::FeatureSupport iSupported; |
|
140 |
|
141 //Result code from waited request |
|
142 TInt iReqResult; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif //__CVIMPSTENGINEAVATAREXTENTION_H |
|
147 |
|
148 // End of File |