~phablet-team/aethercast/fix-for-microsoft-dongle

« back to all changes in this revision

Viewing changes to src/mcs/networkdeviceadapter.h

Introduce interface mcs::MiracastController to decouple MiracastService and MiracastServiceAdapter.
Refactor mcs::MiracastServiceAdapter to be a skeleton-implementation of MiracastController and rename accordingly.

Approved by Simon Fels, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#endif
28
28
 
29
29
#include "networkdevice.h"
30
 
#include "miracastservice.h"
 
30
#include "miracastcontroller.h"
31
31
#include "shared_gobject.h"
32
32
 
33
33
namespace mcs {
36
36
public:
37
37
    typedef std::shared_ptr<NetworkDeviceAdapter> Ptr;
38
38
 
39
 
    static NetworkDeviceAdapter::Ptr Create(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastService::Ptr &service);
 
39
    static NetworkDeviceAdapter::Ptr Create(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastController::Ptr &controller);
40
40
 
41
41
    ~NetworkDeviceAdapter();
42
42
 
52
52
                                   gpointer user_data);
53
53
 
54
54
private:
55
 
    NetworkDeviceAdapter(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastService::Ptr &service);
 
55
    NetworkDeviceAdapter(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastController::Ptr &service);
56
56
 
57
57
    std::shared_ptr<NetworkDeviceAdapter> FinalizeConstruction();
58
58
 
61
61
    AethercastInterfaceObjectSkeleton *object_;
62
62
    std::string path_;
63
63
    NetworkDevice::Ptr device_;
64
 
    MiracastService::Ptr service_;
 
64
    MiracastController::Ptr controller_;
65
65
    AethercastInterfaceDevice *device_iface_;
66
66
};
67
67