summaryrefslogtreecommitdiff
path: root/orkbasecxx
diff options
context:
space:
mode:
Diffstat (limited to 'orkbasecxx')
-rw-r--r--orkbasecxx/AudioCapturePlugin.h6
-rw-r--r--orkbasecxx/CapturePluginProxy.cpp12
-rw-r--r--orkbasecxx/CapturePluginProxy.h6
-rw-r--r--orkbasecxx/Reporting.cpp6
-rw-r--r--orkbasecxx/messages/Message.h1
-rw-r--r--orkbasecxx/messages/RecordMsg.cpp46
-rw-r--r--orkbasecxx/messages/RecordMsg.h17
7 files changed, 75 insertions, 19 deletions
diff --git a/orkbasecxx/AudioCapturePlugin.h b/orkbasecxx/AudioCapturePlugin.h
index ede2ea0..a1bc684 100644
--- a/orkbasecxx/AudioCapturePlugin.h
+++ b/orkbasecxx/AudioCapturePlugin.h
@@ -41,9 +41,9 @@ typedef void (__CDECL__* InitializeFunction)();
typedef void (__CDECL__* RunFunction)();
typedef void (__CDECL__* ShutdownFunction)();
typedef void (__CDECL__* ConfigureFunction)(DOMNode*);
-typedef void (__CDECL__* StartCaptureFunction)(CStdString& port, CStdString& orkUid);
-typedef void (__CDECL__* StopCaptureFunction)(CStdString& port);
-typedef void (__CDECL__* PauseCaptureFunction)(CStdString& port, CStdString& orkUid);
+typedef void (__CDECL__* StartCaptureFunction)(CStdString& port, CStdString& orkUid, CStdString& nativecallid);
+typedef void (__CDECL__* StopCaptureFunction)(CStdString& port, CStdString& orkUid, CStdString& nativecallid);
+typedef void (__CDECL__* PauseCaptureFunction)(CStdString& port, CStdString& orkUid, CStdString& nativecallid);
typedef void (__CDECL__* SetOnHoldFunction)(CStdString& port, CStdString& orkUid);
typedef void (__CDECL__* SetOffHoldFunction)(CStdString& port, CStdString& orkUid);
diff --git a/orkbasecxx/CapturePluginProxy.cpp b/orkbasecxx/CapturePluginProxy.cpp
index 87fc176..bc365bc 100644
--- a/orkbasecxx/CapturePluginProxy.cpp
+++ b/orkbasecxx/CapturePluginProxy.cpp
@@ -213,11 +213,11 @@ void CapturePluginProxy::Shutdown()
}
}
-void CapturePluginProxy::StartCapture(CStdString& party, CStdString& orkuid)
+void CapturePluginProxy::StartCapture(CStdString& party, CStdString& orkuid, CStdString& nativecallid)
{
if(m_loaded)
{
- m_startCaptureFunction(party, orkuid);
+ m_startCaptureFunction(party, orkuid, nativecallid);
}
else
{
@@ -225,11 +225,11 @@ void CapturePluginProxy::StartCapture(CStdString& party, CStdString& orkuid)
}
}
-void CapturePluginProxy::StopCapture(CStdString& party)
+void CapturePluginProxy::StopCapture(CStdString& party, CStdString& orkuid, CStdString& nativecallid)
{
if(m_loaded)
{
- m_stopCaptureFunction(party);
+ m_stopCaptureFunction(party, orkuid, nativecallid);
}
else
{
@@ -261,11 +261,11 @@ void CapturePluginProxy::SetOffHold(CStdString& party, CStdString& orkuid)
}
}
-void CapturePluginProxy::PauseCapture(CStdString& party, CStdString& orkuid)
+void CapturePluginProxy::PauseCapture(CStdString& party, CStdString& orkuid, CStdString& nativecallid)
{
if(m_loaded)
{
- m_pauseCaptureFunction(party, orkuid);
+ m_pauseCaptureFunction(party, orkuid, nativecallid);
}
else
{
diff --git a/orkbasecxx/CapturePluginProxy.h b/orkbasecxx/CapturePluginProxy.h
index 3ce7e46..d35af24 100644
--- a/orkbasecxx/CapturePluginProxy.h
+++ b/orkbasecxx/CapturePluginProxy.h
@@ -28,9 +28,9 @@ public:
void Run();
void Shutdown();
- void StartCapture(CStdString& party, CStdString& orkuid);
- void PauseCapture(CStdString& party, CStdString& orkuid);
- void StopCapture(CStdString& party);
+ void StartCapture(CStdString& party, CStdString& orkuid, CStdString& nativecallid);
+ void PauseCapture(CStdString& party, CStdString& orkuid, CStdString& nativecallid);
+ void StopCapture(CStdString& party, CStdString& orkUid, CStdString& nativecallid);
void SetOnHold(CStdString& party, CStdString& orkuid);
void SetOffHold(CStdString& party, CStdString& orkuid);
diff --git a/orkbasecxx/Reporting.cpp b/orkbasecxx/Reporting.cpp
index f1bbf20..a0664b6 100644
--- a/orkbasecxx/Reporting.cpp
+++ b/orkbasecxx/Reporting.cpp
@@ -373,9 +373,9 @@ void ReportingThread::Run()
// Tape is wanted
if(CONFIG.m_lookBackRecording == false && CONFIG.m_allowAutomaticRecording && ptapeMsg->m_stage.Equals("start"))
{
- CStdString orkuid = "";
- CapturePluginProxy::Singleton()->StartCapture(ptapeMsg->m_localParty, orkuid);
- CapturePluginProxy::Singleton()->StartCapture(ptapeMsg->m_remoteParty, orkuid);
+ CStdString orkuid = "", nativecallid = "";
+ CapturePluginProxy::Singleton()->StartCapture(ptapeMsg->m_localParty, orkuid, nativecallid);
+ CapturePluginProxy::Singleton()->StartCapture(ptapeMsg->m_remoteParty, orkuid, nativecallid);
}
}
//else
diff --git a/orkbasecxx/messages/Message.h b/orkbasecxx/messages/Message.h
index de1275b..e15fda8 100644
--- a/orkbasecxx/messages/Message.h
+++ b/orkbasecxx/messages/Message.h
@@ -34,6 +34,7 @@
#define FILENAME_PARAM "filename"
#define ORKUID_PARAM "orkuid"
#define PARTY_PARAM "party"
+#define NATIVE_CALLID_PARAM "nativecallid"
#define SUCCESS_PARAM "sucess"
#define SUCCESS_DEFAULT true
diff --git a/orkbasecxx/messages/RecordMsg.cpp b/orkbasecxx/messages/RecordMsg.cpp
index 35a21b6..6b5688f 100644
--- a/orkbasecxx/messages/RecordMsg.cpp
+++ b/orkbasecxx/messages/RecordMsg.cpp
@@ -17,6 +17,7 @@
#define RECORD_CLASS "record"
#define PAUSE_CLASS "pause"
+#define STOP_CLASS "stop"
void PauseMsg::Define(Serializer* s)
{
@@ -24,6 +25,7 @@ void PauseMsg::Define(Serializer* s)
s->StringValue(OBJECT_TYPE_TAG, pauseClass, true);
s->StringValue(PARTY_PARAM, m_party, false);
s->StringValue(ORKUID_PARAM, m_orkuid, false);
+ s->StringValue(NATIVE_CALLID_PARAM, m_nativecallid, false);
}
CStdString PauseMsg::GetClassName()
@@ -42,8 +44,43 @@ ObjectRef PauseMsg::Process()
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);
+ CapturePluginProxy::Singleton()->PauseCapture(m_party, m_orkuid, m_nativecallid);
+ logMsg.Format("Pausing capture for party:%s orkuid:%s nativecallid:%s", m_party, m_orkuid, m_nativecallid);
+ msg->m_success = true;
+ msg->m_comment = logMsg;
+
+ return ref;
+}
+
+//===================================================
+
+void StopMsg::Define(Serializer* s)
+{
+ CStdString stopClass(STOP_CLASS);
+ s->StringValue(OBJECT_TYPE_TAG, stopClass, true);
+ s->StringValue(PARTY_PARAM, m_party, false);
+ s->StringValue(ORKUID_PARAM, m_orkuid, false);
+ s->StringValue(NATIVE_CALLID_PARAM, m_nativecallid, false);
+}
+
+CStdString StopMsg::GetClassName()
+{
+ return CStdString(STOP_CLASS);
+}
+
+ObjectRef StopMsg::NewInstance()
+{
+ return ObjectRef(new StopMsg);
+}
+
+ObjectRef StopMsg::Process()
+{
+ SimpleResponseMsg* msg = new SimpleResponseMsg;
+ ObjectRef ref(msg);
+ CStdString logMsg;
+
+ CapturePluginProxy::Singleton()->StopCapture(m_party, m_orkuid, m_nativecallid);
+ logMsg.Format("Stopping capture for party:%s orkuid:%s nativecallid:%s", m_party, m_orkuid, m_nativecallid);
msg->m_success = true;
msg->m_comment = logMsg;
@@ -58,6 +95,7 @@ void RecordMsg::Define(Serializer* s)
s->StringValue(OBJECT_TYPE_TAG, recordClass, true);
s->StringValue(PARTY_PARAM, m_party, false);
s->StringValue(ORKUID_PARAM, m_orkuid, false);
+ s->StringValue(NATIVE_CALLID_PARAM, m_nativecallid, false);
}
CStdString RecordMsg::GetClassName()
@@ -76,8 +114,8 @@ ObjectRef RecordMsg::Process()
ObjectRef ref(msg);
CStdString logMsg;
- CapturePluginProxy::Singleton()->StartCapture(m_party, m_orkuid);
- logMsg.Format("Starting capture for party:%s orkuid:%s", m_party, m_orkuid);
+ CapturePluginProxy::Singleton()->StartCapture(m_party, m_orkuid, m_nativecallid);
+ logMsg.Format("Starting capture for party:%s orkuid:%s nativecallid:%s", m_party, m_orkuid, m_nativecallid);
msg->m_success = true;
msg->m_comment = logMsg;
diff --git a/orkbasecxx/messages/RecordMsg.h b/orkbasecxx/messages/RecordMsg.h
index c374476..7dd58ed 100644
--- a/orkbasecxx/messages/RecordMsg.h
+++ b/orkbasecxx/messages/RecordMsg.h
@@ -29,6 +29,7 @@ public:
CStdString m_party;
CStdString m_orkuid;
+ CStdString m_nativecallid;
};
class DLL_IMPORT_EXPORT_ORKBASE PauseMsg : public SyncMessage
@@ -43,6 +44,22 @@ public:
CStdString m_party;
CStdString m_orkuid;
+ CStdString m_nativecallid;
+};
+
+class DLL_IMPORT_EXPORT_ORKBASE StopMsg : public SyncMessage
+{
+public:
+ void Define(Serializer* s);
+ inline void Validate() {};
+
+ CStdString GetClassName();
+ ObjectRef NewInstance();
+ ObjectRef Process();
+
+ CStdString m_party;
+ CStdString m_orkuid;
+ CStdString m_nativecallid;
};
#endif