|
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 the License "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 * @file |
|
16 * Device information client interface |
|
17 * @internalComponent |
|
18 * @released |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 #ifndef __DEVINFOSUPPORTCLIENT_H__ |
|
24 #define __DEVINFOSUPPORTCLIENT_H__ |
|
25 |
|
26 #include <e32std.h> |
|
27 |
|
28 namespace Swi |
|
29 { |
|
30 |
|
31 class CDeviceIdList; |
|
32 |
|
33 /** |
|
34 A handle to a server session which calls commdb and etelmm to |
|
35 retrieve the devices id(s) |
|
36 @internalComponent |
|
37 @released |
|
38 */ |
|
39 class RDeviceInfo : public RSessionBase |
|
40 { |
|
41 public: |
|
42 /** |
|
43 Construct the handle. |
|
44 */ |
|
45 IMPORT_C RDeviceInfo(); |
|
46 |
|
47 /** |
|
48 Connect to the server. |
|
49 @return KErrNone on success - error code on failure. |
|
50 */ |
|
51 IMPORT_C TInt Connect(); |
|
52 |
|
53 /** |
|
54 Close the connection to the server |
|
55 */ |
|
56 IMPORT_C void Close(); |
|
57 |
|
58 /** |
|
59 Get the list of device ids. Ownership is _not_ transferred. |
|
60 The pointer array and strings contained therein will be |
|
61 deallocated when the Close() method is called. The data returned |
|
62 will be valid until either the Close() or DeviceIdsL() |
|
63 methods are called. |
|
64 @return Reference to an array of device id heap descriptors. |
|
65 */ |
|
66 IMPORT_C const RPointerArray<HBufC>& DeviceIdsL(); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 Starts the server which carries out the requests |
|
72 */ |
|
73 TInt StartServer(); |
|
74 |
|
75 /** |
|
76 List of device ids unpacked from the server request. |
|
77 */ |
|
78 CDeviceIdList *iDeviceIdList; |
|
79 }; |
|
80 |
|
81 } // namespace Swi |
|
82 |
|
83 #endif // __DEVINFOSUPPORTCLIENT_H__ |