#ifndef _CCNSMTCP_H_
|
#define _CCNSMTCP_H_
|
|
|
|
template <class T>
|
class CProxy_ICCNMediaTermEvents : public IConnectionPointImpl<T, &IID__ICCNMediaTermEvents, CComDynamicUnkArray>
|
{
|
//Warning this class may be recreated by the wizard.
|
public:
|
HRESULT Fire_EndOfFileEventRX(LONG Cookie)
|
{
|
HRESULT ret;
|
T* pT = static_cast<T*>(this);
|
int nConnectionIndex;
|
int nConnections = m_vec.GetSize();
|
|
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
{
|
pT->Lock();
|
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
pT->Unlock();
|
_ICCNMediaTermEvents* p_ICCNMediaTermEvents = reinterpret_cast<_ICCNMediaTermEvents*>(sp.p);
|
if (p_ICCNMediaTermEvents != NULL)
|
ret = p_ICCNMediaTermEvents->EndOfFileEventRX(Cookie);
|
} return ret;
|
|
}
|
HRESULT Fire_EndOfFileEventTX(LONG Cookie)
|
{
|
HRESULT ret;
|
T* pT = static_cast<T*>(this);
|
int nConnectionIndex;
|
int nConnections = m_vec.GetSize();
|
|
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
{
|
pT->Lock();
|
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
pT->Unlock();
|
_ICCNMediaTermEvents* p_ICCNMediaTermEvents = reinterpret_cast<_ICCNMediaTermEvents*>(sp.p);
|
if (p_ICCNMediaTermEvents != NULL)
|
ret = p_ICCNMediaTermEvents->EndOfFileEventTX(Cookie);
|
} return ret;
|
|
}
|
HRESULT Fire_NetworkMonitorEventRX(DOUBLE RXMean, DOUBLE RXVariance)
|
{
|
HRESULT ret;
|
T* pT = static_cast<T*>(this);
|
int nConnectionIndex;
|
int nConnections = m_vec.GetSize();
|
|
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
{
|
pT->Lock();
|
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
pT->Unlock();
|
_ICCNMediaTermEvents* p_ICCNMediaTermEvents = reinterpret_cast<_ICCNMediaTermEvents*>(sp.p);
|
if (p_ICCNMediaTermEvents != NULL)
|
ret = p_ICCNMediaTermEvents->NetworkMonitorEventRX(RXMean, RXVariance);
|
} return ret;
|
|
}
|
HRESULT Fire_NetworkMonitorEventTX(DOUBLE TXMean, DOUBLE TXVariance)
|
{
|
HRESULT ret;
|
T* pT = static_cast<T*>(this);
|
int nConnectionIndex;
|
int nConnections = m_vec.GetSize();
|
|
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
{
|
pT->Lock();
|
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
pT->Unlock();
|
_ICCNMediaTermEvents* p_ICCNMediaTermEvents = reinterpret_cast<_ICCNMediaTermEvents*>(sp.p);
|
if (p_ICCNMediaTermEvents != NULL)
|
ret = p_ICCNMediaTermEvents->NetworkMonitorEventTX(TXMean, TXVariance);
|
} return ret;
|
|
}
|
};
|
#endif
|