This file is indexed.

/usr/include/thunderbird/nsIPushService.h is in thunderbird-dev 1:52.8.0-1~deb8u1.

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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIPushService.idl
 */

#ifndef __gen_nsIPushService_h__
#define __gen_nsIPushService_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#include "js/Value.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIPrincipal; /* forward declaration */


/* starting interface:    nsIPushSubscription */
#define NS_IPUSHSUBSCRIPTION_IID_STR "1de32d5c-ea88-4c9e-9626-b032bd87f415"

#define NS_IPUSHSUBSCRIPTION_IID \
  {0x1de32d5c, 0xea88, 0x4c9e, \
    { 0x96, 0x26, 0xb0, 0x32, 0xbd, 0x87, 0xf4, 0x15 }}

class NS_NO_VTABLE nsIPushSubscription : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHSUBSCRIPTION_IID)

  /* readonly attribute DOMString endpoint; */
  NS_IMETHOD GetEndpoint(nsAString & aEndpoint) = 0;

  /* readonly attribute long long pushCount; */
  NS_IMETHOD GetPushCount(int64_t *aPushCount) = 0;

  /* readonly attribute long long lastPush; */
  NS_IMETHOD GetLastPush(int64_t *aLastPush) = 0;

  /* readonly attribute long quota; */
  NS_IMETHOD GetQuota(int32_t *aQuota) = 0;

  /* readonly attribute bool isSystemSubscription; */
  NS_IMETHOD GetIsSystemSubscription(bool *aIsSystemSubscription) = 0;

  /* readonly attribute jsval p256dhPrivateKey; */
  NS_IMETHOD GetP256dhPrivateKey(JS::MutableHandleValue aP256dhPrivateKey) = 0;

  /* bool quotaApplies (); */
  NS_IMETHOD QuotaApplies(bool *_retval) = 0;

  /* bool isExpired (); */
  NS_IMETHOD IsExpired(bool *_retval) = 0;

  /* void getKey (in DOMString name, [optional] out uint32_t keyLen, [array, size_is (keyLen), retval] out uint8_t key); */
  NS_IMETHOD GetKey(const nsAString & name, uint32_t *keyLen, uint8_t **key) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushSubscription, NS_IPUSHSUBSCRIPTION_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHSUBSCRIPTION \
  NS_IMETHOD GetEndpoint(nsAString & aEndpoint) override; \
  NS_IMETHOD GetPushCount(int64_t *aPushCount) override; \
  NS_IMETHOD GetLastPush(int64_t *aLastPush) override; \
  NS_IMETHOD GetQuota(int32_t *aQuota) override; \
  NS_IMETHOD GetIsSystemSubscription(bool *aIsSystemSubscription) override; \
  NS_IMETHOD GetP256dhPrivateKey(JS::MutableHandleValue aP256dhPrivateKey) override; \
  NS_IMETHOD QuotaApplies(bool *_retval) override; \
  NS_IMETHOD IsExpired(bool *_retval) override; \
  NS_IMETHOD GetKey(const nsAString & name, uint32_t *keyLen, uint8_t **key) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPUSHSUBSCRIPTION \
  NS_METHOD GetEndpoint(nsAString & aEndpoint); \
  NS_METHOD GetPushCount(int64_t *aPushCount); \
  NS_METHOD GetLastPush(int64_t *aLastPush); \
  NS_METHOD GetQuota(int32_t *aQuota); \
  NS_METHOD GetIsSystemSubscription(bool *aIsSystemSubscription); \
  NS_METHOD GetP256dhPrivateKey(JS::MutableHandleValue aP256dhPrivateKey); \
  NS_METHOD QuotaApplies(bool *_retval); \
  NS_METHOD IsExpired(bool *_retval); \
  NS_METHOD GetKey(const nsAString & name, uint32_t *keyLen, uint8_t **key); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHSUBSCRIPTION(_to) \
  NS_IMETHOD GetEndpoint(nsAString & aEndpoint) override { return _to GetEndpoint(aEndpoint); } \
  NS_IMETHOD GetPushCount(int64_t *aPushCount) override { return _to GetPushCount(aPushCount); } \
  NS_IMETHOD GetLastPush(int64_t *aLastPush) override { return _to GetLastPush(aLastPush); } \
  NS_IMETHOD GetQuota(int32_t *aQuota) override { return _to GetQuota(aQuota); } \
  NS_IMETHOD GetIsSystemSubscription(bool *aIsSystemSubscription) override { return _to GetIsSystemSubscription(aIsSystemSubscription); } \
  NS_IMETHOD GetP256dhPrivateKey(JS::MutableHandleValue aP256dhPrivateKey) override { return _to GetP256dhPrivateKey(aP256dhPrivateKey); } \
  NS_IMETHOD QuotaApplies(bool *_retval) override { return _to QuotaApplies(_retval); } \
  NS_IMETHOD IsExpired(bool *_retval) override { return _to IsExpired(_retval); } \
  NS_IMETHOD GetKey(const nsAString & name, uint32_t *keyLen, uint8_t **key) override { return _to GetKey(name, keyLen, key); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHSUBSCRIPTION(_to) \
  NS_IMETHOD GetEndpoint(nsAString & aEndpoint) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndpoint(aEndpoint); } \
  NS_IMETHOD GetPushCount(int64_t *aPushCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPushCount(aPushCount); } \
  NS_IMETHOD GetLastPush(int64_t *aLastPush) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastPush(aLastPush); } \
  NS_IMETHOD GetQuota(int32_t *aQuota) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetQuota(aQuota); } \
  NS_IMETHOD GetIsSystemSubscription(bool *aIsSystemSubscription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSystemSubscription(aIsSystemSubscription); } \
  NS_IMETHOD GetP256dhPrivateKey(JS::MutableHandleValue aP256dhPrivateKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetP256dhPrivateKey(aP256dhPrivateKey); } \
  NS_IMETHOD QuotaApplies(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->QuotaApplies(_retval); } \
  NS_IMETHOD IsExpired(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsExpired(_retval); } \
  NS_IMETHOD GetKey(const nsAString & name, uint32_t *keyLen, uint8_t **key) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKey(name, keyLen, key); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsPushSubscription : public nsIPushSubscription
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHSUBSCRIPTION

  nsPushSubscription();

