diff options
author | lordjaxom <lordjaxom> | 2005-05-09 20:22:29 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2005-05-09 20:22:29 +0000 |
commit | 450c8fd4a7ec7eb878abfce0e4a499e03762b4f8 (patch) | |
tree | cedc263aad1297fdb64a813ff83e424ee4023925 /server/component.h | |
parent | 3eec47314d70d513b494750312a877f29d070eb8 (diff) | |
download | vdr-plugin-streamdev-450c8fd4a7ec7eb878abfce0e4a499e03762b4f8.tar.gz vdr-plugin-streamdev-450c8fd4a7ec7eb878abfce0e4a499e03762b4f8.tar.bz2 |
- added TS compatibility mode
Diffstat (limited to 'server/component.h')
-rw-r--r-- | server/component.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/server/component.h b/server/component.h index 2f8e605..8703348 100644 --- a/server/component.h +++ b/server/component.h @@ -1,5 +1,5 @@ /* - * $Id: component.h,v 1.1 2004/12/30 22:44:18 lordjaxom Exp $ + * $Id: component.h,v 1.2 2005/05/09 20:22:29 lordjaxom Exp $ */ #ifndef VDR_STREAMDEV_SERVERS_COMPONENT_H @@ -22,29 +22,30 @@ private: const char *m_ListenIp; uint m_ListenPort; +protected: + /* Returns a new connection object for Accept() */ + virtual cServerConnection *NewClient(void) = 0; + public: cServerComponent(const char *Protocol, const char *ListenIp, uint ListenPort); virtual ~cServerComponent(); /* Starts listening on the specified Port, override if you want to do things different */ - virtual bool Init(void); + virtual bool Initialize(void); /* Stops listening, override if you want to do things different */ - virtual void Exit(void); + virtual void Destruct(void); - /* Adds the listening socket to the Select object */ - virtual void AddSelect(cTBSelect &Select) const { Select.Add(m_Listen); } - - /* Accepts the connection on a NewConnection() object and calls the - Welcome() on it, override if you want to do things different */ - virtual cServerConnection *CanAct(const cTBSelect &Select); + /* Get the listening socket's file number */ + virtual int Socket(void) const { return (int)m_Listen; } - /* Returns a new connection object for CanAct */ - virtual cServerConnection *NewConnection(void) const = 0; -}; + /* Adds the listening socket to the Select object */ + virtual void Add(cTBSelect &Select) const { Select.Add(m_Listen); } -class cServerComponents: public cList<cServerComponent> { + /* Accepts the connection on a NewClient() object and calls the + Welcome() on it, override if you want to do things different */ + virtual cServerConnection *Accept(void); }; #endif // VDR_STREAMDEV_SERVERS_COMPONENT_H |