Switch to unified view

a/libupnpp/control/cdirectory.hxx b/libupnpp/control/cdirectory.hxx
...
...
50
 * The value chosen may affect by the UpnpSetMaxContentLength
50
 * The value chosen may affect by the UpnpSetMaxContentLength
51
 * (2000*1024) done during initialization, but this should be ample
51
 * (2000*1024) done during initialization, but this should be ample
52
 */
52
 */
53
class ContentDirectory : public Service {
53
class ContentDirectory : public Service {
54
public:
54
public:
55
55
    /** Construct by copying data from device and service objects.
56
    /** Construct by copying data from device and service objects. */
56
     *
57
     */
58
    ContentDirectory(const UPnPDeviceDesc& device,
57
    ContentDirectory(const UPnPDeviceDesc& device,
59
                     const UPnPServiceDesc& service)
58
                     const UPnPServiceDesc& service);
60
        : Service(device, service), m_rdreqcnt(200)
61
        {
62
            if (!m_modelName.compare("MediaTomb")) {
63
                // Readdir by 200 entries is good for most, but MediaTomb likes
64
                // them really big. Actually 1000 is better but I don't dare
65
                m_rdreqcnt = 500;
66
            }
67
            registerCallback();
68
        }
69
59
70
    /** An empty one */
60
    /** An empty one */
71
    ContentDirectory() {}
61
    ContentDirectory() : m_rdreqcnt(200), m_serviceKind(CDSKIND_UNKNOWN) {}
62
63
    enum ServiceKind {CDSKIND_UNKNOWN, CDSKIND_BUBBLE, CDSKIND_MEDIATOMB,
64
                      CDSKIND_MINIDLNA, CDSKIND_MINIM, CDSKIND_TWONKY};
65
66
    ServiceKind getKind() {return m_serviceKind;}
72
67
73
    /** Test service type from discovery message */
68
    /** Test service type from discovery message */
74
    static bool isCDService(const std::string& st);
69
    static bool isCDService(const std::string& st);
75
70
76
    /** Retrieve the directory services currently seen on the network */
71
    /** Retrieve the directory services currently seen on the network */
...
...
145
    /* My service type string */
140
    /* My service type string */
146
    static const std::string SType;
141
    static const std::string SType;
147
142
148
private:
143
private:
149
    int m_rdreqcnt; // Slice size to use when reading
144
    int m_rdreqcnt; // Slice size to use when reading
145
    ServiceKind m_serviceKind;
146
150
    void evtCallback(const std::unordered_map<std::string, std::string>&);
147
    void evtCallback(const std::unordered_map<std::string, std::string>&);
151
    void registerCallback();
148
    void registerCallback();
152
};
149
};
153
150
154
}
151
}