|
a/src/cdplugin.hxx |
|
b/src/cdplugin.hxx |
|
... |
|
... |
28 |
class CDPluginServices {
|
28 |
class CDPluginServices {
|
29 |
public:
|
29 |
public:
|
30 |
/// Returns something like "/tidal" (no end slash)
|
30 |
/// Returns something like "/tidal" (no end slash)
|
31 |
virtual std::string getpathprefix(CDPlugin *) = 0;
|
31 |
virtual std::string getpathprefix(CDPlugin *) = 0;
|
32 |
|
32 |
|
|
|
33 |
/// Returns the plugin to which belongs the parameter path, based
|
|
|
34 |
/// on the path prefix above
|
|
|
35 |
virtual CDPlugin *getpluginforpath(const std::string& path) = 0;
|
|
|
36 |
|
33 |
/// Retrieve the IP address and port for the libupnp server. URLs
|
37 |
/// Retrieve the IP address and port for the libupnp server. URLs
|
34 |
/// intended to be served this way (by adding a vdir) should use
|
38 |
/// intended to be served this way (by adding a vdir) should use
|
35 |
/// these as host/port
|
39 |
/// these as host/port
|
36 |
virtual std::string getupnpaddr(CDPlugin *) = 0;
|
40 |
virtual std::string getupnpaddr(CDPlugin *) = 0;
|
37 |
virtual int getupnpport(CDPlugin *) = 0;
|
41 |
virtual int getupnpport(CDPlugin *) = 0;
|
|
... |
|
... |
41 |
virtual bool setfileops(CDPlugin *, const std::string& path,
|
45 |
virtual bool setfileops(CDPlugin *, const std::string& path,
|
42 |
UPnPProvider::VirtualDir::FileOps ops)= 0;
|
46 |
UPnPProvider::VirtualDir::FileOps ops)= 0;
|
43 |
|
47 |
|
44 |
/// Access the main configuration file.
|
48 |
/// Access the main configuration file.
|
45 |
virtual ConfSimple *getconfig(CDPlugin *)= 0;
|
49 |
virtual ConfSimple *getconfig(CDPlugin *)= 0;
|
46 |
virtual const std::vector<std::string> getexecpath(CDPlugin *)= 0;
|
50 |
virtual std::string getexecpath(CDPlugin *)= 0;
|
47 |
};
|
51 |
};
|
48 |
|
52 |
|
49 |
/// Interface to media server modules
|
53 |
/// Interface to media server modules
|
50 |
///
|
54 |
///
|
51 |
/// The main operations, Browse and Search, return content as UpSong
|
55 |
/// The main operations, Browse and Search, return content as UpSong
|
|
... |
|
... |
74 |
/// - A libmicrohttpd URL. A plugin may start a microhttpd instance,
|
78 |
/// - A libmicrohttpd URL. A plugin may start a microhttpd instance,
|
75 |
/// and receive the connections directly. The host/port will be
|
79 |
/// and receive the connections directly. The host/port will be
|
76 |
/// obtained from the configuration. The advantage is that redirects
|
80 |
/// obtained from the configuration. The advantage is that redirects
|
77 |
/// and range requests are possible, but it is a bit more
|
81 |
/// and range requests are possible, but it is a bit more
|
78 |
/// complicated as some libmicrohttpd knowledge is required.
|
82 |
/// complicated as some libmicrohttpd knowledge is required.
|
79 |
///
|
|
|
80 |
class CDPlugin {
|
83 |
class CDPlugin {
|
81 |
public:
|
84 |
public:
|
82 |
CDPlugin(const std::string& name, CDPluginServices *services)
|
85 |
CDPlugin(const std::string& name, CDPluginServices *services)
|
83 |
: m_name(name), m_services(services) {
|
86 |
: m_name(name), m_services(services) {
|
84 |
}
|
87 |
}
|