|
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 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef CMTPDATACODEGENERATOR_H_ |
|
22 #define CMTPDATACODEGENERATOR_H_ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <mtp/mmtpdatacodegenerator.h> |
|
26 |
|
27 |
|
28 |
|
29 #include "mtpdebug.h" |
|
30 |
|
31 class RMTPFramework; |
|
32 |
|
33 |
|
34 class CMTPDataCodeGenerator : |
|
35 public CBase, |
|
36 public MMTPDataCodeGenerator |
|
37 { |
|
38 public: |
|
39 static CMTPDataCodeGenerator* NewL(); |
|
40 ~CMTPDataCodeGenerator(); |
|
41 |
|
42 public: // From MMTPDataCodeGenerator |
|
43 TInt AllocateServiceID(const TMTPTypeGuid& aPGUID, const TUint aServiceType, TUint& aServiceID ); |
|
44 TInt AllocateServicePropertyCode(const TMTPTypeGuid& aServicePGUID, const TMTPTypeGuid& aPKNamespace, const TUint aPKID, TUint16& aServicePropertyCode ); |
|
45 TInt AllocateServiceFormatCode(const TMTPTypeGuid& aServicePGUID, const TMTPTypeGuid& aGUID, TUint16& aServiceFormatCode); |
|
46 TInt AllocateServiceMethodFormatCode(const TMTPTypeGuid& aServicePGUID, const TMTPTypeGuid& aGUID, TUint16& aMethodFormatCode ); |
|
47 |
|
48 |
|
49 private: |
|
50 CMTPDataCodeGenerator(); |
|
51 void ConstructL(); |
|
52 TInt IncServiceIDResource( const TUint aServiceType, TUint& aServiceID ); |
|
53 void DecServiceIDResource(); |
|
54 TBool IsValidServiceType( const TUint aServiceType ) const; |
|
55 |
|
56 private: |
|
57 |
|
58 /** |
|
59 FLOGGER debug trace member variable. |
|
60 */ |
|
61 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
62 |
|
63 /** |
|
64 The framework singletons. |
|
65 */ |
|
66 RMTPFramework iSingletons; |
|
67 |
|
68 /* |
|
69 * Undefined Section.1 : 0x0000 --- 0x0FFF |
|
70 */ |
|
71 TUint16 iUndefinedNextCode; |
|
72 |
|
73 /* |
|
74 * Vendor Extension Object Format Code : 0xB000 --- 0xB7FF |
|
75 * (EMTPFormatCodeVendorExtStart -- EMTPFormatCodeVendorExtEnd) |
|
76 */ |
|
77 TUint16 iVendorExtFormatCode; |
|
78 |
|
79 }; |
|
80 |
|
81 #endif /* CMTPDATACODEGENERATOR_H_ */ |
|
82 |
|
83 |
|
84 |