Version 0.7-0
[vicar] / src / vicar-telepathy / cpp / connectionmanager.h
1 /*
2 @version: 0.6
3 @author: Sudheer K. <scifi1947 at gmail.com>
4 @license: GNU General Public License
5
6 Based on Telepathy-SNOM with copyright notice below.
7 */
8
9 /*
10  * Telepathy SNOM VoIP phone connection manager
11  * Copyright (C) 2006 by basyskom GmbH
12  *  @author Tobias Hunger <info@basyskom.de>
13  *
14  * This library is free software; you can redisQObject::tribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License version 2.1 as published by the Free Software Foundation.
17  *
18  * This library is disQObject::tributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the
25  * Free Software Foundation, Inc.,
26  * 51 Franklin SQObject::treet, Fifth Floor, Boston, MA  02110-1301  USA
27  */
28
29 #ifndef _VICAR_CONNECTIONMANAGER_H_
30 #define _VICAR_CONNECTIONMANAGER_H_
31
32 #include "connectionmanagertypes.h"
33 #include <QtDBus/QDBusContext>
34 #include <QtDBus/QtDBus>
35
36 class ConnectionManagerPrivate;
37
38 class ConnectionManager : public QObject
39 {
40     Q_OBJECT
41     Q_DECLARE_PRIVATE(ConnectionManager)
42
43 public:
44     explicit ConnectionManager(QObject * parent = 0);
45     ~ConnectionManager();
46
47     enum ParamFlags
48     {
49         None = 0,
50         Required = 1,
51         Register = 2,
52         hasDefault = 4
53     };
54
55 public slots:
56     org::freedesktop::Telepathy::ParameterDefinitionList
57     GetParameters(const QString &proto);
58
59     QStringList ListProtocols();
60
61     QString RequestConnection(const QString &proto, QVariantMap parameters,
62                               QDBusObjectPath &object_path);
63
64 signals:
65     void NewConnection(const QString &bus_name,
66                        const QDBusObjectPath &object_path,
67                        const QString &proto);
68
69 private:
70     ConnectionManager(const ConnectionManager &); // no impl.
71
72     ConnectionManagerPrivate * const d;
73 };
74
75 #endif