This file is indexed.

/usr/include/gloox/pubsubresulthandler.h is in libgloox-dev 1.0.9-2.

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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
/*
  Copyright (c) 2007-2013 by Jakob Schroeter <js@camaya.net>
  This file is part of the gloox library. http://camaya.net/gloox

  This software is distributed under a license. The full license
  agreement can be found in the file LICENSE in this distribution.
  This software may not be copied, modified, sold or distributed
  other than expressed in the named license agreement.

  This software is distributed without any warranty.
*/

#ifndef PUBSUBRESULTHANDLER_H__
#define PUBSUBRESULTHANDLER_H__

#include "error.h"
#include "jid.h"
#include "macros.h"
#include "pubsub.h"
#include "tag.h"

#include <string>
#include <list>
#include <map>

namespace gloox
{

  class Tag;
  class Error;
  class DataForm;

  namespace PubSub
  {
    /**
     * @brief A virtual interface to receive item related requests results.
     *
     * Derive from this interface and pass it to item related requests.
     *
     * As a general rule, methods receive an Error pointer which will be null
     * (when the request was successful) or describe the problem. Requests
     * asking for information will have their "pointer to information" set to
     * null when an error occured (that is they're mutually exclusive). In both
     * cases, gloox takes care of deleting these objects.
     *
     * @author Vincent Thomasset <vthomasset@gmail.com>
     * @since 1.0
     */
    class GLOOX_API ResultHandler
    {
      public:
        /**
         * Virtual destructor.
         */
        virtual ~ResultHandler() {}

        /**
         * Receives the payload for an item.
         *
         * @param service Service hosting the queried node.
         * @param node ID of the parent node.
         * @param entry The complete item Tag (do not delete).
         */
        virtual void handleItem( const JID& service,
                                 const std::string& node,
                                 const Tag* entry ) = 0;

        /**
         * Receives the list of Items for a node.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the queried node.
         * @param node ID of the queried node (empty for the root node).
         * @param itemList List of contained items.
         * @param error Describes the error case if the request failed.
         *
         * @see Manager::requestItems()
         */
        virtual void handleItems( const std::string& id,
                                  const JID& service,
                                  const std::string& node,
                                  const ItemList& itemList,
                                  const Error* error = 0 ) = 0;

        /**
         * Receives the result for an item publication.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the queried node.
         * @param node ID of the queried node. If empty, the root node has been queried.
         * @param itemList List of contained items.
         * @param error Describes the error case if the request failed.
         *
         * @see Manager::publishItem
         */
        virtual void handleItemPublication( const std::string& id,
                                            const JID& service,
                                            const std::string& node,
                                            const ItemList& itemList,
                                            const Error* error = 0 ) = 0;

        /**
         * Receives the result of an item removal.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the queried node.
         * @param node ID of the queried node. If empty, the root node has been queried.
         * @param itemList List of contained items.
         * @param error Describes the error case if the request failed.
         *
         * @see Manager::deleteItem
         */
        virtual void handleItemDeletion( const std::string& id,
                                         const JID& service,
                                         const std::string& node,
                                         const ItemList& itemList,
                                         const Error* error = 0 ) = 0;

        /**
         * Receives the subscription results. In case a problem occured, the
         * Subscription ID and SubscriptionType becomes irrelevant.
         *
         * @param id The reply IQ's id.
         * @param service PubSub service asked for subscription.
         * @param node Node asked for subscription.
         * @param sid Subscription ID.
         * @param jid Subscribed entity.
         * @param subType Type of the subscription.
         * @param error Subscription Error.
         *
         * @see Manager::subscribe
         */
        virtual void handleSubscriptionResult( const std::string& id,
                                               const JID& service,
                                               const std::string& node,
                                               const std::string& sid,
                                               const JID& jid,
                                               const SubscriptionType subType,
                                               const Error* error = 0 ) = 0;

        /**
         * Receives the unsubscription results. In case a problem occured, the
         * subscription ID becomes irrelevant.
         *
         * @param id The reply IQ's id.
         * @param service PubSub service.
         * @param error Unsubscription Error.
         *
         * @see Manager::unsubscribe
         */
        virtual void handleUnsubscriptionResult( const std::string& id,
                                                 const JID& service,
                                                 const Error* error = 0 ) = 0;

        /**
         * Receives the subscription options for a node.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the queried node.
         * @param jid Subscribed entity.
         * @param node ID of the node.
         * @param options Options DataForm.
         * @param sid An optional subscription ID.
         * @param error Subscription options retrieval Error.
         *
         * @see Manager::getSubscriptionOptions
         */
        virtual void handleSubscriptionOptions( const std::string& id,
                                                const JID& service,
                                                const JID& jid,
                                                const std::string& node,
                                                const DataForm* options,
                                                const std::string& sid = EmptyString,
                                                const Error* error = 0 ) = 0;

