/usr/include/sipxtapi/tao/TaoClientTask.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 | //
// 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 _TaoClient_h_
#define _TaoClient_h_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// SYSTEM INCLUDES
// APPLICATION INCLUDES
#include "os/OsServerTask.h"
#include "os/OsBSem.h"
#include "os/OsLock.h"
#include "tao/TaoMessage.h"
#include "tao/TaoServerTask.h"
#include "tao/TaoTransportAgent.h"
#include "TaoDefs.h" // Added by ClassView
// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS
class TaoListenerClientTask;
class TaoTransportTask;
class OsConnectionSocket;
class PtEventListener;
class PtConnectionListener;
class PtTerminalComponentListener;
class PtTerminalConnectionListener;
class PtCallListener;
class PtTerminalListener;
//:Used to build the call originating part, establishes connection with the server
// through the TaoTransport. Maintains a db of listeners the client has registered.
class TaoClientTask : public OsServerTask
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:
/* ============================ CREATORS ================================== */
TaoClientTask(int remotePort,
UtlString remoteHost,
TaoServerTask *pTaoServerTask = NULL,
const UtlString& name="TaoClientTask-%d",
const int maxRequestQMsgs=DEF_MAX_MSGS);
//:Constructor
TaoClientTask(TaoServerTask *pTaoServerTask = NULL,
const UtlString& name="TaoClientTask-%d",
void* pArg=NULL,
const int maxRequestQMsgs=DEF_MAX_MSGS,
const int priority=DEF_PRIO,
const int options=DEF_OPTIONS,
const int stackSize=DEF_STACKSIZE);
//:Constructor
TaoClientTask(const int maxIncomingQMsgs, TaoServerTask *pTaoServerTask = NULL);
//:Constructor
TaoClientTask(const TaoClientTask& rTaoClientTask);
//:Copy constructor (not implemented for this class)
virtual ~TaoClientTask();
/* ============================ MANIPULATORS ============================== */
virtual void requestShutdown(void);
int sendRequest(TaoMessage& rMsg, OsMutex* pMutex = 0, const OsTime& rTimeout=OsTime::OS_INFINITY);
virtual UtlBoolean handleMessage(OsMsg& rMsg);
//:Handle an incoming message.
// If the message is not one that the object is prepared to process,
// the handleMessage() method in the derived class should return FALSE
// which will cause the OsServerTask::handleMessage() method to be
// invoked on the message.
void addEventListener(PtEventListener* pListener, const char* callId = NULL);
void removeEventListener(PtEventListener& rListener);
int resetConnectionSocket(int transactionId);
/* ============================ ACCESSORS ================================ */
TaoObjHandle getEventServer() { return (TaoObjHandle) mpListenerTask; };
/* //////////////////////////// PRIVATE ////////////////////////////////// */
private:
friend class PtTerminal;
/* ============================ FUNCTIONS ================================ */
TaoStatus initInstance();
UtlBoolean receiveMsg(TaoMessage& rMsg);
int readUntilDone(OsConnectionSocket* pSocket, char *pBuf, int iLength) ;
//: read iLength bytes from passed socket (waiting until completion)
/* ============================ VARIABLES ================================ */
TaoListenerClientTask *mpListenerTask;
TaoTransportTask* mpTransport;
OsConnectionSocket* mpConnectionSocket;
int mRemotePort; // TaoServer's listener port
UtlString mRemoteHost; // remote TaoServer
OsRWMutex mMutex; // mutex for synchonizing access to data
TaoServerTask* mpTaoServerTask;
TaoTransportAgent* mpAgent;
private:
};
#endif // _TaoClient_h_
|