DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
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
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mozilla/netwerk/base/nsIBrowserSearchService.idl
 */

#ifndef __gen_nsIBrowserSearchService_h__
#define __gen_nsIBrowserSearchService_h__


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

#include "js/Value.h"

#include "js/GCAnnotations.h"

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

class nsIInputStream; /* forward declaration */


/* starting interface:    nsISearchSubmission */
#define NS_ISEARCHSUBMISSION_IID_STR "5799251f-5b55-4df7-a9e7-0c27812c469a"

#define NS_ISEARCHSUBMISSION_IID \
  {0x5799251f, 0x5b55, 0x4df7, \
    { 0xa9, 0xe7, 0x0c, 0x27, 0x81, 0x2c, 0x46, 0x9a }}

class NS_NO_VTABLE nsISearchSubmission : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHSUBMISSION_IID)

  /* readonly attribute nsIInputStream postData; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPostData(nsIInputStream **aPostData) = 0;

  /* readonly attribute nsIURI uri; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUri(nsIURI **aUri) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISearchSubmission, NS_ISEARCHSUBMISSION_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISEARCHSUBMISSION \
  NS_IMETHOD GetPostData(nsIInputStream **aPostData) override; \
  NS_IMETHOD GetUri(nsIURI **aUri) 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_NSISEARCHSUBMISSION \
  nsresult GetPostData(nsIInputStream **aPostData); \
  nsresult GetUri(nsIURI **aUri); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISEARCHSUBMISSION(_to) \
  NS_IMETHOD GetPostData(nsIInputStream **aPostData) override { return _to GetPostData(aPostData); } \
  NS_IMETHOD GetUri(nsIURI **aUri) override { return _to GetUri(aUri); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISEARCHSUBMISSION(_to) \
  NS_IMETHOD GetPostData(nsIInputStream **aPostData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPostData(aPostData); } \
  NS_IMETHOD GetUri(nsIURI **aUri) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUri(aUri); } 


/* starting interface:    nsISearchEngine */
#define NS_ISEARCHENGINE_IID_STR "620bd920-0491-48c8-99a8-d6047e64802d"

#define NS_ISEARCHENGINE_IID \
  {0x620bd920, 0x0491, 0x48c8, \
    { 0x99, 0xa8, 0xd6, 0x04, 0x7e, 0x64, 0x80, 0x2d }}

