|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Declares sending service interface for ECom plugins. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_SENDINGSERVICE_H |
|
20 #define C_SENDINGSERVICE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <badesca.h> |
|
24 #include <txtrich.h> |
|
25 |
|
26 class CSendingServiceInfo; |
|
27 class CMessageData; |
|
28 class CCoeEnv; |
|
29 class CSendUiSingleton; |
|
30 |
|
31 |
|
32 /** |
|
33 * Parameters for sending service construction. |
|
34 */ |
|
35 struct TSendingServiceParams |
|
36 { |
|
37 // Constructor |
|
38 TSendingServiceParams( CCoeEnv& aCoeEnv, CSendUiSingleton& aSingleton ) |
|
39 : iCoeEnv( aCoeEnv ), iSingleton( aSingleton ) {} |
|
40 // Data |
|
41 CCoeEnv& iCoeEnv; |
|
42 CSendUiSingleton& iSingleton; |
|
43 }; |
|
44 |
|
45 |
|
46 /** |
|
47 * Declares sending service interface for ECom plugins. |
|
48 * |
|
49 * CSendingService has to be implemented by each ECom based sending service. |
|
50 * CSendingService contains only pure virtual methods, which must be |
|
51 * implemented by sending services. |
|
52 * |
|
53 * @lib Sendui |
|
54 * @since S60 v3.0 |
|
55 */ |
|
56 class CSendingService : public CBase |
|
57 { |
|
58 public: // Constructors and destructor |
|
59 |
|
60 /** |
|
61 * Two-phased constructor. |
|
62 * |
|
63 * @param aImplementationUid The implementation UID of the |
|
64 * sending service to be created. |
|
65 * @return Pointer to object of CSendingService |
|
66 */ |
|
67 IMPORT_C static CSendingService* NewL( const TUid& aImplementationUid, CCoeEnv& aCoeEnv, CSendUiSingleton& aSingleton ); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 IMPORT_C virtual ~CSendingService(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * Populates given list with the provided services. Ownership of the |
|
78 * pointed services remains in the service provider plugin. |
|
79 * |
|
80 * @since Series 60 3.0 |
|
81 * @param aList Service list to be populated. |
|
82 * @return none |
|
83 */ |
|
84 virtual void PopulateServicesListL( |
|
85 RPointerArray<CSendingServiceInfo>& aList ) = 0; |
|
86 |
|
87 /** |
|
88 * Creates message to be sent and either sends it directly or calls |
|
89 * MTM to edit the message. |
|
90 * |
|
91 * @since Series 60 3.0 |
|
92 * @param aServiceUid Uid of the sending service. |
|
93 * @param aMessageData Data for the message. |
|
94 * @return none |
|
95 */ |
|
96 virtual void CreateAndSendMessageL( |
|
97 TUid aServiceUid, |
|
98 const CMessageData* aMessageData, |
|
99 TBool aLaunchEditorEmbedded = ETrue) = 0; |
|
100 |
|
101 /** |
|
102 * Return the Id of the service provider. |
|
103 * |
|
104 * @since Series 60 3.0 |
|
105 * @return Id of the service provider. |
|
106 */ |
|
107 virtual TUid ServiceProviderId() const = 0; |
|
108 |
|
109 protected: |
|
110 |
|
111 /** |
|
112 * C++ constructor |
|
113 */ |
|
114 IMPORT_C CSendingService( CCoeEnv& aCoeEnv, CSendUiSingleton& aSingleton ); |
|
115 |
|
116 private: // Data |
|
117 |
|
118 /** |
|
119 * Implementation UID of the sending service |
|
120 * Not own. |
|
121 */ |
|
122 TUid iDtor_ID_Key; |
|
123 |
|
124 protected: |
|
125 |
|
126 /** |
|
127 * Reference to CCoeEnv |
|
128 * Not own. |
|
129 */ |
|
130 CCoeEnv& iCoeEnv; |
|
131 |
|
132 /** |
|
133 * Pointer to CSendUiSingleton; |
|
134 * Not own. |
|
135 */ |
|
136 CSendUiSingleton& iSingleton; |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // C_SENDINGSERVICE_H |
|
141 |
|
142 // End of File |