|
1 /* |
|
2 * Copyright (c) 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: This is the ObexServiceManager ecom plugin class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef OBEXSERVICEMANPLUGIN_H |
|
20 #define OBEXSERVICEMANPLUGIN_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include <locodserviceplugin.h> |
|
25 #include <locodservicepluginparams.h> |
|
26 #include <locodbearer.h> |
|
27 |
|
28 |
|
29 #include "obexsmclient.h" |
|
30 |
|
31 |
|
32 class CObexSMRequester; |
|
33 class RObexSMServer; |
|
34 |
|
35 class MObexSMRequestObserver |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Tell service plugin that request has been completed. |
|
40 * |
|
41 * @since S60 v3.2 |
|
42 * @param aBearer a Request to be completed |
|
43 * @param aError Error code |
|
44 */ |
|
45 virtual void RequestComplete(CObexSMRequester* aRequest, TInt err) = 0; |
|
46 |
|
47 /** |
|
48 * Get Obexservicemanager server interface |
|
49 * |
|
50 * @since S60 v3.2 |
|
51 * @return Client handle. |
|
52 */ |
|
53 virtual RObexSMServer& GetServer()=0; |
|
54 |
|
55 }; |
|
56 |
|
57 |
|
58 |
|
59 /** |
|
60 * ObexServiceManPlugin class |
|
61 * |
|
62 * This is the ObexServiceMan ecom plugin class |
|
63 * @lib ?library |
|
64 * @since S60 v3.2 |
|
65 */ |
|
66 class CObexSMPlugin : public CLocodServicePlugin, public MObexSMRequestObserver |
|
67 { |
|
68 public: |
|
69 |
|
70 /** |
|
71 * Two-phased constructor. |
|
72 * @param aParams the LocodServicePluginParams |
|
73 */ |
|
74 static CObexSMPlugin* NewL(TLocodServicePluginParams& aParams); |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 ~CObexSMPlugin(); |
|
80 |
|
81 /** |
|
82 * Tell service plugin which service should be enabled or disabled according to |
|
83 * specified bearer and its status. |
|
84 * @since S60 v3.2 |
|
85 * @param aBearer the bearer identification |
|
86 * @param aStatus the status of this bearer, ETrue if it is available; |
|
87 * EFalse otherwise. |
|
88 */ |
|
89 void ManageService(TLocodBearer aBearer, TBool aStatus); |
|
90 |
|
91 /** |
|
92 * Tell service plugin that request has been completed. |
|
93 * @since S60 v3.2 |
|
94 * @param aRequest the Request to be completed. |
|
95 * @param aError Error code |
|
96 */ |
|
97 void RequestComplete(CObexSMRequester* aRequest, TInt aError); |
|
98 |
|
99 /** |
|
100 * Get Obexservicemanager server interface |
|
101 * @since S60 v3.2 |
|
102 * @return Client handle. |
|
103 */ |
|
104 RObexSMServer& GetServer(); |
|
105 |
|
106 private: |
|
107 |
|
108 CObexSMPlugin(TLocodServicePluginParams& aParams); |
|
109 void ConstructL(); |
|
110 |
|
111 private: // data |
|
112 RObexSMServer iObexSMServer; |
|
113 RPointerArray<CObexSMRequester> iRequests; |
|
114 }; |
|
115 |
|
116 |
|
117 |
|
118 #endif // OBEXSERVICEMANPLUGIN_H |