class NS_NO_VTABLE nsISearchEngine : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHENGINE_IID)

  /* nsISearchSubmission getSubmission (in AString data, [optional] in AString responseType, [optional] in AString purpose); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSubmission(const nsAString& data, const nsAString& responseType, const nsAString& purpose, nsISearchSubmission **_retval) = 0;

  /* void addParam (in AString name, in AString value, in AString responseType); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddParam(const nsAString& name, const nsAString& value, const nsAString& responseType) = 0;

  /* boolean supportsResponseType (in AString responseType); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SupportsResponseType(const nsAString& responseType, bool *_retval) = 0;

  /* AString getIconURLBySize (in long width, in long height); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIconURLBySize(int32_t width, int32_t height, nsAString& _retval) = 0;

  /* jsval getIcons (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIcons(JS::MutableHandleValue _retval) = 0;

  /* void speculativeConnect (in jsval options); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SpeculativeConnect(JS::HandleValue options) = 0;

  /* attribute AString alias; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAlias(nsAString& aAlias) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAlias(const nsAString& aAlias) = 0;

  /* readonly attribute AString description; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDescription(nsAString& aDescription) = 0;

  /* attribute boolean hidden; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHidden(bool *aHidden) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetHidden(bool aHidden) = 0;

  /* readonly attribute nsIURI iconURI; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIconURI(nsIURI **aIconURI) = 0;

  /* readonly attribute AString name; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetName(nsAString& aName) = 0;

  /* readonly attribute AString searchForm; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSearchForm(nsAString& aSearchForm) = 0;

  /* readonly attribute AString identifier; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIdentifier(nsAString& aIdentifier) = 0;

  /* AString getResultDomain ([optional] in AString responseType); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetResultDomain(const nsAString& responseType, nsAString& _retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISearchEngine, NS_ISEARCHENGINE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISEARCHENGINE \
  NS_IMETHOD GetSubmission(const nsAString& data, const nsAString& responseType, const nsAString& purpose, nsISearchSubmission **_retval) override; \
  NS_IMETHOD AddParam(const nsAString& name, const nsAString& value, const nsAString& responseType) override; \
  NS_IMETHOD SupportsResponseType(const nsAString& responseType, bool *_retval) override; \
  NS_IMETHOD GetIconURLBySize(int32_t width, int32_t height, nsAString& _retval) override; \
  NS_IMETHOD GetIcons(JS::MutableHandleValue _retval) override; \
  NS_IMETHOD SpeculativeConnect(JS::HandleValue options) override; \
  NS_IMETHOD GetAlias(nsAString& aAlias) override; \
  NS_IMETHOD SetAlias(const nsAString& aAlias) override; \
  NS_IMETHOD GetDescription(nsAString& aDescription) override; \
  NS_IMETHOD GetHidden(bool *aHidden) override; \
  NS_IMETHOD SetHidden(bool aHidden) override; \
  NS_IMETHOD GetIconURI(nsIURI **aIconURI) override; \
  NS_IMETHOD GetName(nsAString& aName) override; \
  NS_IMETHOD GetSearchForm(nsAString& aSearchForm) override; \
  NS_IMETHOD GetIdentifier(nsAString& aIdentifier) override; \
  NS_IMETHOD GetResultDomain(const nsAString& responseType, nsAString& _retval) 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_NSISEARCHENGINE \
  nsresult GetSubmission(const nsAString& data, const nsAString& responseType, const nsAString& purpose, nsISearchSubmission **_retval); \
  nsresult AddParam(const nsAString& name, const nsAString& value, const nsAString& responseType); \
  nsresult SupportsResponseType(const nsAString& responseType, bool *_retval); \
  nsresult GetIconURLBySize(int32_t width, int32_t height, nsAString& _retval); \
  nsresult GetIcons(JS::MutableHandleValue _retval); \
  nsresult SpeculativeConnect(JS::HandleValue options); \
  nsresult GetAlias(nsAString& aAlias); \
  nsresult SetAlias(const nsAString& aAlias); \
  nsresult GetDescription(nsAString& aDescription); \
  nsresult GetHidden(bool *aHidden); \
  nsresult SetHidden(bool aHidden); \
  nsresult GetIconURI(nsIURI **aIconURI); \
  nsresult GetName(nsAString& aName); \
  nsresult GetSearchForm(nsAString& aSearchForm); \
  nsresult GetIdentifier(nsAString& aIdentifier); \
  nsresult GetResultDomain(const nsAString& responseType, nsAString& _retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISEARCHENGINE(_to) \
  NS_IMETHOD GetSubmission(const nsAString& data, const nsAString& responseType, const nsAString& purpose, nsISearchSubmission **_retval) override { return _to GetSubmission(data, responseType, purpose, _retval); } \
  NS_IMETHOD AddParam(const nsAString& name, const nsAString& value, const nsAString& responseType) override { return _to AddParam(name, value, responseType); } \
  NS_IMETHOD SupportsResponseType(const nsAString& responseType, bool *_retval) override { return _to SupportsResponseType(responseType, _retval); } \
  NS_IMETHOD GetIconURLBySize(int32_t width, int32_t height, nsAString& _retval) override { return _to GetIconURLBySize(width, height, _retval); } \
  NS_IMETHOD GetIcons(JS::MutableHandleValue _retval) override { return _to GetIcons(_retval); } \
  NS_IMETHOD SpeculativeConnect(JS::HandleValue options) override { return _to SpeculativeConnect(options); } \
  NS_IMETHOD GetAlias(nsAString& aAlias) override { return _to GetAlias(aAlias); } \
  NS_IMETHOD SetAlias(const nsAString& aAlias) override { return _to SetAlias(aAlias); } \
  NS_IMETHOD GetDescription(nsAString& aDescription) override { return _to GetDescription(aDescription); } \
  NS_IMETHOD GetHidden(bool *aHidden) override { return _to GetHidden(aHidden); } \
  NS_IMETHOD SetHidden(bool aHidden) override { return _to SetHidden(aHidden); } \
  NS_IMETHOD GetIconURI(nsIURI **aIconURI) override { return _to GetIconURI(aIconURI); } \
  NS_IMETHOD GetName(nsAString& aName) override { return _to GetName(aName); } \
  NS_IMETHOD GetSearchForm(nsAString& aSearchForm) override { return _to GetSearchForm(aSearchForm); } \
  NS_IMETHOD GetIdentifier(nsAString& aIdentifier) override { return _to GetIdentifier(aIdentifier); } \
  NS_IMETHOD GetResultDomain(const nsAString& responseType, nsAString& _retval) override { return _to GetResultDomain(responseType, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISEARCHENGINE(_to) \
  NS_IMETHOD GetSubmission(const nsAString& data, const nsAString& responseType, const nsAString& purpose, nsISearchSubmission **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubmission(data, responseType, purpose, _retval); } \
  NS_IMETHOD AddParam(const nsAString& name, const nsAString& value, const nsAString& responseType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddParam(name, value, responseType); } \
  NS_IMETHOD SupportsResponseType(const nsAString& responseType, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsResponseType(responseType, _retval); } \
  NS_IMETHOD GetIconURLBySize(int32_t width, int32_t height, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIconURLBySize(width, height, _retval); } \
  NS_IMETHOD GetIcons(JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIcons(_retval); } \
  NS_IMETHOD SpeculativeConnect(JS::HandleValue options) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SpeculativeConnect(options); } \
  NS_IMETHOD GetAlias(nsAString& aAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlias(aAlias); } \
  NS_IMETHOD SetAlias(const nsAString& aAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlias(aAlias); } \
  NS_IMETHOD GetDescription(nsAString& aDescription) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescription(aDescription); } \
  NS_IMETHOD GetHidden(bool *aHidden) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHidden(aHidden); } \
  NS_IMETHOD SetHidden(bool aHidden) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHidden(aHidden); } \
  NS_IMETHOD GetIconURI(nsIURI **aIconURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIconURI(aIconURI); } \
  NS_IMETHOD GetName(nsAString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_IMETHOD GetSearchForm(nsAString& aSearchForm) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchForm(aSearchForm); } \
  NS_IMETHOD GetIdentifier(nsAString& aIdentifier) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentifier(aIdentifier); } \
  NS_IMETHOD GetResultDomain(const nsAString& responseType, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResultDomain(responseType, _retval); } 


/* starting interface:    nsISearchParseSubmissionResult */
#define NS_ISEARCHPARSESUBMISSIONRESULT_IID_STR "0dc93e51-a7bf-4a16-862d-4b3469ff6206"

