Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cVoIP.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cVoIP_H
7 #define _INC_cVoIP_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "../GrayLibBase.h"
13 #include "../Net/cNetSocket.h"
14 #include "../Math/cVector.h"
18 
19 namespace GrayLib
20 {
21  class cVoIPConnect : public cRefBase
22  {
26 
27  public:
28  cVoIPConnect( const cNetAddress& addr );
30 
31  HASHCODE_t get_HashCode() const noexcept
32  {
33  return m_Addr.get_HashCodeHost();
34  }
35 
36  public:
39  bool m_bConnected; // actually connected yet ?
40  TIMESYS_t m_timeLastSound; // how long since last sound sent?
41  };
42 
43  class cVoIPUser : public cRefBase
44  {
49  public:
52 
53  HASHCODE_t m_nUserId; // My user id in the system.
54  bool m_bHas3DPosition; // taper off over distance
55  cVector3f m_vPos; // My position in 3d space.
56  bool m_bMuted; // i can't talk.
57 
58  // Attached to a world object ?
59  UINT_PTR m_nUserData; // What object is this? opaque id.
60  };
61 
62  class cVoIPChannel : public cRefBase
63  {
64  // a collection of voip users that may be locallly muxed or server muxed.
65  // if this is a 3d channel. this must be re-mixed for every listener.
66 
67  cArrayRef<cVoIPUser> m_aUsers; // what users are connected?
68  };
69 
70  class cVoIPMixer
71  {
72  // take multiple channels and mix them.
73 
74  bool m_bUse3d; // do any 3d.
75  };
76 };
77 
78 #endif // _INC_cVoIP_H
Definition: cNetAddr.h:31
HASHCODE_t get_HashCodeHost() const noexcept
Definition: cNetAddr.cpp:299
Definition: cNetSocket.h:185
Definition: cVector.h:94
Definition: cVoIP.h:63
Definition: cVoIP.h:22
const cNetAddress m_Addr
Definition: cVoIP.h:37
cVoIPConnect(const cNetAddress &addr)
cNetSocket m_Socket
Definition: cVoIP.h:38
bool m_bConnected
Definition: cVoIP.h:39
HASHCODE_t get_HashCode() const noexcept
Definition: cVoIP.h:31
TIMESYS_t m_timeLastSound
Definition: cVoIP.h:40
Definition: cVoIP.h:71
Definition: cVoIP.h:44
bool m_bHas3DPosition
Definition: cVoIP.h:54
UINT_PTR m_nUserData
Definition: cVoIP.h:59
bool m_bMuted
Definition: cVoIP.h:56
HASHCODE_t m_nUserId
Definition: cVoIP.h:53
cVector3f m_vPos
Definition: cVoIP.h:55
Definition: cArrayRef.h:21
Definition: cRefPtr.h:22
Definition: cMesh.h:22
UINT_PTR HASHCODE_t
could hold a pointer converted to a number? maybe 64 or 32 bit ? same as size_t.
Definition: GrayCore.h:116
UINT32 TIMESYS_t
TIMESYS_t = The normal system tick timer. milli-seconds since start of system/app ?
Definition: cTimeSys.h:27