|
1 /* |
|
2 * Copyright (c) 2010 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 * Wrapper for CM Manager Symbian interface. |
|
16 */ |
|
17 |
|
18 #ifndef CMMANAGER_SHIM_H |
|
19 #define CMMANAGER_SHIM_H |
|
20 |
|
21 // System includes |
|
22 |
|
23 #include <QString> |
|
24 #include <cmmanager.h> |
|
25 #include <cmmanagerdefines_shim.h> |
|
26 |
|
27 // User includes |
|
28 |
|
29 // Forward declarations |
|
30 |
|
31 class CmDestinationShim; |
|
32 class CmManagerShimPrivate; |
|
33 class CmConnectionMethodShim; |
|
34 |
|
35 // External data types |
|
36 |
|
37 // Constants |
|
38 |
|
39 // Class declaration |
|
40 |
|
41 /*! |
|
42 \class CmManagerShim |
|
43 \brief Implementation class for CM Manager Shim. |
|
44 |
|
45 Wrapper for CM Manager Symbian interface. |
|
46 |
|
47 NOTE! This shim is supposed to be used only in middleware code. Usage |
|
48 must be agreed with ipconnmgmt package owner. Applications should use |
|
49 the Qt Bearer Management API instead. |
|
50 */ |
|
51 |
|
52 class CONNECTIONSETTINGSSHIMDLL_EXPORT CmManagerShim |
|
53 { |
|
54 |
|
55 public: |
|
56 |
|
57 // Data types |
|
58 |
|
59 /*! |
|
60 * Constructor. |
|
61 */ |
|
62 CmManagerShim(); |
|
63 |
|
64 /*! |
|
65 * Destructor. |
|
66 */ |
|
67 ~CmManagerShim(); |
|
68 |
|
69 /*! |
|
70 * Creates a Destination with the passed name. |
|
71 * |
|
72 * @param[in] name The name of the new destination. |
|
73 * @return New destination. Ownership is passed to the caller. |
|
74 */ |
|
75 CmDestinationShim *createDestination(QString name); |
|
76 |
|
77 /*! |
|
78 * Creates a connection method that does not belong to any destination. |
|
79 * |
|
80 * @param[in] bearerType Bearer type of the new connection method. Types |
|
81 * are defined in cmmanagerdefines_shim.h. |
|
82 * @return New connection method. Ownership is passed to the caller. |
|
83 */ |
|
84 CmConnectionMethodShim *createConnectionMethod(uint bearerType); |
|
85 |
|
86 /*! |
|
87 * Returns the connection method queried by its ID. |
|
88 * |
|
89 * @param[in] connectionMethodId Id of the connection method. |
|
90 * @return Found connection method instance. |
|
91 */ |
|
92 CmConnectionMethodShim *connectionMethod(uint connectionMethodId) const; |
|
93 |
|
94 /*! |
|
95 * Returns the list of connection methods that do not belong to any |
|
96 * destination. |
|
97 * |
|
98 * @param[out] cmArray On return it is the array of connection method ids. |
|
99 * @param[in] legacyOnly When set to true only Legacy connection method |
|
100 * ids (connection methods which do not belong to |
|
101 * any destination) will be returned |
|
102 */ |
|
103 void connectionMethod( |
|
104 QList<uint> &cmArray, |
|
105 bool legacyOnly = true) const; |
|
106 |
|
107 /*! |
|
108 * Returns the destination queried by its ID. |
|
109 * |
|
110 * @param[in] destinationId Id of the destination. |
|
111 * @return Found network destination. |
|
112 */ |
|
113 CmDestinationShim *destination(uint destinationId) const; |
|
114 |
|
115 /*! |
|
116 * Returns an array of all destination id's. |
|
117 * |
|
118 * @param[out] destArray Array of all available network destinations. |
|
119 */ |
|
120 void allDestinations(QList<uint> &destArray) const; |
|
121 |
|
122 protected: |
|
123 |
|
124 private: |
|
125 |
|
126 private: // data |
|
127 |
|
128 CmManagerShimPrivate *d_ptr; //!< Private implementation |
|
129 }; |
|
130 |
|
131 #endif /* CMMANAGER_SHIM_H */ |