#define NS_ISEARCHPARSESUBMISSIONRESULT_IID \
  {0x0dc93e51, 0xa7bf, 0x4a16, \
    { 0x86, 0x2d, 0x4b, 0x34, 0x69, 0xff, 0x62, 0x06 }}

class NS_NO_VTABLE nsISearchParseSubmissionResult : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHPARSESUBMISSIONRESULT_IID)

  /* readonly attribute nsISearchEngine engine; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEngine(nsISearchEngine **aEngine) = 0;

  /* readonly attribute AString terms; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTerms(nsAString& aTerms) = 0;

  /* readonly attribute long termsOffset; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTermsOffset(int32_t *aTermsOffset) = 0;

  /* readonly attribute long termsLength; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTermsLength(int32_t *aTermsLength) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISearchParseSubmissionResult, NS_ISEARCHPARSESUBMISSIONRESULT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISEARCHPARSESUBMISSIONRESULT \
  NS_IMETHOD GetEngine(nsISearchEngine **aEngine) override; \
  NS_IMETHOD GetTerms(nsAString& aTerms) override; \
  NS_IMETHOD GetTermsOffset(int32_t *aTermsOffset) override; \
  NS_IMETHOD GetTermsLength(int32_t *aTermsLength) 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_NSISEARCHPARSESUBMISSIONRESULT \
  nsresult GetEngine(nsISearchEngine **aEngine); \
  nsresult GetTerms(nsAString& aTerms); \
  nsresult GetTermsOffset(int32_t *aTermsOffset); \
  nsresult GetTermsLength(int32_t *aTermsLength); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISEARCHPARSESUBMISSIONRESULT(_to) \
  NS_IMETHOD GetEngine(nsISearchEngine **aEngine) override { return _to GetEngine(aEngine); } \
  NS_IMETHOD GetTerms(nsAString& aTerms) override { return _to GetTerms(aTerms); } \
  NS_IMETHOD GetTermsOffset(int32_t *aTermsOffset) override { return _to GetTermsOffset(aTermsOffset); } \
  NS_IMETHOD GetTermsLength(int32_t *aTermsLength) override { return _to GetTermsLength(aTermsLength); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISEARCHPARSESUBMISSIONRESULT(_to) \
  NS_IMETHOD GetEngine(nsISearchEngine **aEngine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngine(aEngine); } \
  NS_IMETHOD GetTerms(nsAString& aTerms) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTerms(aTerms); } \
  NS_IMETHOD GetTermsOffset(int32_t *aTermsOffset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTermsOffset(aTermsOffset); } \
  NS_IMETHOD GetTermsLength(int32_t *aTermsLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTermsLength(aTermsLength); } 


/* starting interface:    nsISearchInstallCallback */
#define NS_ISEARCHINSTALLCALLBACK_IID_STR "9fc39136-f08b-46d3-b232-96f4b7b0e235"

