Alejandro Acuña
2024-08-12 1876e65234c20209001178705cfa50d8f9ded67a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#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