|
1 // Copyright (c) 2006-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/mmtpservicedataprovider.h |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef __MMTPSERVICEDATAPROVIDER_H__ |
|
22 #define __MMTPSERVICEDATAPROVIDER_H__ |
|
23 |
|
24 #include <mtp/mtpprotocolconstants.h> |
|
25 |
|
26 class MMTPSvcObjectHandler; |
|
27 class MMTPServiceHandler; |
|
28 class CMTPTypeStorageInfo; |
|
29 |
|
30 class MMTPServiceDataProvider |
|
31 { |
|
32 public: |
|
33 /** |
|
34 Get object handler pointer for request processor. |
|
35 @param aFormatCode Format code which owned by the returned object handler. |
|
36 @return MMTPSvcObjectHandler* object handler's pointer. If the pointer is |
|
37 NULL, then means the input format code is not supported by the data provider. |
|
38 */ |
|
39 virtual MMTPSvcObjectHandler* ObjectHandler(TUint16 aFormatCode) const = 0; |
|
40 /** |
|
41 Get service handler pointer for request processor. |
|
42 @return MMTPServiceHandler* service handler's pointer. If the pointer is |
|
43 NULL, then means data provider doesn't support service extension. |
|
44 */ |
|
45 IMPORT_C virtual MMTPServiceHandler* ServiceHandler() const; |
|
46 /** |
|
47 Check if a service property code is valid. |
|
48 @param aPropCode A service property code need to be checked. |
|
49 @return TBool ETrue is valid. |
|
50 */ |
|
51 IMPORT_C virtual TBool IsValidServicePropCodeL(TUint16 aPropCode) const; |
|
52 /** |
|
53 Check if a format code is valid. |
|
54 @param aFormatCode A format code need to be checked data provider. |
|
55 @return TBool ETrue is valid. |
|
56 */ |
|
57 virtual TBool IsValidFormatCodeL(TUint16 aFormatCode) const = 0; |
|
58 /** |
|
59 Check if a object property code is valid. |
|
60 @param aFormatCode A format code which the property code belong to. |
|
61 @param aPropCode A object property code need to be checked. |
|
62 @return TBool ETrue is valid. |
|
63 */ |
|
64 virtual TBool IsValidObjectPropCodeL(TUint16 aFormatCode, TUint16 aPropCode) const = 0; |
|
65 /** |
|
66 Get service id owned by a data provider. |
|
67 @return TUint32 Service id. |
|
68 */ |
|
69 IMPORT_C virtual TUint32 ServiceID() const; |
|
70 /** |
|
71 Get storage id owned by a data provider. |
|
72 @return TUint32 Storage id. |
|
73 */ |
|
74 virtual TUint32 StorageId() const = 0; |
|
75 /** |
|
76 Get the AO's granularity for delete all objects and get object proper list. |
|
77 @return TUint32 Operation granularity, normally the value is 50. |
|
78 */ |
|
79 IMPORT_C virtual TUint32 OperationGranularity() const; |
|
80 /** |
|
81 Dispatch GetStorageInfo to data provider |
|
82 @param aStorageInfo StorageInfo dataset. |
|
83 @return See MTP response code definition |
|
84 @leave One of the system wide error codes, if a general processing error |
|
85 */ |
|
86 virtual TMTPResponseCode GetStorageInfoL(CMTPTypeStorageInfo& aStorageInfo) const = 0; |
|
87 }; |
|
88 |
|
89 #endif // __MMTPSERVICEDATAPROVIDER_H__ |