private:
  ~nsPushSubscription();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushSubscription, nsIPushSubscription)

nsPushSubscription::nsPushSubscription()
{
  /* member initializers and constructor code */
}

nsPushSubscription::~nsPushSubscription()
{
  /* destructor code */
}

/* readonly attribute DOMString endpoint; */
NS_IMETHODIMP nsPushSubscription::GetEndpoint(nsAString & aEndpoint)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute long long pushCount; */
NS_IMETHODIMP nsPushSubscription::GetPushCount(int64_t *aPushCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute long long lastPush; */
NS_IMETHODIMP nsPushSubscription::GetLastPush(int64_t *aLastPush)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute long quota; */
NS_IMETHODIMP nsPushSubscription::GetQuota(int32_t *aQuota)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute bool isSystemSubscription; */
NS_IMETHODIMP nsPushSubscription::GetIsSystemSubscription(bool *aIsSystemSubscription)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute jsval p256dhPrivateKey; */
NS_IMETHODIMP nsPushSubscription::GetP256dhPrivateKey(JS::MutableHandleValue aP256dhPrivateKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* bool quotaApplies (); */
NS_IMETHODIMP nsPushSubscription::QuotaApplies(bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* bool isExpired (); */
NS_IMETHODIMP nsPushSubscription::IsExpired(bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getKey (in DOMString name, [optional] out uint32_t keyLen, [array, size_is (keyLen), retval] out uint8_t key); */
NS_IMETHODIMP nsPushSubscription::GetKey(const nsAString & name, uint32_t *keyLen, uint8_t **key)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsIPushSubscriptionCallback */
#define NS_IPUSHSUBSCRIPTIONCALLBACK_IID_STR "1799c074-9d52-46b0-ab3c-c09790732f6f"

#define NS_IPUSHSUBSCRIPTIONCALLBACK_IID \
  {0x1799c074, 0x9d52, 0x46b0, \
    { 0xab, 0x3c, 0xc0, 0x97, 0x90, 0x73, 0x2f, 0x6f }}

class NS_NO_VTABLE nsIPushSubscriptionCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHSUBSCRIPTIONCALLBACK_IID)

  /* void onPushSubscription (in nsresult status, in nsIPushSubscription subscription); */
  NS_IMETHOD OnPushSubscription(nsresult status, nsIPushSubscription *subscription) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushSubscriptionCallback, NS_IPUSHSUBSCRIPTIONCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHSUBSCRIPTIONCALLBACK \
  NS_IMETHOD OnPushSubscription(nsresult status, nsIPushSubscription *subscription) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPUSHSUBSCRIPTIONCALLBACK \
  NS_METHOD OnPushSubscription(nsresult status, nsIPushSubscription *subscription); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHSUBSCRIPTIONCALLBACK(_to) \
  NS_IMETHOD OnPushSubscription(nsresult status, nsIPushSubscription *subscription) override { return _to OnPushSubscription(status, subscription); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHSUBSCRIPTIONCALLBACK(_to) \
  NS_IMETHOD OnPushSubscription(nsresult status, nsIPushSubscription *subscription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPushSubscription(status, subscription); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsPushSubscriptionCallback : public nsIPushSubscriptionCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHSUBSCRIPTIONCALLBACK

  nsPushSubscriptionCallback();

private:
  ~nsPushSubscriptionCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushSubscriptionCallback, nsIPushSubscriptionCallback)

nsPushSubscriptionCallback::nsPushSubscriptionCallback()
{
  /* member initializers and constructor code */
}

nsPushSubscriptionCallback::~nsPushSubscriptionCallback()
{
  /* destructor code */
}

/* void onPushSubscription (in nsresult status, in nsIPushSubscription subscription); */
NS_IMETHODIMP nsPushSubscriptionCallback::OnPushSubscription(nsresult status, nsIPushSubscription *subscription)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsIUnsubscribeResultCallback */
#define NS_IUNSUBSCRIBERESULTCALLBACK_IID_STR "d574118f-61a9-4270-b1f6-4461aa85c4f5"

#define NS_IUNSUBSCRIBERESULTCALLBACK_IID \
  {0xd574118f, 0x61a9, 0x4270, \
    { 0xb1, 0xf6, 0x44, 0x61, 0xaa, 0x85, 0xc4, 0xf5 }}

class NS_NO_VTABLE nsIUnsubscribeResultCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUNSUBSCRIBERESULTCALLBACK_IID)

  /* void onUnsubscribe (in nsresult status, in bool success); */
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIUnsubscribeResultCallback, NS_IUNSUBSCRIBERESULTCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIUNSUBSCRIBERESULTCALLBACK \
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIUNSUBSCRIBERESULTCALLBACK \
  NS_METHOD OnUnsubscribe(nsresult status, bool success); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIUNSUBSCRIBERESULTCALLBACK(_to) \
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) override { return _to OnUnsubscribe(status, success); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIUNSUBSCRIBERESULTCALLBACK(_to) \
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnsubscribe(status, success); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsUnsubscribeResultCallback : public nsIUnsubscribeResultCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIUNSUBSCRIBERESULTCALLBACK

  nsUnsubscribeResultCallback();

private:
  ~nsUnsubscribeResultCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsUnsubscribeResultCallback, nsIUnsubscribeResultCallback)

nsUnsubscribeResultCallback::nsUnsubscribeResultCallback()
{
  /* member initializers and constructor code */
}

nsUnsubscribeResultCallback::~nsUnsubscribeResultCallback()
{
  /* destructor code */
}

/* void onUnsubscribe (in nsresult status, in bool success); */
NS_IMETHODIMP nsUnsubscribeResultCallback::OnUnsubscribe(nsresult status, bool success)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsIPushClearResultCallback */
#define NS_IPUSHCLEARRESULTCALLBACK_IID_STR "bd47b38e-8bfa-4f92-834e-832a4431e05e"

#define NS_IPUSHCLEARRESULTCALLBACK_IID \
  {0xbd47b38e, 0x8bfa, 0x4f92, \
    { 0x83, 0x4e, 0x83, 0x2a, 0x44, 0x31, 0xe0, 0x5e }}

class NS_NO_VTABLE nsIPushClearResultCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHCLEARRESULTCALLBACK_IID)

  /* void onClear (in nsresult status); */
  NS_IMETHOD OnClear(nsresult status) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushClearResultCallback, NS_IPUSHCLEARRESULTCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHCLEARRESULTCALLBACK \
  NS_IMETHOD OnClear(nsresult status) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPUSHCLEARRESULTCALLBACK \
  NS_METHOD OnClear(nsresult status); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHCLEARRESULTCALLBACK(_to) \
  NS_IMETHOD OnClear(nsresult status) override { return _to OnClear(status); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHCLEARRESULTCALLBACK(_to) \
  NS_IMETHOD OnClear(nsresult status) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnClear(status); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsPushClearResultCallback : public nsIPushClearResultCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHCLEARRESULTCALLBACK

  nsPushClearResultCallback();

private:
  ~nsPushClearResultCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushClearResultCallback, nsIPushClearResultCallback)

nsPushClearResultCallback::nsPushClearResultCallback()
{
  /* member initializers and constructor code */
}

nsPushClearResultCallback::~nsPushClearResultCallback()
{
  /* destructor code */
}

/* void onClear (in nsresult status); */
NS_IMETHODIMP nsPushClearResultCallback::OnClear(nsresult status)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsIPushService */
#define NS_IPUSHSERVICE_IID_STR "678ef584-bf25-47aa-ac84-03efc0865b68"

#define NS_IPUSHSERVICE_IID \
  {0x678ef584, 0xbf25, 0x47aa, \
    { 0xac, 0x84, 0x03, 0xef, 0xc0, 0x86, 0x5b, 0x68 }}

class NS_NO_VTABLE nsIPushService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHSERVICE_IID)

  /* readonly attribute DOMString pushTopic; */
  NS_IMETHOD GetPushTopic(nsAString & aPushTopic) = 0;

  /* readonly attribute DOMString subscriptionChangeTopic; */
  NS_IMETHOD GetSubscriptionChangeTopic(nsAString & aSubscriptionChangeTopic) = 0;

  /* readonly attribute DOMString subscriptionModifiedTopic; */
  NS_IMETHOD GetSubscriptionModifiedTopic(nsAString & aSubscriptionModifiedTopic) = 0;

  /* void subscribe (in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback); */
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) = 0;

  /* void subscribeWithKey (in DOMString scope, in nsIPrincipal principal, in uint32_t keyLength, [array, size_is (keyLength), const] in uint8_t key, in nsIPushSubscriptionCallback callback); */
  NS_IMETHOD SubscribeWithKey(const nsAString & scope, nsIPrincipal *principal, uint32_t keyLength, const uint8_t *key, nsIPushSubscriptionCallback *callback) = 0;

  /* void unsubscribe (in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback); */
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) = 0;

  /* void getSubscription (in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback); */
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) = 0;

  /* void clearForDomain (in DOMString domain, in nsIPushClearResultCallback callback); */
  NS_IMETHOD ClearForDomain(const nsAString & domain, nsIPushClearResultCallback *callback) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushService, NS_IPUSHSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHSERVICE \
  NS_IMETHOD GetPushTopic(nsAString & aPushTopic) override; \
  NS_IMETHOD GetSubscriptionChangeTopic(nsAString & aSubscriptionChangeTopic) override; \
  NS_IMETHOD GetSubscriptionModifiedTopic(nsAString & aSubscriptionModifiedTopic) override; \
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) override; \
  NS_IMETHOD SubscribeWithKey(const nsAString & scope, nsIPrincipal *principal, uint32_t keyLength, const uint8_t *key, nsIPushSubscriptionCallback *callback) override; \
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) override; \
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) override; \
  NS_IMETHOD ClearForDomain(const nsAString & domain, nsIPushClearResultCallback *callback) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPUSHSERVICE \
  NS_METHOD GetPushTopic(nsAString & aPushTopic); \
  NS_METHOD GetSubscriptionChangeTopic(nsAString & aSubscriptionChangeTopic); \
  NS_METHOD GetSubscriptionModifiedTopic(nsAString & aSubscriptionModifiedTopic); \
  NS_METHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback); \
  NS_METHOD SubscribeWithKey(const nsAString & scope, nsIPrincipal *principal, uint32_t keyLength, const uint8_t *key, nsIPushSubscriptionCallback *callback); \
  NS_METHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback); \
  NS_METHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback); \
  NS_METHOD ClearForDomain(const nsAString & domain, nsIPushClearResultCallback *callback); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHSERVICE(_to) \
  NS_IMETHOD GetPushTopic(nsAString & aPushTopic) override { return _to GetPushTopic(aPushTopic); } \
  NS_IMETHOD GetSubscriptionChangeTopic(nsAString & aSubscriptionChangeTopic) override { return _to GetSubscriptionChangeTopic(aSubscriptionChangeTopic); } \
  NS_IMETHOD GetSubscriptionModifiedTopic(nsAString & aSubscriptionModifiedTopic) override { return _to GetSubscriptionModifiedTopic(aSubscriptionModifiedTopic); } \
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) override { return _to Subscribe(scope, principal, callback); } \
  NS_IMETHOD SubscribeWithKey(const nsAString & scope, nsIPrincipal *principal, uint32_t keyLength, const uint8_t *key, nsIPushSubscriptionCallback *callback) override { return _to SubscribeWithKey(scope, principal, keyLength, key, callback); } \
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) override { return _to Unsubscribe(scope, principal, callback); } \
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) override { return _to GetSubscription(scope, principal, callback); } \
  NS_IMETHOD ClearForDomain(const nsAString & domain, nsIPushClearResultCallback *callback) override { return _to ClearForDomain(domain, callback); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHSERVICE(_to) \
  NS_IMETHOD GetPushTopic(nsAString & aPushTopic) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPushTopic(aPushTopic); } \
  NS_IMETHOD GetSubscriptionChangeTopic(nsAString & aSubscriptionChangeTopic) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubscriptionChangeTopic(aSubscriptionChangeTopic); } \
  NS_IMETHOD GetSubscriptionModifiedTopic(nsAString & aSubscriptionModifiedTopic) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubscriptionModifiedTopic(aSubscriptionModifiedTopic); } \
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Subscribe(scope, principal, callback); } \
  NS_IMETHOD SubscribeWithKey(const nsAString & scope, nsIPrincipal *principal, uint32_t keyLength, const uint8_t *key, nsIPushSubscriptionCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SubscribeWithKey(scope, principal, keyLength, key, callback); } \
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Unsubscribe(scope, principal, callback); } \
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubscription(scope, principal, callback); } \
  NS_IMETHOD ClearForDomain(const nsAString & domain, nsIPushClearResultCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearForDomain(domain, callback); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsPushService : public nsIPushService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHSERVICE

  nsPushService();

private:
  ~nsPushService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushService, nsIPushService)

