This file is indexed.

/usr/include/eXosip2/eX_subscribe.h is in libexosip2-dev 3.3.0-1.1ubuntu1.

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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/*
  eXosip - This is the eXtended osip library.
  Copyright (C) 2002,2003,2004,2005,2006,2007  Aymeric MOIZARD  - jack@atosc.org
  
  eXosip is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  
  eXosip is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/


#ifdef ENABLE_MPATROL
#include <mpatrol.h>
#endif

#ifndef __EX_SUBSCRIBE_H__
#define __EX_SUBSCRIBE_H__

#include <osipparser2/osip_parser.h>
#include <time.h>

#ifdef __cplusplus
extern "C"
{
#endif

/**
 * @file eX_subscribe.h
 * @brief eXosip subscribe request API
 *
 * This file provide the API needed to control SUBSCRIBE requests. You can
 * use it to:
 *
 * <ul>
 * <li>build SUBSCRIBE requests.</li>
 * <li>send SUBSCRIBE requests.</li>
 * <li>build SUBSCRIBE answers.</li>
 * <li>send SUBSCRIBE answers.</li>
 * </ul>
 */

/**
 * @defgroup eXosip2_subscribe eXosip2 SUBSCRIBE and outgoing subscriptions
 * @ingroup eXosip2_msg
 * @{
 */

  typedef enum eXosip_ss
  {
    EXOSIP_SUBCRSTATE_UNKNOWN,    /**< unknown subscription-state */
    EXOSIP_SUBCRSTATE_PENDING,    /**< pending subscription-state */
    EXOSIP_SUBCRSTATE_ACTIVE,     /**< active subscription-state */
    EXOSIP_SUBCRSTATE_TERMINATED  /**< terminated subscription-state */
  } eXosip_ss_t;

  typedef enum eXosip_ss_reason
  {
    DEACTIVATED,                 /**< deactivated for subscription-state */
    PROBATION,                   /**< probation for subscription-state */
    REJECTED,                    /**< rejected for subscription-state */
    TIMEOUT,                     /**< timeout for subscription-state */
    GIVEUP,                      /**< giveup for subscription-state */
    NORESOURCE                   /**< noresource for subscription-state */
  } eXosip_ss_reason_t;


  typedef enum eXosip_ss_status
  {
    EXOSIP_NOTIFY_UNKNOWN,   /**< unknown state for subscription */
    EXOSIP_NOTIFY_PENDING,   /**< subscription not yet accepted */
    EXOSIP_NOTIFY_ONLINE,    /**< online status */
    EXOSIP_NOTIFY_BUSY,      /**< busy status */
    EXOSIP_NOTIFY_BERIGHTBACK,
                             /**< be right back status */
    EXOSIP_NOTIFY_AWAY,      /**< away status */
    EXOSIP_NOTIFY_ONTHEPHONE,/**< on the phone status */
    EXOSIP_NOTIFY_OUTTOLUNCH,/**< out to lunch status */
    EXOSIP_NOTIFY_CLOSED     /**< closed status */
  } eXosip_ss_status_t;


#ifndef MINISIZE

/**
 * Build a default initial SUBSCRIBE request.
 * 
 * @param subscribe Pointer for the SIP request to build.
 * @param to        SIP url for callee.
 * @param from      SIP url for caller.
 * @param route     Route header for SUBSCRIBE. (optionnal)
 * @param event     Event header for SUBSCRIBE.
 * @param expires   Expires header for SUBSCRIBE.
 */
  int eXosip_subscribe_build_initial_request (osip_message_t ** subscribe,
                                              const char *to, const char *from,
                                              const char *route, const char *event,
                                              int expires);

/**
 * Send an initial SUBSCRIBE request.
 * 
 * @param subscribe          SIP SUBSCRIBE message to send.
 */
  int eXosip_subscribe_send_initial_request (osip_message_t * subscribe);

/**
 * Build a default new SUBSCRIBE message.
 * 
 * @param did      identifier of the subscription.
 * @param sub      Pointer for the SIP request to build.
 */
  int eXosip_subscribe_build_refresh_request (int did, osip_message_t ** sub);

/**
 * Send a new SUBSCRIBE request.
 * 
 * @param did          identifier of the subscription.
 * @param sub          SIP SUBSCRIBE message to send.
 */
  int eXosip_subscribe_send_refresh_request (int did, osip_message_t * sub);

/**
 * Remove outgoing subscription context.
 * 
 * @param did          identifier of the subscription.
 */
  int eXosip_subscribe_remove (int did);

/** @} */

/**
 * @defgroup eXosip2_notify eXosip2 SUBSCRIBE and incoming subscriptions
 * @ingroup eXosip2_msg
 * @{
 */

/**
 * Build answer for an SUBSCRIBE request.
 * 
 * @param tid             id of SUBSCRIBE transaction.
 * @param status          status for SIP answer to build.
 * @param answer          The SIP answer to build.
 */
  int eXosip_insubscription_build_answer (int tid, int status,
                                          osip_message_t ** answer);

/**
 * Send answer for an SUBSCRIBE request.
 * 
 * @param tid             id of SUBSCRIBE transaction.
 * @param status          status for SIP answer to send.
 * @param answer          The SIP answer to send. (default will be sent if NULL)
 */
  int eXosip_insubscription_send_answer (int tid, int status,
                                         osip_message_t * answer);

/**
 * Build a request within subscription.
 * 
 * @param did             id of incoming subscription.
 * @param method          request method to build.
 * @param request         The SIP request to build.
 */
  int eXosip_insubscription_build_request (int did, const char *method,
                                           osip_message_t ** request);

/**
 * Build a NOTIFY request within subscription.
 * 
 * @param did                  id of incoming subscription.
 * @param subscription_status  subscription status (pending, active, terminated)
 * @param subscription_reason  subscription reason
 * @param request              The SIP request to build.
 */
  int eXosip_insubscription_build_notify (int did, int subscription_status,
                                          int subscription_reason,
                                          osip_message_t ** request);

/**
 * Send a request within subscription.
 * 
 * @param did             id of incoming subscription.
 * @param request         The SIP request to send.
 */
  int eXosip_insubscription_send_request (int did, osip_message_t * request);

/**
 * Remove incoming subscription context.
 * 
 * @param did          identifier of the subscription.
 */
  int eXosip_insubscription_remove (int did);


#endif

/** @} */


#ifdef __cplusplus
}
#endif

#endif