/usr/include/sipxtapi/ptapi/PtComponentGroup.h is in libsipxtapi-dev 3.3.0~test17-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | //
// Copyright (C) 2004-2006 SIPfoundry Inc.
// Licensed by SIPfoundry under the LGPL license.
//
// Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
// Licensed to SIPfoundry under a Contributor Agreement.
//
// $$
///////////////////////////////////////////////////////////////////////////////
#ifndef _PtComponentGroup_h_
#define _PtComponentGroup_h_
// SYSTEM INCLUDES
// APPLICATION INCLUDES
#include "tao/TaoClientTask.h"
#include "os/OsBSem.h"
#include "os/OsProtectEventMgr.h"
// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS
class PtComponent;
class TaoReference;
class TaoObjectMap;
//:PtComponentGroup is a grouping of Component objects. Terminals may be
// composed of zero or more ComponentGroups. Applications query the
// PhoneTerminal interface for the available ComponentGroups. Then they query
// this interface for the components which make up this component group.
class PtComponentGroup
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:
enum PtComponentGroupType
{
HEAD_SET = 1,
HAND_SET,
SPEAKER_PHONE,
PHONE_SET,
RINGER,
EXTERNAL_SPEAKER,
SOUND, // for splash sound
OTHER
};
/* ============================ CREATORS ================================== */
PtComponentGroup(int groupType, const UtlString& rDescription,
PtComponent* pComponents[], int nItems);
//:Constructor
PtComponentGroup();
//:Default constructor (not implemented for this class)
PtComponentGroup(const PtComponentGroup& rPtComponentGroup);
//:Copy constructor (not implemented for this class)
PtComponentGroup& operator=(const PtComponentGroup& rhs);
//:Assignment operator (not implemented for this class)
virtual
~PtComponentGroup();
//:Destructor
/* ============================ MANIPULATORS ============================== */
PtStatus setHandsetVolume(int level);
PtStatus setSpeakerVolume(int level);
PtStatus setExtSpeakerVolume(int level);
PtStatus setRingerVolume(int level);
UtlBoolean activate(void);
//:Enables the audio apparatus associated with the component group.
// Returns TRUE if successful, FALSE if unsuccessful
UtlBoolean deactivate(void);
//:Disables the audio apparatus associated with the component group.
// Returns TRUE if successful, FALSE if unsuccessful
void setTaoClient(TaoClientTask *pClient);
/* ============================ ACCESSORS ================================= */
PtStatus getComponents(PtComponent* pComponents[], int size,
int& nItems);
//:Returns pointers to the components in this group.
// The caller provides an array that can hold up to <i>size</i>
// PsTaoComponent pointers. This method fills in the <i>pComponents</i>
// array with up to <i>size</i> pointers. The actual number of items
// filled in is passed back via the <i>nItems</i> argument.
// Returns OS_LIMIT_REACHED if there are more than <i>nItems</i>
// components in the group. Otherwise, returns OS_SUCCESS.
PtStatus getDescription(char* pDescription, int maxLen);
//:Returns a string describing the component group.
int getType() { return mGroupType;} ;
//:Returns the type of the component group, either HEAD_SET, HAND_SET,
//:SPEAKER_PHONE, PHONE_SET or OTHER.
PtStatus getHandsetVolume(int& level);
PtStatus getSpeakerVolume(int& level);
PtStatus getSpeakerNominalVolume(int& level);
PtStatus getExtSpeakerVolume(int& level);
PtStatus getExtSpeakerNominalVolume(int& level);
PtStatus getRingerVolume(int& level);
/* ============================ INQUIRY =================================== */
UtlBoolean isActivated(void);
//:Determine whether the audio apparatus associated with the component
//:group is enabled.
// Returns TRUE if activated, FALSE if deactivated.
/* //////////////////////////// PROTECTED ///////////////////////////////// */
friend class PtTerminal;
protected:
OsTime mTimeOut;
void initialize();
/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:
OsProtectEventMgr *mpEventMgr;
PtComponent** mpComponents;
UtlString mDescription;
int mGroupType;
UtlBoolean mIsActivated;
int mNumItems;
TaoClientTask *mpClient;
static OsBSem semInit ;
//: Binary Semaphore used to guard initialiation and tear down
static TaoReference *mpTransactionCnt;
static int mRef;
int mComponentRef;
};
/* ============================ INLINE METHODS ============================ */
#endif // _PtComponentGroup_h_
|