|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 */ |
|
20 |
|
21 #ifndef MMTPDATACODEGENERATOR_H_ |
|
22 #define MMTPDATACODEGENERATOR_H_ |
|
23 |
|
24 #include <e32def.h> |
|
25 #include <mtp/tmtptypeguid.h> |
|
26 |
|
27 class TMTPTypeGuid; |
|
28 |
|
29 /** |
|
30 Defines the MTP data provider framework datacode generator |
|
31 interface. |
|
32 */ |
|
33 class MMTPDataCodeGenerator |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 Generate one ServiceID . |
|
39 @param aPGUID The GUID of Service. |
|
40 @param aServiceType service type (normal or abstract). |
|
41 @param aServiceID the service id that is allocated. |
|
42 @return System wide error code. KErrNone, if successful. |
|
43 */ |
|
44 virtual TInt AllocateServiceID( const TMTPTypeGuid& aPGUID, const TUint aServiceType, TUint& aServiceID ) = 0; |
|
45 |
|
46 /** |
|
47 Generate one service property code . |
|
48 @param aServicePGUID The service GUID . |
|
49 @param aPKNamespace The GUID of PKey Namespace |
|
50 @param aPKID The PKey ID of service property |
|
51 @param aServicePropertyCode The service property code that is allocated. |
|
52 @return System wide error code. KErrNone if successful. |
|
53 */ |
|
54 virtual TInt AllocateServicePropertyCode( const TMTPTypeGuid& aServicePGUID, const TMTPTypeGuid& aPKNamespace, const TUint aPKID, TUint16& aServicePropertyCode ) = 0; |
|
55 |
|
56 /** |
|
57 Generate one service format code. |
|
58 @param aServicePGUID The service GUID . |
|
59 @param aGUID The GUID of service format |
|
60 @param aServiceFormatCode The service format code that is allocated. |
|
61 @return System wide error code. KErrNone if successful. |
|
62 */ |
|
63 virtual TInt AllocateServiceFormatCode( const TMTPTypeGuid& aServicePGUID, const TMTPTypeGuid& aGUID, TUint16& aServiceFormatCode ) = 0; |
|
64 |
|
65 /** |
|
66 Generate one service method code . |
|
67 @param aServicePGUID The service GUID . |
|
68 @param aGUID The GUID of method |
|
69 @param aMethodFormatCode The method format code that is allocated. |
|
70 @return System wide error code. KErrNone if successful. |
|
71 */ |
|
72 virtual TInt AllocateServiceMethodFormatCode( const TMTPTypeGuid& aServicePGUID, const TMTPTypeGuid& aGUID, TUint16& aMethodFormatCode ) = 0; |
|
73 |
|
74 }; |
|
75 |
|
76 |
|
77 |
|
78 #endif /* MMTPDATACODEGENERATOR_H_ */ |