/usr/include/thunderbird/nsIPushNotifier.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 | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIPushNotifier.idl
*/
#ifndef __gen_nsIPushNotifier_h__
#define __gen_nsIPushNotifier_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
#define PUSHNOTIFIER_CONTRACTID \
"@mozilla.org/push/Notifier;1"
// These constants are duplicated in `PushComponents.js`.
#define OBSERVER_TOPIC_PUSH "push-message"
#define OBSERVER_TOPIC_SUBSCRIPTION_CHANGE "push-subscription-change"
#define OBSERVER_TOPIC_SUBSCRIPTION_MODIFIED "push-subscription-modified"
class nsIPrincipal; /* forward declaration */
/* starting interface: nsIPushNotifier */
#define NS_IPUSHNOTIFIER_IID_STR "b00dfdeb-14e5-425b-adc7-b531442e3216"
#define NS_IPUSHNOTIFIER_IID \
{0xb00dfdeb, 0x14e5, 0x425b, \
{ 0xad, 0xc7, 0xb5, 0x31, 0x44, 0x2e, 0x32, 0x16 }}
class NS_NO_VTABLE nsIPushNotifier : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHNOTIFIER_IID)
/* void notifyPush (in ACString scope, in nsIPrincipal principal, in DOMString messageId); */
NS_IMETHOD NotifyPush(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId) = 0;
/* void notifyPushWithData (in ACString scope, in nsIPrincipal principal, in DOMString messageId, [optional] in uint32_t dataLen, [array, size_is (dataLen)] in uint8_t data); */
NS_IMETHOD NotifyPushWithData(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId, uint32_t dataLen, uint8_t *data) = 0;
/* void notifySubscriptionChange (in ACString scope, in nsIPrincipal principal); */
NS_IMETHOD NotifySubscriptionChange(const nsACString & scope, nsIPrincipal *principal) = 0;
/* void notifySubscriptionModified (in ACString scope, in nsIPrincipal principal); */
NS_IMETHOD NotifySubscriptionModified(const nsACString & scope, nsIPrincipal *principal) = 0;
/* void notifyError (in ACString scope, in nsIPrincipal principal, in DOMString message, in uint32_t flags); */
NS_IMETHOD NotifyError(const nsACString & scope, nsIPrincipal *principal, const nsAString & message, uint32_t flags) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushNotifier, NS_IPUSHNOTIFIER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHNOTIFIER \
NS_IMETHOD NotifyPush(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId) override; \
NS_IMETHOD NotifyPushWithData(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId, uint32_t dataLen, uint8_t *data) override; \
NS_IMETHOD NotifySubscriptionChange(const nsACString & scope, nsIPrincipal *principal) override; \
NS_IMETHOD NotifySubscriptionModified(const nsACString & scope, nsIPrincipal *principal) override; \
NS_IMETHOD NotifyError(const nsACString & scope, nsIPrincipal *principal, const nsAString & message, uint32_t flags) 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_NSIPUSHNOTIFIER \
NS_METHOD NotifyPush(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId); \
NS_METHOD NotifyPushWithData(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId, uint32_t dataLen, uint8_t *data); \
NS_METHOD NotifySubscriptionChange(const nsACString & scope, nsIPrincipal *principal); \
NS_METHOD NotifySubscriptionModified(const nsACString & scope, nsIPrincipal *principal); \
NS_METHOD NotifyError(const nsACString & scope, nsIPrincipal *principal, const nsAString & message, uint32_t flags);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHNOTIFIER(_to) \
NS_IMETHOD NotifyPush(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId) override { return _to NotifyPush(scope, principal, messageId); } \
NS_IMETHOD NotifyPushWithData(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId, uint32_t dataLen, uint8_t *data) override { return _to NotifyPushWithData(scope, principal, messageId, dataLen, data); } \
NS_IMETHOD NotifySubscriptionChange(const nsACString & scope, nsIPrincipal *principal) override { return _to NotifySubscriptionChange(scope, principal); } \
NS_IMETHOD NotifySubscriptionModified(const nsACString & scope, nsIPrincipal *principal) override { return _to NotifySubscriptionModified(scope, principal); } \
NS_IMETHOD NotifyError(const nsACString & scope, nsIPrincipal *principal, const nsAString & message, uint32_t flags) override { return _to NotifyError(scope, principal, message, flags); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHNOTIFIER(_to) \
NS_IMETHOD NotifyPush(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyPush(scope, principal, messageId); } \
NS_IMETHOD NotifyPushWithData(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId, uint32_t dataLen, uint8_t *data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyPushWithData(scope, principal, messageId, dataLen, data); } \
NS_IMETHOD NotifySubscriptionChange(const nsACString & scope, nsIPrincipal *principal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifySubscriptionChange(scope, principal); } \
NS_IMETHOD NotifySubscriptionModified(const nsACString & scope, nsIPrincipal *principal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifySubscriptionModified(scope, principal); } \
NS_IMETHOD NotifyError(const nsACString & scope, nsIPrincipal *principal, const nsAString & message, uint32_t flags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyError(scope, principal, message, flags); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsPushNotifier : public nsIPushNotifier
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPUSHNOTIFIER
nsPushNotifier();
private:
~nsPushNotifier();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushNotifier, nsIPushNotifier)
nsPushNotifier::nsPushNotifier()
{
/* member initializers and constructor code */
}
nsPushNotifier::~nsPushNotifier()
{
/* destructor code */
}
/* void notifyPush (in ACString scope, in nsIPrincipal principal, in DOMString messageId); */
NS_IMETHODIMP nsPushNotifier::NotifyPush(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifyPushWithData (in ACString scope, in nsIPrincipal principal, in DOMString messageId, [optional] in uint32_t dataLen, [array, size_is (dataLen)] in uint8_t data); */
NS_IMETHODIMP nsPushNotifier::NotifyPushWithData(const nsACString & scope, nsIPrincipal *principal, const nsAString & messageId, uint32_t dataLen, uint8_t *data)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifySubscriptionChange (in ACString scope, in nsIPrincipal principal); */
NS_IMETHODIMP nsPushNotifier::NotifySubscriptionChange(const nsACString & scope, nsIPrincipal *principal)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifySubscriptionModified (in ACString scope, in nsIPrincipal principal); */
NS_IMETHODIMP nsPushNotifier::NotifySubscriptionModified(const nsACString & scope, nsIPrincipal *principal)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifyError (in ACString scope, in nsIPrincipal principal, in DOMString message, in uint32_t flags); */
NS_IMETHODIMP nsPushNotifier::NotifyError(const nsACString & scope, nsIPrincipal *principal, const nsAString & message, uint32_t flags)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIPushData */
#define NS_IPUSHDATA_IID_STR "dfc4f151-cead-40df-8eb7-7a7a67c54b16"
#define NS_IPUSHDATA_IID \
{0xdfc4f151, 0xcead, 0x40df, \
{ 0x8e, 0xb7, 0x7a, 0x7a, 0x67, 0xc5, 0x4b, 0x16 }}
class NS_NO_VTABLE nsIPushData : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHDATA_IID)
/* DOMString text (); */
NS_IMETHOD Text(nsAString & _retval) = 0;
/* [implicit_jscontext] jsval json (); */
NS_IMETHOD Json(JSContext* cx, JS::MutableHandleValue _retval) = 0;
/* void binary ([optional] out uint32_t dataLen, [array, size_is (dataLen), retval] out uint8_t data); */
NS_IMETHOD Binary(uint32_t *dataLen, uint8_t **data) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushData, NS_IPUSHDATA_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHDATA \
NS_IMETHOD Text(nsAString & _retval) override; \
NS_IMETHOD Json(JSContext* cx, JS::MutableHandleValue _retval) override; \
NS_IMETHOD Binary(uint32_t *dataLen, uint8_t **data) 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_NSIPUSHDATA \
NS_METHOD Text(nsAString & _retval); \
NS_METHOD Json(JSContext* cx, JS::MutableHandleValue _retval); \
NS_METHOD Binary(uint32_t *dataLen, uint8_t **data);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHDATA(_to) \
NS_IMETHOD Text(nsAString & _retval) override { return _to Text(_retval); } \
NS_IMETHOD Json(JSContext* cx, JS::MutableHandleValue _retval) override { return _to Json(cx, _retval); } \
NS_IMETHOD Binary(uint32_t *dataLen, uint8_t **data) override { return _to Binary(dataLen, data); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHDATA(_to) \
NS_IMETHOD Text(nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Text(_retval); } \
NS_IMETHOD Json(JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Json(cx, _retval); } \
NS_IMETHOD Binary(uint32_t *dataLen, uint8_t **data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Binary(dataLen, data); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsPushData : public nsIPushData
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPUSHDATA
nsPushData();
private:
~nsPushData();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushData, nsIPushData)
nsPushData::nsPushData()
{
/* member initializers and constructor code */
}
nsPushData::~nsPushData()
{
/* destructor code */
}
/* DOMString text (); */
NS_IMETHODIMP nsPushData::Text(nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [implicit_jscontext] jsval json (); */
NS_IMETHODIMP nsPushData::Json(JSContext* cx, JS::MutableHandleValue _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void binary ([optional] out uint32_t dataLen, [array, size_is (dataLen), retval] out uint8_t data); */
NS_IMETHODIMP nsPushData::Binary(uint32_t *dataLen, uint8_t **data)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIPushMessage */
#define NS_IPUSHMESSAGE_IID_STR "b9d063ca-0e3f-4fee-be4b-ea9103263433"
#define NS_IPUSHMESSAGE_IID \
{0xb9d063ca, 0x0e3f, 0x4fee, \
{ 0xbe, 0x4b, 0xea, 0x91, 0x03, 0x26, 0x34, 0x33 }}
class NS_NO_VTABLE nsIPushMessage : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHMESSAGE_IID)
/* readonly attribute nsIPrincipal principal; */
NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) = 0;
/* readonly attribute nsIPushData data; */
NS_IMETHOD GetData(nsIPushData * *aData) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushMessage, NS_IPUSHMESSAGE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHMESSAGE \
NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) override; \
NS_IMETHOD GetData(nsIPushData * *aData) 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_NSIPUSHMESSAGE \
NS_METHOD GetPrincipal(nsIPrincipal * *aPrincipal); \
NS_METHOD GetData(nsIPushData * *aData);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHMESSAGE(_to) \
NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) override { return _to GetPrincipal(aPrincipal); } \
NS_IMETHOD GetData(nsIPushData * *aData) override { return _to GetData(aData); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHMESSAGE(_to) \
NS_IMETHOD GetPrincipal(nsIPrincipal * *aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrincipal(aPrincipal); } \
NS_IMETHOD GetData(nsIPushData * *aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsPushMessage : public nsIPushMessage
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPUSHMESSAGE
nsPushMessage();
private:
~nsPushMessage();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushMessage, nsIPushMessage)
nsPushMessage::nsPushMessage()
{
/* member initializers and constructor code */
}
nsPushMessage::~nsPushMessage()
{
/* destructor code */
}
/* readonly attribute nsIPrincipal principal; */
NS_IMETHODIMP nsPushMessage::GetPrincipal(nsIPrincipal * *aPrincipal)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIPushData data; */
NS_IMETHODIMP nsPushMessage::GetData(nsIPushData * *aData)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIPushNotifier_h__ */
|