diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2009-01-07 13:07:31 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2009-01-07 13:07:31 +0000 |
commit | 0e2a2e49077b79bd52d6c83c5202e452e7eea091 (patch) | |
tree | 58ae466e2c74be585548f10ffff96560099c9370 /orkbasecxx/messages | |
parent | ded03e95a1eb78cb16ef3a4a0dc9bb140bd748ba (diff) |
Modified the orkaudio API, adding the record and pause HTTP commands. The record command commences or un-pauses recording while the pause command pauses recording - discarding RTP packets from when the pause command is issued. Both commands require the orkuid and party to be specified as HTTP parameters. Note that this represents a change in the arguments required for the StartCapture function in DLLs. Also added an event streaming feature which streams out all tape messages as they are reported in real-time to a client connected. Clients should connect via HTTP, on port 59150. The port is configurable by setting the parameter EventStreamingServerPort in config.xml
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@590 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/messages')
-rw-r--r-- | orkbasecxx/messages/RecordMsg.cpp | 43 | ||||
-rw-r--r-- | orkbasecxx/messages/RecordMsg.h | 15 |
2 files changed, 54 insertions, 4 deletions
diff --git a/orkbasecxx/messages/RecordMsg.cpp b/orkbasecxx/messages/RecordMsg.cpp index 46f3778..b72300f 100644 --- a/orkbasecxx/messages/RecordMsg.cpp +++ b/orkbasecxx/messages/RecordMsg.cpp @@ -16,15 +16,50 @@ #include "CapturePluginProxy.h" #define RECORD_CLASS "record" +#define PAUSE_CLASS "pause" + +void PauseMsg::Define(Serializer* s) +{ + CStdString pauseClass(PAUSE_CLASS); + s->StringValue(OBJECT_TYPE_TAG, pauseClass, true); + s->StringValue(PARTY_PARAM, m_party, false); + s->StringValue(ORKUID_PARAM, m_orkuid, false); +} + +CStdString PauseMsg::GetClassName() +{ + return CStdString(PAUSE_CLASS); +} + +ObjectRef PauseMsg::NewInstance() +{ + return ObjectRef(new PauseMsg); +} + +ObjectRef PauseMsg::Process() +{ + SimpleResponseMsg* msg = new SimpleResponseMsg; + ObjectRef ref(msg); + CStdString logMsg; + + logMsg.Format("Pausing capture for party:%s orkuid:%s", m_party, m_orkuid); + CapturePluginProxy::Singleton()->PauseCapture(m_party, m_orkuid); + msg->m_success = true; + msg->m_comment = logMsg; + + return ref; +} + +//=================================================== void RecordMsg::Define(Serializer* s) { CStdString recordClass(RECORD_CLASS); s->StringValue(OBJECT_TYPE_TAG, recordClass, true); - s->StringValue(PARTY_PARAM, m_party, true); + s->StringValue(PARTY_PARAM, m_party, false); + s->StringValue(ORKUID_PARAM, m_orkuid, false); } - CStdString RecordMsg::GetClassName() { return CStdString(RECORD_CLASS); @@ -41,8 +76,8 @@ ObjectRef RecordMsg::Process() ObjectRef ref(msg); CStdString logMsg; - logMsg.Format("Starting capture for %s", m_party); - CapturePluginProxy::Singleton()->StartCapture(m_party); + logMsg.Format("Starting capture for party:%s orkuid:%s", m_party, m_orkuid); + CapturePluginProxy::Singleton()->StartCapture(m_party, m_orkuid); msg->m_success = true; msg->m_comment = logMsg; diff --git a/orkbasecxx/messages/RecordMsg.h b/orkbasecxx/messages/RecordMsg.h index 35803be..c374476 100644 --- a/orkbasecxx/messages/RecordMsg.h +++ b/orkbasecxx/messages/RecordMsg.h @@ -28,6 +28,21 @@ public: ObjectRef Process(); CStdString m_party; + CStdString m_orkuid; +}; + +class DLL_IMPORT_EXPORT_ORKBASE PauseMsg : public SyncMessage +{ +public: + void Define(Serializer* s); + inline void Validate() {}; + + CStdString GetClassName(); + ObjectRef NewInstance(); + ObjectRef Process(); + + CStdString m_party; + CStdString m_orkuid; }; #endif |