nsPushService::nsPushService()
{
  /* member initializers and constructor code */
}

nsPushService::~nsPushService()
{
  /* destructor code */
}

/* readonly attribute DOMString pushTopic; */
NS_IMETHODIMP nsPushService::GetPushTopic(nsAString & aPushTopic)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute DOMString subscriptionChangeTopic; */
NS_IMETHODIMP nsPushService::GetSubscriptionChangeTopic(nsAString & aSubscriptionChangeTopic)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute DOMString subscriptionModifiedTopic; */
NS_IMETHODIMP nsPushService::GetSubscriptionModifiedTopic(nsAString & aSubscriptionModifiedTopic)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void subscribe (in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback); */
NS_IMETHODIMP nsPushService::Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void subscribeWithKey (in DOMString scope, in nsIPrincipal principal, in uint32_t keyLength, [array, size_is (keyLength), const] in uint8_t key, in nsIPushSubscriptionCallback callback); */
NS_IMETHODIMP nsPushService::SubscribeWithKey(const nsAString & scope, nsIPrincipal *principal, uint32_t keyLength, const uint8_t *key, nsIPushSubscriptionCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void unsubscribe (in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback); */
NS_IMETHODIMP nsPushService::Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getSubscription (in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback); */
NS_IMETHODIMP nsPushService::GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushSubscriptionCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void clearForDomain (in DOMString domain, in nsIPushClearResultCallback callback); */
NS_IMETHODIMP nsPushService::ClearForDomain(const nsAString & domain, nsIPushClearResultCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsIPushQuotaManager */
#define NS_IPUSHQUOTAMANAGER_IID_STR "a2555e70-46f8-4b52-bf02-d978b979d143"

#define NS_IPUSHQUOTAMANAGER_IID \
  {0xa2555e70, 0x46f8, 0x4b52, \
    { 0xbf, 0x02, 0xd9, 0x78, 0xb9, 0x79, 0xd1, 0x43 }}

class NS_NO_VTABLE nsIPushQuotaManager : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHQUOTAMANAGER_IID)

  /* void notificationForOriginShown (in string origin); */
  NS_IMETHOD NotificationForOriginShown(const char * origin) = 0;

  /* void notificationForOriginClosed (in string origin); */
  NS_IMETHOD NotificationForOriginClosed(const char * origin) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushQuotaManager, NS_IPUSHQUOTAMANAGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHQUOTAMANAGER \
  NS_IMETHOD NotificationForOriginShown(const char * origin) override; \
  NS_IMETHOD NotificationForOriginClosed(const char * origin) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIPUSHQUOTAMANAGER \
  NS_METHOD NotificationForOriginShown(const char * origin); \
  NS_METHOD NotificationForOriginClosed(const char * origin); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHQUOTAMANAGER(_to) \
  NS_IMETHOD NotificationForOriginShown(const char * origin) override { return _to NotificationForOriginShown(origin); } \
  NS_IMETHOD NotificationForOriginClosed(const char * origin) override { return _to NotificationForOriginClosed(origin); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHQUOTAMANAGER(_to) \
  NS_IMETHOD NotificationForOriginShown(const char * origin) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotificationForOriginShown(origin); } \
  NS_IMETHOD NotificationForOriginClosed(const char * origin) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotificationForOriginClosed(origin); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsPushQuotaManager : public nsIPushQuotaManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHQUOTAMANAGER

  nsPushQuotaManager();

private:
  ~nsPushQuotaManager();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushQuotaManager, nsIPushQuotaManager)

nsPushQuotaManager::nsPushQuotaManager()
{
  /* member initializers and constructor code */
}

nsPushQuotaManager::~nsPushQuotaManager()
{
  /* destructor code */
}

/* void notificationForOriginShown (in string origin); */
NS_IMETHODIMP nsPushQuotaManager::NotificationForOriginShown(const char * origin)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notificationForOriginClosed (in string origin); */
NS_IMETHODIMP nsPushQuotaManager::NotificationForOriginClosed(const char * origin)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIPushService_h__ */