~ubuntu-branches/ubuntu/wily/plasma-nm/wily-proposed

« back to all changes in this revision

Viewing changes to libs/handler.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Jonathan Riddell, Harald Sitter, Scarlett Clark
  • Date: 2014-10-01 16:14:15 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20141001161415-b3q27oqg8xqumbq7
Tags: 4:5.1.0.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release

[ Harald Sitter ]
* Drop ugly workaround to make a desktop file exectuable
  + This either should be done upstream or be lintian overridden (former
    seems more suitable). Upstream has been poked on IRC.
* Add lintian overrides
  + missing manpages: we don't care
  + package name doesn't match soname: we don't care for internal libraries
  + shlib-without-versioned-soname: we don't care for internal libraries
* Fix copyright short license for LGPL-KDEeV

[ Scarlett Clark ]
* Fix copyright short licence for LGPL-2.1-KDEeV 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    Copyright 2013 Jan Grulich <jgrulich@redhat.com>
 
2
    Copyright 2013-2014 Jan Grulich <jgrulich@redhat.com>
3
3
 
4
4
    This library is free software; you can redistribute it and/or
5
5
    modify it under the terms of the GNU Lesser General Public
25
25
 
26
26
#include <NetworkManagerQt/Connection>
27
27
 
28
 
#include "plasmanm_export.h"
29
28
#include <config.h>
30
29
 
31
 
#if !WITH_MODEMMANAGER_SUPPORT
32
 
typedef QMap<QDBusObjectPath, NMVariantMapMap> NMDBusObjectVariantMapMap;
33
 
Q_DECLARE_METATYPE(NMDBusObjectVariantMapMap)
34
 
#endif
35
30
 
36
 
class PLASMA_NM_EXPORT Handler : public QObject
 
31
class Q_DECL_EXPORT Handler : public QObject
37
32
{
38
33
Q_OBJECT
39
34
 
41
36
    enum HandlerAction {
42
37
        ActivateConnection,
43
38
        AddAndActivateConnection,
44
 
        RequestScan
 
39
        AddConnection,
 
40
        DeactivateConnection,
 
41
        RemoveConnection,
 
42
        RequestScan,
 
43
        UpdateConnection
45
44
    };
46
45
 
47
46
    explicit Handler(QObject* parent = 0);
54
53
     * @device - d-bus path of the device where the connection should be activated
55
54
     * @specificParameter - d-bus path of the specific object you want to use for this activation, i.e access point
56
55
     */
57
 
    void activateConnection(const QString & connection, const QString & device, const QString & specificParameter);
 
56
    void activateConnection(const QString &connection, const QString &device, const QString &specificParameter);
58
57
    /**
59
58
     * Adds and activates a new wireless connection
60
59
     * @device - d-bus path of the wireless device where the connection should be activated
65
64
     * Works automatically for wireless connections with WEP/WPA security, for wireless connections with WPA/WPA
66
65
     * it will open the connection editor for advanced configuration.
67
66
     * */
68
 
    void addAndActivateConnection(const QString & device, const QString & specificParameter, const QString & password = QString());
 
67
    void addAndActivateConnection(const QString &device, const QString &specificParameter, const QString &password = QString());
 
68
    /**
 
69
     * Adds a new connection
 
70
     * @map - NMVariantMapMap with connection settings
 
71
     */
 
72
    void addConnection(const NMVariantMapMap &map);
69
73
    /**
70
74
     * Deactivates given connection
71
75
     * @connection - d-bus path of the connection you want to deactivate
72
76
     * @device - d-bus path of the connection where the connection is activated
73
77
     */
74
 
    void deactivateConnection(const QString & connection, const QString & device);
 
78
    void deactivateConnection(const QString &connection, const QString &device);
75
79
    /**
76
80
     * Disconnects all connections
77
81
     */
83
87
    void enableWimax(bool enable);
84
88
    void enableWwan(bool enable);
85
89
 
86
 
    /**
87
 
     * Opens connection editor for given connection
88
 
     * @uuid - uuid of the connection you want to edit
89
 
     */
90
 
    void editConnection(const QString & uuid);
91
 
 
 
90
//     /**
 
91
//      * Opens connection editor for given connection
 
92
//      * @uuid - uuid of the connection you want to edit
 
93
//      */
 
94
//     void editConnection(const QString & uuid);
92
95
    /**
93
96
     * Removes given connection
94
97
     * @connection - d-bus path of the connection you want to edit
95
98
     */
96
99
    void removeConnection(const QString & connection);
 
100
    /**
 
101
     * Updates given connection
 
102
     * @connection - connection which should be updated
 
103
     * @map - NMVariantMapMap with new connection settings
 
104
     */
 
105
    void updateConnection(const NetworkManager::Connection::Ptr &connection, const NMVariantMapMap &map);
97
106
    void openEditor();
98
107
    void requestScan();
99
108
 
100
109
private Q_SLOTS:
101
 
    void editDialogAccepted();
 
110
    void initKdedModule();
102
111
    void replyFinished(QDBusPendingCallWatcher * watcher);
103
112
 
104
113
private: