/* * filemembers.h * * Various file-based listeners for OpenMCU * * Copyright (C) 2003 Post Increment * * The contents of this file are subject to the Mozilla Public License * Version 1.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is Portable Windows Library. * * The Initial Developer of the Original Code is Post Increment * * Portions of this code were written by Post Increment (http://www.postincrement.com) * with the assistance of funding from Citron Networks (http://www.citron.com.tw) * * Portions are Copyright (C) 1993 Free Software Foundation, Inc. * All Rights Reserved. * * Contributor(s): Derek J Smithies (derek@indranet.co.nz) * * $Log: filemembers.h,v $ * Revision 2.1 2004/05/26 06:54:31 csoutheren * Changed to be a PHTTPServiceProcess * Added ability to play WAV files on member entry and exit * Added additional documentation on all classes * Preparation for re-introducing video * */ #ifndef _OpenMCU_FILEMEMBERS_H #define _OpenMCU_FILEMEMBERS_H #include "conference.h" #include class ConferenceSoundCardMember : public ConferenceMember { PCLASSINFO(ConferenceSoundCardMember, ConferenceMember); public: ConferenceSoundCardMember(); ~ConferenceSoundCardMember(); void Unlisten(); virtual ConferenceConnection * CreateConnection() { return new ConferenceConnection(this); } virtual PString GetName() const { return "listener"; } virtual BOOL Visible() const { return FALSE; } void OnReceivedUserInputIndication(const PString & str) { cout << "Received user input indication " << str << endl; } PDECLARE_NOTIFIER(PThread, ConferenceSoundCardMember, Thread); protected: BOOL running; PSoundChannel soundDevice; PThread * thread; }; class ConferenceFileMember : public ConferenceMember { PCLASSINFO(ConferenceFileMember, ConferenceMember); public: ConferenceFileMember(const PFilePath & _fn, PFile::OpenMode mode); ~ConferenceFileMember(); void Unlisten(); virtual ConferenceConnection * CreateConnection() { return new ConferenceConnection(this); } virtual PString GetName() const { return "listener"; } virtual BOOL Visible() const { return FALSE; } void OnReceivedUserInputIndication(const PString & str) { cout << "Received user input indication " << str << endl; } PDECLARE_NOTIFIER(PThread, ConferenceFileMember, ReadThread); PDECLARE_NOTIFIER(PThread, ConferenceFileMember, WriteThread); protected: PFilePath filename; PFile::OpenMode mode; OpalWAVFile file; BOOL running; PThread * thread; }; class ConferenceFilePlayer : public ConferenceFileMember { PCLASSINFO(ConferenceFilePlayer, ConferenceFileMember); public: ConferenceFilePlayer(); void Unlisten(); PDECLARE_NOTIFIER(PThread, ConferenceFilePlayer, Thread); }; #endif