Main Page Class Hierarchy Data Structures File List Data Fields Globals

# pv_2way_basic_types.h

Go to the documentation of this file.

    00001 /*
    00002 * ==============================================================================
    00003 *  Name        : pv_2way_basic_types
    00004 *  Part of     :
    00005 *  Interface   :
    00006 *  Description : Basic / low-level enums and types used by PV2Way engine
    00007 *  Version     : (see RELEASE field in copyright header above)
    00008 *
    00009 * ==============================================================================
    00010 */
    00011
    00012 #ifndef PV_2WAY_BASIC_TYPES_H_INCLUDED
    00013 #define PV_2WAY_BASIC_TYPES_H_INCLUDED
    00014
    00015 #ifndef PVMF_FORMAT_TYPE_H_INCLUDED
    00016 #include "pvmf_format_type.h"
    00017 #endif
    00018
    00019 #ifndef OSCL_VECTOR_H_INCLUDED
    00020 #include "oscl_vector.h"
    00021 #endif
    00022
    00023 #ifndef OSCL_MEM_H_INCLUDED
    00024 #include "oscl_mem.h"
    00025 #endif
    00026
    00027
    00028 // CONSTANTS
    00030 const int PV2WayErrorStatusStart = (-10500);
    00032 const int PV2WayDispatchError = PV2WayErrorStatusStart - 1;
    00034 const int PV2WayErrorRejected = PV2WayErrorStatusStart - 5;
    00036 const int PV2WayErrReplaced = PV2WayErrorStatusStart - 6;
    00037
    00038 // DATA TYPES
    00043 typedef enum TPVTerminalType
    00044 {
    00045     PV_323,/* based on H.323 */
    00046     PV_324M, /* based on H.324m */
    00047     PV_SIP, /* based on SIP */
    00048     PV_TERMINAL_TYPE_NONE
    00049 } PV2WayTerminalType;
    00050
    00056 typedef enum TPVLoopbackMode
    00057 {
    00058     PV_LOOPBACK_NONE,
    00059     PV_LOOPBACK_COMM, /* Loops back from Comm source to Comm sink */
    00060     PV_LOOPBACK_ENGINE, /* Loops back media at the engine level, no mux involved */
    00061     PV_LOOPBACK_MUX /* Loops back at the output of the mux */
    00062 } PV2WayLoopbackMode;
    00063
    00069 typedef enum TPVDirection
    00070 {
    00071     PV_DIRECTION_NONE = 0,
    00072     INCOMING = 1,
    00073     OUTGOING = 2,
    00074     PV_DIRECTION_BOTH = 3
    00075 } PV2WayDirection;
    00076
    00080 typedef enum TPVMediaType_t
    00081 {
    00082     PV_MEDIA_NONE = 0,
    00083     PV_CONTROL = 1,
    00084     PV_AUDIO = 2,
    00085     PV_VIDEO = 4,
    00086     PV_DATA = 8,
    00087     PV_USER_INPUT = 16,
    00088     PV_MULTIPLEXED = 32,
    00089     PV_MEDIA_ALL = 0xFFFF
    00090 } PV2WayMediaType;
    00091
    00097 typedef unsigned int PVTrackId;
    00098
    00104 typedef enum
    00105 {
    00110     EIdle = 0,
    00117     EInitializing,
    00125     ESetup,
    00130     EConnecting,
    00134     EConnected,
    00138     EDisconnecting,
    00142     EResetting
    00143 } PV2WayState;
    00144
    00151 enum TPVTIndicationType
    00152 {
    00153
    00162     PVT_INDICATION_INCOMING_TRACK,
    00171     PVT_INDICATION_OUTGOING_TRACK,
    00177     PVT_INDICATION_DISCONNECT,
    00184     PVT_INDICATION_CLOSING_TRACK,
    00193     PVT_INDICATION_CLOSE_TRACK,
    00200     PVT_INDICATION_PAUSE_TRACK,
    00206     PVT_INDICATION_RESUME_TRACK,
    00212     PVT_INDICATION_INTERNAL_ERROR,
    00213 };
    00214
    00215
    00216 // CLASS DECLARATION
    00217
    00226 class PV2WayInitInfo
    00227 {
    00228     public:
    00233         virtual void GetInitInfoClassName(OSCL_wString& aClassName) = 0;
    00234
    00235         virtual ~PV2WayInitInfo() { }
    00236
    00240         Oscl_Vector<PVMFFormatType, OsclMemAllocator> iOutgoingAudioFormats;
    00241
    00245         Oscl_Vector<PVMFFormatType, OsclMemAllocator> iOutgoingVideoFormats;
    00246
    00250         Oscl_Vector<PVMFFormatType, OsclMemAllocator> iIncomingAudioFormats;
    00251
    00255         Oscl_Vector<PVMFFormatType, OsclMemAllocator> iIncomingVideoFormats;
    00256
    00257 };
    00258
    00259
    00265 class PV2WayConnectOptions
    00266 {
    00267     public:
    00271         PV2WayConnectOptions()
    00272                 : iLoopbackMode(PV_LOOPBACK_NONE),
    00273                 iLocalId(NULL),
    00274                 iLocalIdSize(0),
    00275                 iRemoteId(NULL),
    00276                 iRemoteIdSize(0) {}
    00277
    00289         PV2WayConnectOptions(TPVLoopbackMode aLoopbackMode,
    00290                              uint8* aLocalId, uint32 aLocalIdSize,
    00291                              uint8* aRemoteId, uint32 aRemoteIdSize)
    00292                 : iLoopbackMode(aLoopbackMode),
    00293                 iLocalId(aLocalId),
    00294                 iLocalIdSize(aLocalIdSize),
    00295                 iRemoteId(aRemoteId),
    00296                 iRemoteIdSize(aRemoteIdSize)
    00297         {}
    00298
    00307         virtual void GetConnectInfoClassName(OSCL_wString &aClassName) = 0;
    00308
    00312         TPVLoopbackMode iLoopbackMode;
    00313
    00317         uint8* iLocalId;
    00321         uint32 iLocalIdSize;
    00322
    00326         uint8* iRemoteId;
    00330         uint32 iRemoteIdSize;
    00331 };
    00332 #endif