/usr/include/sipxtapi/net/SipNotifyStateTask.h is in libsipxtapi-dev 3.3.0~test17-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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | //
// 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 _SipNotifyStateTask_h_
#define _SipNotifyStateTask_h_
// SYSTEM INCLUDES
//#include <...>
// APPLICATION INCLUDES
#include <os/OsServerTask.h>
#include <os/OsDefs.h>
// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS
class SipUserAgent;
class SipMessage;
class CommandSecurityPolicy;
class OsQueuedEvent;
class OsTimer;
//:Class short description which may consist of multiple lines (note the ':')
// Class detailed description which may extend to multiple lines
class SipNotifyStateTask : public OsServerTask
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:
static void defaultReboot();
static void defaultBinaryMessageWaiting(const char* toUrl,
UtlBoolean newMessages);
static void defaultDetailMessageWaiting(const char* toUrl,
const char* messageMediaType,
UtlBoolean absoluteValues,
int totalNewMessages,
int totalOldMessages,
int totalUntouchedMessages,
int urgentUntouchedMessages,
int totalSkippedMessages,
int urgentSkippedMessages,
int totalFlaggedMessages,
int urgentFlaggedMessages,
int totalReadMessages,
int urgentReadMessages,
int totalAnsweredMessages,
int urgentAnsweredMessages,
int totalDeletedMessages,
int urgentDeletedMessages);
// totalNewMessages and totalOldMessages are summary totals
// accross all other categories.
//! param: messageMediaType = "Voicemail", "Email", "Fax", "Video", etc
//! param: absoluteValues - the message counts are absolute counts (TRUE) or deltas (FALSE)
// If these are absolute values negative number for a message count means unspecified
// If these are deltas there is know way to know if the values are not set
/* ============================ CREATORS ================================== */
SipNotifyStateTask(const UtlString& checkSyncPolicy, SipUserAgent* pSipUserAgent = NULL);
//:Default constructor
virtual
~SipNotifyStateTask();
//:Destructor
/* ============================ MANIPULATORS ============================== */
virtual UtlBoolean handleMessage(OsMsg& eventMessage);
/* ============================ ACCESSORS ================================= */
void setRebootFunction(void (*rebootNotifyFunction)());
void setBinaryMessageWaitingFunction(void (*binaryMessageWaitingFunc)(
const char* toUrl,
UtlBoolean newMessages));
void setDetailMessageWaitingFunction(void (*requestProcessor)(
const char* toUrl,
const char* messageMediaType,
UtlBoolean absoluteValues,
int totalNewMessages,
int totalOldMessages,
int totalUntouchedMessages,
int urgentUntouchedMessages,
int totalSkippedMessages,
int urgentSkippedMessages,
int totalFlaggedMessages,
int urgentFlaggedMessages,
int totalReadMessages,
int urgentReadMessages,
int totalAnsweredMessages,
int urgentAnsweredMessages,
int totalDeletedMessages,
int urgentDeletedMessages));
/* ============================ INQUIRY =================================== */
/* //////////////////////////// PROTECTED ///////////////////////////////// */
protected:
OsStatus handleCheckSyncEvent(const SipMessage* source) ;
UtlBoolean scheduleRunScript(UtlString* pContent,
CommandSecurityPolicy *pPolicy,
int seconds) ;
OsStatus doRunScript(UtlString* pContent,
CommandSecurityPolicy *pPolicy) ;
/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:
SipUserAgent* mpSipUserAgent;
UtlString mCheckSyncPolicy ; // policy for handling check-sync events
OsQueuedEvent* mpRunScriptEvent ; // queued event for scripts (if phone is busy)
OsTimer* mpRunScriptTimer ; // timer for scripts (if phone is busy)
void(*mpRebootFunction)();
void(*mpBinaryMessageWaitingFunction)(const char* toUrl,
UtlBoolean newMessages);
void(*mpDetailedMessageWaitingFunction)(
const char* toUrl,
const char* messageMediaType,
UtlBoolean absoluteValues,
int totalNewMessages,
int totalOldMessages,
int totalUntouchedMessages,
int urgentUntouchedMessages,
int totalSkippedMessages,
int urgentSkippedMessages,
int totalFlaggedMessages,
int urgentFlaggedMessages,
int totalReadMessages,
int urgentReadMessages,
int totalAnsweredMessages,
int urgentAnsweredMessages,
int totalDeletedMessages,
int urgentDeletedMessages);
UtlBoolean getStatusTotalUrgent(const char* status,
UtlBoolean absoluteValues,
int parameterIndex,
int& total,
int& urgent);
SipNotifyStateTask(const SipNotifyStateTask& rSipNotifyStateTask);
//:Copy constructor (disabled)
SipNotifyStateTask& operator=(const SipNotifyStateTask& rhs);
//:Assignment operator (disabled)
};
/* ============================ INLINE METHODS ============================ */
#endif // _SipNotifyStateTask_h_
|