|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // mw/remoteconn/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpfullenumservicehandler.h |
|
15 // FullEnum Service Handler |
|
16 |
|
17 /** |
|
18 @file |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #ifndef __CMTPFULLENUMSERVICEHANDLER_H__ |
|
23 #define __CMTPFULLENUMSERVICEHANDLER_H__ |
|
24 |
|
25 #include <mtp/cmtptypeserviceproplist.h> |
|
26 #include <mtp/tmtptypeguid.h> |
|
27 #include <mtp/cmtptypeobjectpropdesc.h> |
|
28 |
|
29 #include "mtpdebug.h" |
|
30 #include "mmtpservicehandler.h" |
|
31 |
|
32 class CMTPTypeServiceInfo; |
|
33 class CMTPTypeServiceCapabilityList; |
|
34 class CMTPTypeDeleteServicePropList; |
|
35 class CMTPTypeServicePropDescList; |
|
36 class CRepository; |
|
37 class CMTPFullEnumDataCodeMgr; |
|
38 |
|
39 /** |
|
40 High level interface to MTP request processor |
|
41 @internalComponent |
|
42 */ |
|
43 class CMTPFullEnumServiceHandler: public CBase |
|
44 // , public MMTPServiceHandler |
|
45 { |
|
46 public: |
|
47 // Basic function |
|
48 static IMPORT_C CMTPFullEnumServiceHandler* NewL(MMTPDataProviderFramework& aFramework, |
|
49 const CMTPFullEnumDataCodeMgr& aDataCodeMgr, |
|
50 CRepository& aRepository, |
|
51 TUint aNormalServiceID, |
|
52 const TDesC& aKnowledgeObjectSUID, |
|
53 const TMTPTypeGuid& aServiceFormatGUID); |
|
54 IMPORT_C ~CMTPFullEnumServiceHandler(); |
|
55 |
|
56 // MMTPServiceHandler |
|
57 IMPORT_C TMTPResponseCode GetServiceCapabilityL(TUint16 aServiceFormatCode, CMTPTypeServiceCapabilityList& aServiceCapabilityList) const; |
|
58 IMPORT_C TMTPResponseCode GetServicePropDescL(TUint16 aServicePropertyCode, CMTPTypeServicePropDescList& aPropDescList) const; |
|
59 |
|
60 // FullEnum specific APIs |
|
61 IMPORT_C TMTPResponseCode GetServicePropetyL(TUint16 aPropertyCode, CMTPTypeServicePropList& aPropList) const; |
|
62 IMPORT_C TMTPResponseCode SetServicePropetyL(TUint16 aPropEnumIndex, const CMTPTypeServicePropListElement& aElement); |
|
63 IMPORT_C TMTPResponseCode DeleteServiceProperty(TUint16 aPropEnumIndex); |
|
64 |
|
65 private: |
|
66 // Property value of FullEnum Service need store in central repository |
|
67 enum TMTPServiceStoreKeyNum |
|
68 { |
|
69 EVersionProps = 0x1, // Version Props |
|
70 EReplicaID = 0x2, // Set by synchost at first sync, store in db. |
|
71 EKnowledgeObjectID = 0x3,// Use object handle which store in framework. |
|
72 ESyncFormat = 0x04, // Format GUID for the obj that is to be sync. |
|
73 ELocalOnlyDelete = 0x05, // Boolean, set by synchost. |
|
74 EFilterType = 0x06, // Set by synchost, device just store it. |
|
75 ELastSyncProxyID = 0x07, // a GUID indicating the last sync proxy to perform a sync operation |
|
76 ESyncObjectReference = 0x08, //Describing whether object references should be included as part of the sync process or not |
|
77 }; |
|
78 |
|
79 CMTPFullEnumServiceHandler(MMTPDataProviderFramework& aFramework, |
|
80 const CMTPFullEnumDataCodeMgr& aDataCodeMgr, |
|
81 CRepository& iRepository, |
|
82 TUint aNormalServiceID, |
|
83 const TDesC& aKnowledgeObjectSUID, |
|
84 const TMTPTypeGuid& aServiceFormatGUID); |
|
85 void ConstructL(); |
|
86 |
|
87 void LoadServicePropValueL(); |
|
88 |
|
89 private: |
|
90 MMTPDataProviderFramework& iFramework; |
|
91 const CMTPFullEnumDataCodeMgr& iDataCodeMgr; |
|
92 |
|
93 // Store service property |
|
94 CRepository& iRepository; |
|
95 |
|
96 // data from Normal Service |
|
97 TUint iNormalServiceID; |
|
98 TMTPTypeGuid iNormalServiceFormatGUID; |
|
99 const TDesC& iKnowledgeObjectSUID; |
|
100 |
|
101 //FullEnum Sync Service propterties which are writable |
|
102 TMTPTypeGuid iReplicateID; |
|
103 TMTPTypeGuid iLastSyncProxyID; |
|
104 TMTPSyncSvcLocalOnlyDelete iLocalOnlyDelete; |
|
105 TMTPSyncSvcSyncObjectReferences iSyncObjectReference; |
|
106 TMTPSyncSvcFilterType iFilterType; |
|
107 |
|
108 /** |
|
109 FLOGGER debug trace member variable. |
|
110 */ |
|
111 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
112 }; |
|
113 |
|
114 #endif // __CMTPFULLENUMSERVICEHANDLER_H__ |