This file is indexed.

/usr/include/sipxtapi/net/SipDialogMgr.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
//
// 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.
//
// $$
///////////////////////////////////////////////////////////////////////////////
// Author: Dan Petrie (dpetrie AT SIPez DOT com)

#ifndef _SipDialogMgr_h_
#define _SipDialogMgr_h_

// SYSTEM INCLUDES

// APPLICATION INCLUDES

#include <os/OsDefs.h>
#include <os/OsMutex.h>
#include <utl/UtlString.h>
#include <utl/UtlHashBag.h>

// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// FORWARD DECLARATIONS
class SipMessage;
class SipDialog;

// TYPEDEFS

//! Class for refreshing SIP subscriptions and registrations
/*! This is currently verified for SUBSCRIPTIONS ONLY.
 *  This class is intended to replace the SipRefreshMgr.
 *
 * \par 
 */
class SipDialogMgr
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:

/* ============================ CREATORS ================================== */

    //! Default Dialog constructor
    SipDialogMgr();


    //! Destructor
    virtual
    ~SipDialogMgr();


/* ============================ MANIPULATORS ============================== */

    //! Create a new dialog for the given SIP message
    UtlBoolean createDialog(const SipMessage& message, 
                            UtlBoolean messageIsFromLocalSide,
                            const char* dialogHandle = NULL);

    //! Update the dialog information for the given message
    /*! If a dialog matches this message update the dialog information
     *  otherwise if this message is part of an established dialog and 
     *  matches an early dialog change the dialog to established and 
     *  update the dialog information.
     */
    UtlBoolean updateDialog(const SipMessage& message, 
                            const char* dialogHandle = NULL);

    //! Delete the dialog for the given dialog handle
    UtlBoolean deleteDialog(const char* dialogHandle);


    //! Get the dialog related fields and set them in the given request
    /*! Increments the dialogs local Cseq as well.
     */
    UtlBoolean setNextLocalTransactionInfo(SipMessage& request,
                                           const char* method = NULL,
                                           const char* dialogHandle = NULL);

    /* ============================ ACCESSORS ================================= */

    //! Get the early dialog handle for the given established dialog handle
    /*! This works even if the SipDialog is an early dialog that has not yet 
     *  been updated to be an established dialog. */
    UtlBoolean getEarlyDialogHandleFor(const char* establishedDialogHandle, 
                                       UtlString& earlyDialogHandle);

    //! Get the established dialog for the given early dialog
    UtlBoolean getEstablishedDialogHandleFor(const char* earlyDialogHandle,
                                             UtlString& establishedDialogHandle);

    //! Get a count of the SipDialogs
    int countDialogs() const;

    //! Get dump string of dialogs
    int toString(UtlString& dumpString);

/* ============================ INQUIRY =================================== */

    //! Is there an early dialog that matches this early dialogHandle
    /*! If earlyDialogHandle is not an early dialog, no matches are
     * considered to exist.
     */
    UtlBoolean earlyDialogExists(const char* earlyDialogHandle);

    //! Is there an early dialog that matches this established dialogHandle
    /*! If establishedDialogHandle is not an established dialog, no matches are
     * considered to exist.
     */
    UtlBoolean earlyDialogExistsFor(const char* establishedDialogHandle);

    //! Is there a dialog that matches this dialogHandle
    /*! If the dialog handle is an early dialog, it will only match
     *  early dialogs.  If the dialog handle is an established dialog
     *  it will only match established dialogs.
     */
    UtlBoolean dialogExists(const char* dialogHandle);

    //! Checks to see if the given message matches the last local transaction
    UtlBoolean isLastLocalTransaction(const SipMessage& message, 
                                      const char* dialogHandle = NULL);

    //! Check if the message is part of a new remote transaction
    /*! The cseq of the message is greater than the last known cseq
     *  of the remote side of the dialog
     */
    UtlBoolean isNewRemoteTransaction(const SipMessage& sipMessage);

/* //////////////////////////// PROTECTED ///////////////////////////////// */
protected:

/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:
    //! Copy constructor NOT ALLOWED
    SipDialogMgr(const SipDialogMgr& rSipDialogMgr);

    //! Assignment operator NOT ALLOWED
    SipDialogMgr& operator=(const SipDialogMgr& rhs);

    //! Find a dialog that matches, optionally look for an early dialog if exact match does not exist
    /*! Checks tags in both directions
     */
    SipDialog* findDialog(UtlString& dialogHandle,
                          UtlBoolean ifHandleEstablishedFindEarlyDialog,
                          UtlBoolean ifHandleEarlyFindEstablishedDialog);

    //! Find a dialog that matches, optionally look for an early dialog if exact match does not exist
    /*! Checks tags in both directions
     */
    SipDialog* findDialog(UtlString& callId,
                          UtlString& localTag,
                          UtlString& remoteTag,
                          UtlBoolean ifHandleEstablishedFindEarlyDialog,
                          UtlBoolean ifHandleEarlyFindEstablishedDialog);

    //! lock for single thread use
    void lock();

    //! unlock for use
    void unlock();

    OsMutex mDialogMgrMutex;
    UtlHashBag mDialogs; 
};

/* ============================ INLINE METHODS ============================ */

#endif  // _SipDialogMgr_h_