Switch to unified view

a/libupnpp/control/avtransport.hxx b/libupnpp/control/avtransport.hxx
...
...
18
#ifndef _AVTRANSPORT_HXX_INCLUDED_
18
#ifndef _AVTRANSPORT_HXX_INCLUDED_
19
#define _AVTRANSPORT_HXX_INCLUDED_
19
#define _AVTRANSPORT_HXX_INCLUDED_
20
20
21
#include "libupnpp/config.h"
21
#include "libupnpp/config.h"
22
22
23
#include <string>                       // for string
23
#include <string>
24
24
25
#include "libupnpp/control/cdircontent.hxx"  // for UPnPDirObject
25
#include "libupnpp/control/cdircontent.hxx"  // for UPnPDirObject
26
#include "libupnpp/control/service.hxx"  // for Service
26
#include "libupnpp/control/service.hxx"  // for Service
27
#include "libupnpp/log.hxx"
27
28
28
namespace UPnPClient {
29
namespace UPnPClient {
30
29
class AVTransport;
31
class AVTransport;
30
}
31
namespace UPnPClient {
32
class UPnPDeviceDesc;
32
class UPnPDeviceDesc;
33
}
34
namespace UPnPClient {
35
class UPnPServiceDesc;
33
class UPnPServiceDesc;
36
}
37
38
namespace UPnPClient {
39
34
40
typedef std::shared_ptr<AVTransport> AVTH;
35
typedef std::shared_ptr<AVTransport> AVTH;
41
36
42
/**
37
/**
43
 * AVTransport Service client class.
38
 * AVTransport Service client class.
44
 *
39
 *
45
 */
40
 */
46
class AVTransport : public Service {
41
class AVTransport : public Service {
47
public:
42
public:
48
43
49
    /** Construct by copying data from device and service objects.
44
    /** Construct by copying data from device and service objects. */
50
     *
51
     */
52
    AVTransport(const UPnPDeviceDesc& device,
45
    AVTransport(const UPnPDeviceDesc& dev, const UPnPServiceDesc& srv)
53
                const UPnPServiceDesc& service)
54
        : Service(device, service) {
46
        : Service(dev, srv) {
55
        registerCallback();
56
    }
47
    }
57
58
    AVTransport() {}
48
    AVTransport() {}
59
    virtual ~AVTransport() { }
49
    virtual ~AVTransport() {}
60
50
61
    int setAVTransportURI(const std::string& uri, const std::string& metadata,
51
    int setAVTransportURI(const std::string& uri, const std::string& metadata,
62
                          int instanceID=0)
52
                          int instanceID=0)
63
    {
53
    {
64
        return setURI(uri, metadata, instanceID, false);
54
        return setURI(uri, metadata, instanceID, false);
...
...
147
                          };
137
                          };
148
    int getCurrentTransportActions(int& actions, int instanceID=0);
138
    int getCurrentTransportActions(int& actions, int instanceID=0);
149
139
150
    /** Test service type from discovery message */
140
    /** Test service type from discovery message */
151
    static bool isAVTService(const std::string& st);
141
    static bool isAVTService(const std::string& st);
142
    virtual bool serviceTypeMatch(const std::string& tp);
152
143
153
protected:
144
protected:
154
    /* My service type string */
145
    /* My service type string */
155
    static const std::string SType;
146
    static const std::string SType;
156
147
...
...
159
    int CTAStringToBits(const std::string& actions, int& iacts);
150
    int CTAStringToBits(const std::string& actions, int& iacts);
160
151
161
private:
152
private:
162
    void evtCallback(const std::unordered_map<std::string, std::string>&);
153
    void evtCallback(const std::unordered_map<std::string, std::string>&);
163
    void registerCallback();
154
    void registerCallback();
164
165
};
155
};
166
156
167
} // namespace UPnPClient
157
} // namespace UPnPClient
168
158
169
#endif /* _AVTRANSPORT_HXX_INCLUDED_ */
159
#endif /* _AVTRANSPORT_HXX_INCLUDED_ */