summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h')
-rw-r--r--pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h b/pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h
index db150156..b9aaea41 100644
--- a/pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h
+++ b/pjsip-apps/src/activex-pjsua/activex-pjsuaCP.h
@@ -2,6 +2,7 @@
#define _ACTIVEXPJSUACP_H_
//#import "C:\project\pjproject\pjsip-apps\src\activex-pjsua\activex-pjsua.tlb" raw_interfaces_only, raw_native_types, no_namespace, named_guids //"Import typelib"
+
template <class T>
class CProxy_IPjsuaEvents : public IConnectionPointImpl<T, &DIID__IPjsuaEvents, CComDynamicUnkArray>
{
@@ -147,5 +148,28 @@ public:
delete[] pvars;
}
+ VOID Fire_OnIncomingCall(INT call_index)
+ {
+ T* pT = static_cast<T*>(this);
+ int nConnectionIndex;
+ CComVariant* pvars = new CComVariant[1];
+ int nConnections = m_vec.GetSize();
+
+ for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
+ {
+ pT->Lock();
+ CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
+ pT->Unlock();
+ IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
+ if (pDispatch != NULL)
+ {
+ pvars[0] = call_index;
+ DISPPARAMS disp = { pvars, NULL, 1, 0 };
+ pDispatch->Invoke(0x6, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
+ }
+ }
+ delete[] pvars;
+
+ }
};
#endif \ No newline at end of file