Key Data Structures
Figure 9-2 shows the classes and how they encapsulate and inherit from one another.
Let’s have a look at the classes that appear in Figure 9-2:
- BasicProxy
A derived class from the HeartLessProxy. A BasicProxy object should be used in a system that supports the heartbeating mechanism, as discussed in Chapter 17. This class adds three heartbeating threads.
- Builder
A base class that receives events from the Worker thread for processing. Builder is a Feature container, which is a State container, which is an Operator container. Builder contains a pointer to the proxy CallContainer. Builder objects are used to construct HeartLessProxy and BasicProxy objects.
- CallContainer
A base class that is used as the proxy’s container for CallInfo objects.
Figure 9-2. Base code classes
- CallInfo
A base class that stores information about a call. A SipProxyEvent object contains CallInfo. CallInfo data members are thread-safe.
- DeviceEvent
Derived from SipProxyEvent and a placeholder for events received from a device. These are used in the SIP User Agent for events such as a phone going on- or off-hook.
- Feature
Keeps track of running the state machine that is associated with it.
- HeartLessProxy
So named because it doesn’t heartbeat. This class creates a call container, call processing FIFO, SIP stack, and Worker and SIP threads. The main method is the run method, which starts ...
Get Practical VoIP Using VOCAL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.