|
1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #if (!defined __T_DATA_SDP_UTIL_H__ ) |
|
20 #define __T_DATA_SDP_UTIL_H__ |
|
21 |
|
22 // User includes |
|
23 #include "DataWrapperBase.h" |
|
24 |
|
25 // EPOC includes |
|
26 #include <btsdp.h> |
|
27 |
|
28 |
|
29 /** |
|
30 * Test Active Notification class |
|
31 * |
|
32 */ |
|
33 class CT_DataSdpUtil : public CDataWrapperBase |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Two phase constructor |
|
38 */ |
|
39 static CT_DataSdpUtil* NewL(); |
|
40 |
|
41 /** |
|
42 * Public destructor |
|
43 */ |
|
44 ~CT_DataSdpUtil(); |
|
45 |
|
46 /** |
|
47 * Process a command read from the ini file |
|
48 * |
|
49 * @param aCommand The command to process |
|
50 * @param aSection The section in the ini containing data for the command |
|
51 * @param aAsyncErrorIndex Command index for async calls to return errors to |
|
52 * |
|
53 * @return ETrue if the command is processed |
|
54 * |
|
55 * @leave System wide error |
|
56 */ |
|
57 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); |
|
58 |
|
59 /** |
|
60 * Return a pointer to the object that the data wraps |
|
61 * |
|
62 * @return pointer to the object that the data wraps |
|
63 */ |
|
64 virtual TAny* GetObject() { return NULL; } |
|
65 |
|
66 /** |
|
67 * Set the object that the data wraps |
|
68 * |
|
69 * @param aObject object that the wrapper is testing |
|
70 * |
|
71 */ |
|
72 virtual void SetObjectL(TAny* aAny); |
|
73 |
|
74 protected: |
|
75 /** |
|
76 * Protected constructor. First phase construction |
|
77 */ |
|
78 CT_DataSdpUtil(); |
|
79 |
|
80 /** |
|
81 * Second phase construction |
|
82 */ |
|
83 void ConstructL(); |
|
84 |
|
85 private: |
|
86 /** |
|
87 * Helper methods |
|
88 */ |
|
89 void DestroyData(); |
|
90 |
|
91 inline void DoCmdPutUint(const TDesC& aSection); |
|
92 inline void DoCmdGetUint(const TDesC& aSection); |
|
93 inline void DoCmdPutUint64(const TDesC& aSection); |
|
94 inline void DoCmdGetUint64(const TDesC& aSection); |
|
95 inline void DoCmdPutUint128(const TDesC& aSection); |
|
96 inline void DoCmdGetUint128(const TDesC& aSection); |
|
97 }; |
|
98 |
|
99 #endif /* __T_DATA_SDP_UTIL_H__*/ |