#define NS_ISEARCHINSTALLCALLBACK_IID \
  {0x9fc39136, 0xf08b, 0x46d3, \
    { 0xb2, 0x32, 0x96, 0xf4, 0xb7, 0xb0, 0xe2, 0x35 }}

class NS_NO_VTABLE nsISearchInstallCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHINSTALLCALLBACK_IID)

  enum {
    ERROR_UNKNOWN_FAILURE = 1U,
    ERROR_DUPLICATE_ENGINE = 2U
  };

  /* void onSuccess (in nsISearchEngine engine); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnSuccess(nsISearchEngine *engine) = 0;

  /* void onError (in unsigned long errorCode); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnError(uint32_t errorCode) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISearchInstallCallback, NS_ISEARCHINSTALLCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISEARCHINSTALLCALLBACK \
  NS_IMETHOD OnSuccess(nsISearchEngine *engine) override; \
  NS_IMETHOD OnError(uint32_t errorCode) 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_NSISEARCHINSTALLCALLBACK \
  nsresult OnSuccess(nsISearchEngine *engine); \
  nsresult OnError(uint32_t errorCode); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISEARCHINSTALLCALLBACK(_to) \
  NS_IMETHOD OnSuccess(nsISearchEngine *engine) override { return _to OnSuccess(engine); } \
  NS_IMETHOD OnError(uint32_t errorCode) override { return _to OnError(errorCode); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISEARCHINSTALLCALLBACK(_to) \
  NS_IMETHOD OnSuccess(nsISearchEngine *engine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSuccess(engine); } \
  NS_IMETHOD OnError(uint32_t errorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnError(errorCode); } 


/* starting interface:    nsIBrowserSearchInitObserver */
#define NS_IBROWSERSEARCHINITOBSERVER_IID_STR "02256156-16e4-47f1-9979-76ff98ceb590"

#define NS_IBROWSERSEARCHINITOBSERVER_IID \
  {0x02256156, 0x16e4, 0x47f1, \
    { 0x99, 0x79, 0x76, 0xff, 0x98, 0xce, 0xb5, 0x90 }}

class NS_NO_VTABLE nsIBrowserSearchInitObserver : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBROWSERSEARCHINITOBSERVER_IID)

  /* void onInitComplete (in nsresult aStatus); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnInitComplete(nsresult aStatus) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIBrowserSearchInitObserver, NS_IBROWSERSEARCHINITOBSERVER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBROWSERSEARCHINITOBSERVER \
  NS_IMETHOD OnInitComplete(nsresult aStatus) 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_NSIBROWSERSEARCHINITOBSERVER \
  nsresult OnInitComplete(nsresult aStatus); 

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

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


/* starting interface:    nsIBrowserSearchService */
#define NS_IBROWSERSEARCHSERVICE_IID_STR "150ef720-bbe2-4169-b9f3-ef7ec0654ced"