        /**
         * Receives the result for a subscription options modification.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the queried node.
         * @param jid Subscribed entity.
         * @param node ID of the queried node.
         * @param sid An optional subscription ID.
         * @param error Subscription options modification Error.
         *
         * @see Manager::setSubscriptionOptions
         */
        virtual void handleSubscriptionOptionsResult( const std::string& id,
                                                      const JID& service,
                                                      const JID& jid,
                                                      const std::string& node,
                                                      const std::string& sid = EmptyString,
                                                      const Error* error = 0 ) = 0;


        /**
         * Receives the list of subscribers to a node.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the queried node.
         * @param list Subscriber list.
         * @param error Subscription options modification Error.
         *
         * @see Manager::getSubscribers
         */
        virtual void handleSubscribers( const std::string& id,
                                        const JID& service,
                                        const std::string& node,
                                        const SubscriberList* list,
                                        const Error* error = 0 ) = 0;

        /**
         * Receives the result of a subscriber list modification.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the queried node.
         * @param list Subscriber list.
         * @param error Subscriber list modification Error.
         *
         * @see Manager::setSubscribers
         */
        virtual void handleSubscribersResult( const std::string& id,
                                              const JID& service,
                                              const std::string& node,
                                              const SubscriberList* list,
                                              const Error* error = 0 ) = 0;

        /**
         * Receives the affiliate list for a node.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the queried node.
         * @param list Affiliation list.
         * @param error Affiliation list retrieval Error.
         *
         * @see Manager::getAffiliations
         */
        virtual void handleAffiliates( const std::string& id,
                                       const JID& service,
                                       const std::string& node,
                                       const AffiliateList* list,
                                       const Error* error = 0 ) = 0;

        /**
         * Handle the affiliate list for a specific node.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the node.
         * @param list The Affiliate list.
         * @param error Affiliation list modification Error.
         *
         * @see Manager::setAffiliations
         */
        virtual void handleAffiliatesResult( const std::string& id,
                                             const JID& service,
                                             const std::string& node,
                                             const AffiliateList* list,
                                             const Error* error = 0 ) = 0;


        /**
         * Receives the configuration for a specific node.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the node.
         * @param config Configuration DataForm.
         * @param error Configuration retrieval Error.
         *
         * @see Manager::getNodeConfig
         */
        virtual void handleNodeConfig( const std::string& id,
                                       const JID& service,
                                       const std::string& node,
                                       const DataForm* config,
                                       const Error* error = 0 ) = 0;

        /**
         * Receives the result of a node's configuration modification.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the node.
         * @param error Configuration modification Error.
         *
         * @see Manager::setNodeConfig
         */
        virtual void handleNodeConfigResult( const std::string& id,
                                             const JID& service,
                                             const std::string& node,
                                             const Error* error = 0 ) = 0;

        /**
         * Receives the result of a node creation.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the node.
         * @param error Node creation Error.
         *
         * @see Manager::setNodeConfig
         */
        virtual void handleNodeCreation( const std::string& id,
                                         const JID& service,
                                         const std::string& node,
                                         const Error* error = 0 ) = 0;

        /**
         * Receives the result for a node removal.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the node.
         * @param error Node removal Error.
         *
         * @see Manager::deleteNode
         */
        virtual void handleNodeDeletion( const std::string& id,
                                         const JID& service,
                                         const std::string& node,
                                         const Error* error = 0 ) = 0;


        /**
         * Receives the result of a node purge request.
         *
         * @param id The reply IQ's id.
         * @param service Service hosting the node.
         * @param node ID of the node.
         * @param error Node purge Error.
         *
         * @see Manager::purgeNode
         */
        virtual void handleNodePurge( const std::string& id,
                                      const JID& service,
                                      const std::string& node,
                                      const Error* error = 0 ) = 0;

        /**
         * Receives the Subscription list for a specific service.
         *
         * @param id The reply IQ's id.
         * @param service The queried service.
         * @param subMap The map of node's subscription.
         * @param error Subscription list retrieval Error.
         *
         * @see Manager::getSubscriptions
         */
        virtual void handleSubscriptions( const std::string& id,
                                          const JID& service,
                                          const SubscriptionMap& subMap,
                                          const Error* error = 0) = 0;

        /**
         * Receives the Affiliation map for a specific service.
         *
         * @param id The reply IQ's id.
         * @param service The queried service.
         * @param affMap The map of node's affiliation.
         * @param error Affiliation list retrieval Error.
         *
         * @see Manager::getAffiliations
         */
        virtual void handleAffiliations( const std::string& id,
                                         const JID& service,
                                         const AffiliationMap& affMap,
                                         const Error* error = 0 ) = 0;

        /**
         * Receives the default configuration for a specific node type.
         *
         * @param id The reply IQ's id.
         * @param service The queried service.
         * @param config Configuration form for the node type.
         * @param error Default node config retrieval Error.
         *
         * @see Manager::getDefaultNodeConfig
         */
        virtual void handleDefaultNodeConfig( const std::string& id,
                                              const JID& service,
                                              const DataForm* config,
                                              const Error* error = 0 ) = 0;

    };

  }

}

#endif // PUBSUBRESULTHANDLER_H__