summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/services.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/net/opietooth/lib/services.h b/noncore/net/opietooth/lib/services.h
index 7cce5e1..02629e6 100644
--- a/noncore/net/opietooth/lib/services.h
+++ b/noncore/net/opietooth/lib/services.h
@@ -1,144 +1,145 @@
1 1
2#ifndef OpieToothServices_H 2#ifndef OpieToothServices_H
3#define OpieToothServices_H 3#define OpieToothServices_H
4 4
5#include <qmap.h> 5#include <qmap.h>
6#include <qvaluelist.h> 6#include <qvaluelist.h>
7 7
8namespace OpieTooth { 8namespace OpieTooth {
9 /** 9 /**
10 * Services lets shows you all available services 10 * Services lets shows you all available services
11 * on a remote device 11 * on a remote device
12 */ 12 */
13 class Services { 13 class Services {
14 14 public:
15 /** The profile descriptor 15 /** The profile descriptor
16 * 16 *
17 */ 17 */
18 class ProfileDescriptor{ 18 class ProfileDescriptor{
19 public: 19 public:
20 /** typedef */ 20 /** typedef */
21 typedef QValueList<ProfileDescriptor> ValueList; 21 typedef QValueList<ProfileDescriptor> ValueList;
22 /** c'tor for QValueList */ 22 /** c'tor for QValueList */
23 ProfileDescriptor(); 23 ProfileDescriptor();
24 /** 24 /**
25 * c'tor 25 * c'tor
26 * @param id The id or name ("Lan Access Using PPP") 26 * @param id The id or name ("Lan Access Using PPP")
27 * @param idInt The id as uint ( 0x1102 ) 27 * @param idInt The id as uint ( 0x1102 )
28 * @param version Version of the Profile ( 1 ) 28 * @param version Version of the Profile ( 1 )
29 */ 29 */
30 ProfileDescriptor(const QString &id, int idInt, int version ); 30 ProfileDescriptor(const QString &id, int idInt, int version );
31 /** 31 /**
32 * copy c'tor 32 * copy c'tor
33 */ 33 */
34 ProfileDescriptor(const ProfileDescriptor& ); 34 ProfileDescriptor(const ProfileDescriptor& );
35 /** 35 /**
36 * returns the id 36 * returns the id
37 */ 37 */
38 QString id()const; 38 QString id()const;
39 /** 39 /**
40 * sets the id 40 * sets the id
41 */ 41 */
42 void setId(const QString& id); 42 void setId(const QString& id);
43 43
44 /** 44 /**
45 * sets the int id 45 * sets the int id
46 */ 46 */
47 void setId(int ); 47 void setId(int );
48 /** 48 /**
49 * reutns the id as int 49 * reutns the id as int
50 */ 50 */
51 int idInt()const; 51 int idInt()const;
52 /** 52 /**
53 * returns the version 53 * returns the version
54 */ 54 */
55 int version()const; 55 int version()const;
56 /** 56 /**
57 * sets the Version 57 * sets the Version
58 */ 58 */
59 void setVersion(int version ); 59 void setVersion(int version );
60 /** 60 /**
61 * copy operator 61 * copy operator
62 */ 62 */
63 ProfileDescriptor &operator=( const ProfileDescriptor& ); 63 ProfileDescriptor &operator=( const ProfileDescriptor& );
64 /** 64 /**
65 * operator== 65 * operator==
66 */ 66 */
67// friend bool operator==(const ProfileDescriptor&, const ProfileDescriptor& ); 67// friend bool operator==(const ProfileDescriptor&, const ProfileDescriptor& );
68 private: 68 private:
69 QString m_id; 69 QString m_id;
70 int m_idInt; 70 int m_idInt;
71 int m_version; 71 int m_version;
72 }; 72 };
73 public:
73 /** 74 /**
74 * Protocol Descriptor 75 * Protocol Descriptor
75 */ 76 */
76 class ProtocolDescriptor { 77 class ProtocolDescriptor {
77 public: 78 public:
78 typedef QValueList<ProtocolDescriptor> ValueList; 79 typedef QValueList<ProtocolDescriptor> ValueList;
79 /** 80 /**
80 * c'tor 81 * c'tor
81 */ 82 */
82 ProtocolDescriptor(); 83 ProtocolDescriptor();
83 /** 84 /**
84 * name 85 * name
85 * number 86 * number
86 * channel/port 87 * channel/port
87 */ 88 */
88 ProtocolDescriptor(const QString&, int, int port = -1 ); // Q_UINT8 ? 89 ProtocolDescriptor(const QString&, int, int port = -1 ); // Q_UINT8 ?
89 ProtocolDescriptor(const ProtocolDescriptor& ); 90 ProtocolDescriptor(const ProtocolDescriptor& );
90 ~ProtocolDescriptor(); 91 ~ProtocolDescriptor();
91 QString name()const; 92 QString name()const;
92 void setName(const QString& ); 93 void setName(const QString& );
93 int id()const; 94 int id()const;
94 void setId(int ); 95 void setId(int );
95 int port()const; 96 int port()const;
96 void setPort(int ); 97 void setPort(int );
97 ProtocolDescriptor &operator=( const ProtocolDescriptor& ); 98 ProtocolDescriptor &operator=( const ProtocolDescriptor& );
98 //friend bool operator==( const ProtocolDescriptor&, 99 //friend bool operator==( const ProtocolDescriptor&,
99 // const ProtocolDescriptor& ); 100 // const ProtocolDescriptor& );
100 private: 101 private:
101 QString m_name; 102 QString m_name;
102 int m_number; 103 int m_number;
103 int m_channel; 104 int m_channel;
104 }; 105 };
105 106
106 public: 107 public:
107 typedef QValueList<Services> ValueList; 108 typedef QValueList<Services> ValueList;
108 Services(); 109 Services();
109 Services(const Services& service ); 110 Services(const Services& service );
110 ~Services(); 111 ~Services();
111 112
112 Services &operator=( const Services& ); 113 Services &operator=( const Services& );
113 friend bool operator==(const Services&, const Services& ); 114 friend bool operator==(const Services&, const Services& );
114 QString serviceName()const; 115 QString serviceName()const;
115 void setServiceName( const QString& service ); 116 void setServiceName( const QString& service );
116 117
117 int recHandle()const; 118 int recHandle()const;
118 void setRecHandle( int ); 119 void setRecHandle( int );
119 120
120 121
121 QMap<int, QString> classIdList()const; 122 QMap<int, QString> classIdList()const;
122 void insertClassId( int id, const QString& className ); 123 void insertClassId( int id, const QString& className );
123 void removeClassId( int id ); 124 void removeClassId( int id );
124 void clearClassId(); 125 void clearClassId();
125 126
126 void insertProtocolDescriptor(const ProtocolDescriptor& ); 127 void insertProtocolDescriptor(const ProtocolDescriptor& );
127 void clearProtocolDescriptorList(); 128 void clearProtocolDescriptorList();
128 void removeProtocolDescriptor( const ProtocolDescriptor& ); 129 void removeProtocolDescriptor( const ProtocolDescriptor& );
129 ProtocolDescriptor::ValueList protocolDescriptorList()const; 130 ProtocolDescriptor::ValueList protocolDescriptorList()const;
130 131
131 void insertProfileDescriptor( const ProfileDescriptor& ); 132 void insertProfileDescriptor( const ProfileDescriptor& );
132 void clearProfileDescriptorList(); 133 void clearProfileDescriptorList();
133 void removeProfileDescriptor(const ProfileDescriptor& ); 134 void removeProfileDescriptor(const ProfileDescriptor& );
134 ProfileDescriptor::ValueList profileDescriptor()const; 135 ProfileDescriptor::ValueList profileDescriptor()const;
135 136
136 private: 137 private:
137 QMap<int, QString> m_classIds; 138 QMap<int, QString> m_classIds;
138 QString m_name; 139 QString m_name;
139 int m_recHandle; 140 int m_recHandle;
140 QValueList<ProfileDescriptor> m_profiles; 141 QValueList<ProfileDescriptor> m_profiles;
141 QValueList<ProtocolDescriptor> m_protocols; 142 QValueList<ProtocolDescriptor> m_protocols;
142 }; 143 };
143}; 144};
144#endif 145#endif