#define NS_IBROWSERSEARCHSERVICE_IID \
  {0x150ef720, 0xbbe2, 0x4169, \
    { 0xb9, 0xf3, 0xef, 0x7e, 0xc0, 0x65, 0x4c, 0xed }}

class NS_NO_VTABLE nsIBrowserSearchService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBROWSERSEARCHSERVICE_IID)

  /* void init ([optional] in nsIBrowserSearchInitObserver aObserver); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Init(nsIBrowserSearchInitObserver *aObserver) = 0;

  /* readonly attribute bool isInitialized; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsInitialized(bool *aIsInitialized) = 0;

  /* void resetToOriginalDefaultEngine (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ResetToOriginalDefaultEngine(void) = 0;

  /* boolean hasEngineWithURL (in AString method, in AString url, in jsval formData); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasEngineWithURL(const nsAString& method, const nsAString& url, JS::HandleValue formData, bool *_retval) = 0;

  /* void addEngine (in AString engineURL, in long dataType, in AString iconURL, in boolean confirm, [optional] in nsISearchInstallCallback callback, [optional] in AString extensionID); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddEngine(const nsAString& engineURL, int32_t dataType, const nsAString& iconURL, bool confirm, nsISearchInstallCallback *callback, const nsAString& extensionID) = 0;

  /* void addEngineWithDetails (in AString name, in jsval iconURL, [optional] in AString alias, [optional] in AString description, [optional] in AString method, [optional] in AString url, [optional] in AString extensionID); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddEngineWithDetails(const nsAString& name, JS::HandleValue iconURL, const nsAString& alias, const nsAString& description, const nsAString& method, const nsAString& url, const nsAString& extensionID) = 0;

  /* void restoreDefaultEngines (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RestoreDefaultEngines(void) = 0;

  /* nsISearchEngine getEngineByAlias (in AString alias); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEngineByAlias(const nsAString& alias, nsISearchEngine **_retval) = 0;

  /* nsISearchEngine getEngineByName (in AString aEngineName); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEngineByName(const nsAString& aEngineName, nsISearchEngine **_retval) = 0;

  /* void getEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEngines(uint32_t *engineCount, nsISearchEngine ***engines) = 0;

  /* void getVisibleEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetVisibleEngines(uint32_t *engineCount, nsISearchEngine ***engines) = 0;

  /* void getDefaultEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultEngines(uint32_t *engineCount, nsISearchEngine ***engines) = 0;

  /* void getEnginesByExtensionID (in AString extensionID, [optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEnginesByExtensionID(const nsAString& extensionID, uint32_t *engineCount, nsISearchEngine ***engines) = 0;

  /* void moveEngine (in nsISearchEngine engine, in long newIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MoveEngine(nsISearchEngine *engine, int32_t newIndex) = 0;

  /* void removeEngine (in nsISearchEngine engine); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveEngine(nsISearchEngine *engine) = 0;

  /* readonly attribute nsISearchEngine originalDefaultEngine; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine **aOriginalDefaultEngine) = 0;

  /* attribute nsISearchEngine defaultEngine; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultEngine(nsISearchEngine **aDefaultEngine) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDefaultEngine(nsISearchEngine *aDefaultEngine) = 0;

  /* attribute nsISearchEngine currentEngine; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCurrentEngine(nsISearchEngine **aCurrentEngine) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) = 0;

  /* jsval getDefaultEngineInfo (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultEngineInfo(JS::MutableHandleValue _retval) = 0;

  /* nsISearchParseSubmissionResult parseSubmissionURL (in AString url); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ParseSubmissionURL(const nsAString& url, nsISearchParseSubmissionResult **_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIBrowserSearchService, NS_IBROWSERSEARCHSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBROWSERSEARCHSERVICE \
  NS_IMETHOD Init(nsIBrowserSearchInitObserver *aObserver) override; \
  NS_IMETHOD GetIsInitialized(bool *aIsInitialized) override; \
  NS_IMETHOD ResetToOriginalDefaultEngine(void) override; \
  NS_IMETHOD HasEngineWithURL(const nsAString& method, const nsAString& url, JS::HandleValue formData, bool *_retval) override; \
  NS_IMETHOD AddEngine(const nsAString& engineURL, int32_t dataType, const nsAString& iconURL, bool confirm, nsISearchInstallCallback *callback, const nsAString& extensionID) override; \
  NS_IMETHOD AddEngineWithDetails(const nsAString& name, JS::HandleValue iconURL, const nsAString& alias, const nsAString& description, const nsAString& method, const nsAString& url, const nsAString& extensionID) override; \
  NS_IMETHOD RestoreDefaultEngines(void) override; \
  NS_IMETHOD GetEngineByAlias(const nsAString& alias, nsISearchEngine **_retval) override; \
  NS_IMETHOD GetEngineByName(const nsAString& aEngineName, nsISearchEngine **_retval) override; \
  NS_IMETHOD GetEngines(uint32_t *engineCount, nsISearchEngine ***engines) override; \
  NS_IMETHOD GetVisibleEngines(uint32_t *engineCount, nsISearchEngine ***engines) override; \
  NS_IMETHOD GetDefaultEngines(uint32_t *engineCount, nsISearchEngine ***engines) override; \
  NS_IMETHOD GetEnginesByExtensionID(const nsAString& extensionID, uint32_t *engineCount, nsISearchEngine ***engines) override; \
  NS_IMETHOD MoveEngine(nsISearchEngine *engine, int32_t newIndex) override; \
  NS_IMETHOD RemoveEngine(nsISearchEngine *engine) override; \
  NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine **aOriginalDefaultEngine) override; \
  NS_IMETHOD GetDefaultEngine(nsISearchEngine **aDefaultEngine) override; \
  NS_IMETHOD SetDefaultEngine(nsISearchEngine *aDefaultEngine) override; \
  NS_IMETHOD GetCurrentEngine(nsISearchEngine **aCurrentEngine) override; \
  NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) override; \
  NS_IMETHOD GetDefaultEngineInfo(JS::MutableHandleValue _retval) override; \
  NS_IMETHOD ParseSubmissionURL(const nsAString& url, nsISearchParseSubmissionResult **_retval) 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_NSIBROWSERSEARCHSERVICE \
  nsresult Init(nsIBrowserSearchInitObserver *aObserver); \
  nsresult GetIsInitialized(bool *aIsInitialized); \
  nsresult ResetToOriginalDefaultEngine(void); \
  nsresult HasEngineWithURL(const nsAString& method, const nsAString& url, JS::HandleValue formData, bool *_retval); \
  nsresult AddEngine(const nsAString& engineURL, int32_t dataType, const nsAString& iconURL, bool confirm, nsISearchInstallCallback *callback, const nsAString& extensionID); \
  nsresult AddEngineWithDetails(const nsAString& name, JS::HandleValue iconURL, const nsAString& alias, const nsAString& description, const nsAString& method, const nsAString& url, const nsAString& extensionID); \
  nsresult RestoreDefaultEngines(void); \
  nsresult GetEngineByAlias(const nsAString& alias, nsISearchEngine **_retval); \
  nsresult GetEngineByName(const nsAString& aEngineName, nsISearchEngine **_retval); \
  nsresult GetEngines(uint32_t *engineCount, nsISearchEngine ***engines); \
  nsresult GetVisibleEngines(uint32_t *engineCount, nsISearchEngine ***engines); \
  nsresult GetDefaultEngines(uint32_t *engineCount, nsISearchEngine ***engines); \
  nsresult GetEnginesByExtensionID(const nsAString& extensionID, uint32_t *engineCount, nsISearchEngine ***engines); \
  nsresult MoveEngine(nsISearchEngine *engine, int32_t newIndex); \
  nsresult RemoveEngine(nsISearchEngine *engine); \
  nsresult GetOriginalDefaultEngine(nsISearchEngine **aOriginalDefaultEngine); \
  nsresult GetDefaultEngine(nsISearchEngine **aDefaultEngine); \
  nsresult SetDefaultEngine(nsISearchEngine *aDefaultEngine); \
  nsresult GetCurrentEngine(nsISearchEngine **aCurrentEngine); \
  nsresult SetCurrentEngine(nsISearchEngine *aCurrentEngine); \
  nsresult GetDefaultEngineInfo(JS::MutableHandleValue _retval); \
  nsresult ParseSubmissionURL(const nsAString& url, nsISearchParseSubmissionResult **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBROWSERSEARCHSERVICE(_to) \
  NS_IMETHOD Init(nsIBrowserSearchInitObserver *aObserver) override { return _to Init(aObserver); } \
  NS_IMETHOD GetIsInitialized(bool *aIsInitialized) override { return _to GetIsInitialized(aIsInitialized); } \
  NS_IMETHOD ResetToOriginalDefaultEngine(void) override { return _to ResetToOriginalDefaultEngine(); } \
  NS_IMETHOD HasEngineWithURL(const nsAString& method, const nsAString& url, JS::HandleValue formData, bool *_retval) override { return _to HasEngineWithURL(method, url, formData, _retval); } \
  NS_IMETHOD AddEngine(const nsAString& engineURL, int32_t dataType, const nsAString& iconURL, bool confirm, nsISearchInstallCallback *callback, const nsAString& extensionID) override { return _to AddEngine(engineURL, dataType, iconURL, confirm, callback, extensionID); } \
  NS_IMETHOD AddEngineWithDetails(const nsAString& name, JS::HandleValue iconURL, const nsAString& alias, const nsAString& description, const nsAString& method, const nsAString& url, const nsAString& extensionID) override { return _to AddEngineWithDetails(name, iconURL, alias, description, method, url, extensionID); } \
  NS_IMETHOD RestoreDefaultEngines(void) override { return _to RestoreDefaultEngines(); } \
  NS_IMETHOD GetEngineByAlias(const nsAString& alias, nsISearchEngine **_retval) override { return _to GetEngineByAlias(alias, _retval); } \
  NS_IMETHOD GetEngineByName(const nsAString& aEngineName, nsISearchEngine **_retval) override { return _to GetEngineByName(aEngineName, _retval); } \
  NS_IMETHOD GetEngines(uint32_t *engineCount, nsISearchEngine ***engines) override { return _to GetEngines(engineCount, engines); } \
  NS_IMETHOD GetVisibleEngines(uint32_t *engineCount, nsISearchEngine ***engines) override { return _to GetVisibleEngines(engineCount, engines); } \
  NS_IMETHOD GetDefaultEngines(uint32_t *engineCount, nsISearchEngine ***engines) override { return _to GetDefaultEngines(engineCount, engines); } \
  NS_IMETHOD GetEnginesByExtensionID(const nsAString& extensionID, uint32_t *engineCount, nsISearchEngine ***engines) override { return _to GetEnginesByExtensionID(extensionID, engineCount, engines); } \
  NS_IMETHOD MoveEngine(nsISearchEngine *engine, int32_t newIndex) override { return _to MoveEngine(engine, newIndex); } \
  NS_IMETHOD RemoveEngine(nsISearchEngine *engine) override { return _to RemoveEngine(engine); } \
  NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine **aOriginalDefaultEngine) override { return _to GetOriginalDefaultEngine(aOriginalDefaultEngine); } \
  NS_IMETHOD GetDefaultEngine(nsISearchEngine **aDefaultEngine) override { return _to GetDefaultEngine(aDefaultEngine); } \
  NS_IMETHOD SetDefaultEngine(nsISearchEngine *aDefaultEngine) override { return _to SetDefaultEngine(aDefaultEngine); } \
  NS_IMETHOD GetCurrentEngine(nsISearchEngine **aCurrentEngine) override { return _to GetCurrentEngine(aCurrentEngine); } \
  NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) override { return _to SetCurrentEngine(aCurrentEngine); } \
  NS_IMETHOD GetDefaultEngineInfo(JS::MutableHandleValue _retval) override { return _to GetDefaultEngineInfo(_retval); } \
  NS_IMETHOD ParseSubmissionURL(const nsAString& url, nsISearchParseSubmissionResult **_retval) override { return _to ParseSubmissionURL(url, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBROWSERSEARCHSERVICE(_to) \
  NS_IMETHOD Init(nsIBrowserSearchInitObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aObserver); } \
  NS_IMETHOD GetIsInitialized(bool *aIsInitialized) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsInitialized(aIsInitialized); } \
  NS_IMETHOD ResetToOriginalDefaultEngine(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetToOriginalDefaultEngine(); } \
  NS_IMETHOD HasEngineWithURL(const nsAString& method, const nsAString& url, JS::HandleValue formData, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasEngineWithURL(method, url, formData, _retval); } \
  NS_IMETHOD AddEngine(const nsAString& engineURL, int32_t dataType, const nsAString& iconURL, bool confirm, nsISearchInstallCallback *callback, const nsAString& extensionID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEngine(engineURL, dataType, iconURL, confirm, callback, extensionID); } \
  NS_IMETHOD AddEngineWithDetails(const nsAString& name, JS::HandleValue iconURL, const nsAString& alias, const nsAString& description, const nsAString& method, const nsAString& url, const nsAString& extensionID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEngineWithDetails(name, iconURL, alias, description, method, url, extensionID); } \
  NS_IMETHOD RestoreDefaultEngines(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RestoreDefaultEngines(); } \
  NS_IMETHOD GetEngineByAlias(const nsAString& alias, nsISearchEngine **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngineByAlias(alias, _retval); } \
  NS_IMETHOD GetEngineByName(const nsAString& aEngineName, nsISearchEngine **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngineByName(aEngineName, _retval); } \
  NS_IMETHOD GetEngines(uint32_t *engineCount, nsISearchEngine ***engines) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngines(engineCount, engines); } \
  NS_IMETHOD GetVisibleEngines(uint32_t *engineCount, nsISearchEngine ***engines) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisibleEngines(engineCount, engines); } \
  NS_IMETHOD GetDefaultEngines(uint32_t *engineCount, nsISearchEngine ***engines) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultEngines(engineCount, engines); } \
  NS_IMETHOD GetEnginesByExtensionID(const nsAString& extensionID, uint32_t *engineCount, nsISearchEngine ***engines) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnginesByExtensionID(extensionID, engineCount, engines); } \
  NS_IMETHOD MoveEngine(nsISearchEngine *engine, int32_t newIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveEngine(engine, newIndex); } \
  NS_IMETHOD RemoveEngine(nsISearchEngine *engine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEngine(engine); } \
  NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine **aOriginalDefaultEngine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginalDefaultEngine(aOriginalDefaultEngine); } \
  NS_IMETHOD GetDefaultEngine(nsISearchEngine **aDefaultEngine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultEngine(aDefaultEngine); } \
  NS_IMETHOD SetDefaultEngine(nsISearchEngine *aDefaultEngine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultEngine(aDefaultEngine); } \
  NS_IMETHOD GetCurrentEngine(nsISearchEngine **aCurrentEngine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentEngine(aCurrentEngine); } \
  NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentEngine(aCurrentEngine); } \
  NS_IMETHOD GetDefaultEngineInfo(JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultEngineInfo(_retval); } \
  NS_IMETHOD ParseSubmissionURL(const nsAString& url, nsISearchParseSubmissionResult **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseSubmissionURL(url, _retval); } 

/**
 * The observer topic to listen to for actions performed on installed
 * search engines.
 */
#define SEARCH_ENGINE_TOPIC "browser-search-engine-modified"
/**
 * Sent when an engine is removed from the data store.
 */
#define SEARCH_ENGINE_REMOVED      "engine-removed"
/**
 * Sent when an engine is changed. This includes when the engine's "hidden"
 * property is changed.
 */
#define SEARCH_ENGINE_CHANGED      "engine-changed"
/**
 * Sent when an engine is added to the list of available engines.
 */
#define SEARCH_ENGINE_ADDED        "engine-added"
/**
 * Sent when a search engine being installed from a remote plugin description
 * file is completely loaded. This is used internally by the search service as
 * an indication of when the engine can be added to the internal store, and
 * therefore should not be used to detect engine availability. It is always
 * followed by an "added" notification.
 */
#define SEARCH_ENGINE_LOADED       "engine-loaded"
/**
 * Sent when the "current" engine is changed.
 */
#define SEARCH_ENGINE_CURRENT      "engine-current";
/**
 * Sent when the "default" engine is changed.
 */
#define SEARCH_ENGINE_DEFAULT      "engine-default";

#endif /* __gen_nsIBrowserSearchService_h__ */