summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/streamdev-server.c13
-rw-r--r--server/streamdev-server.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/server/streamdev-server.c b/server/streamdev-server.c
index e1475da..33d08a5 100644
--- a/server/streamdev-server.c
+++ b/server/streamdev-server.c
@@ -243,4 +243,17 @@ cString cPluginStreamdevServer::SVDRPCommand(const char *Command, const char *Op
return reply;
}
+bool cPluginStreamdevServer::Service(const char *Id, void *Data)
+{
+ if (strcmp(Id, "StreamdevServer::ClientCount-v1.0") == 0) {
+ if (Data) {
+ int *count = (int *) Data;
+ cThreadLock lock;
+ *count = cStreamdevServer::Clients(lock).Count();
+ }
+ return true;
+ }
+ return false;
+}
+
VDRPLUGINCREATOR(cPluginStreamdevServer); // Don't touch this!
diff --git a/server/streamdev-server.h b/server/streamdev-server.h
index 0d588fc..4654e26 100644
--- a/server/streamdev-server.h
+++ b/server/streamdev-server.h
@@ -46,6 +46,7 @@ public:
virtual bool SetupParse(const char *Name, const char *Value);
virtual const char **SVDRPHelpPages(void);
virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
+ virtual bool Service(const char *Id, void *Data = NULL);
};
#endif // VDR_STREAMDEVSERVER_H