/usr/include/thunderbird-11.0.1/nsIBrowserSearchService.h is in thunderbird-dev 11.0.1+build1-0ubuntu2.
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 | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /build/buildd/thunderbird-11.0.1+build1/build-tree/mozilla/mozilla/netwerk/base/public/nsIBrowserSearchService.idl
*/
#ifndef __gen_nsIBrowserSearchService_h__
#define __gen_nsIBrowserSearchService_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
/* 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 "58e4f602-a7c8-4cd1-9dca-716705e826ef"
#define NS_ISEARCHSUBMISSION_IID \
{0x58e4f602, 0xa7c8, 0x4cd1, \
{ 0x9d, 0xca, 0x71, 0x67, 0x05, 0xe8, 0x26, 0xef }}
class NS_NO_VTABLE NS_SCRIPTABLE nsISearchSubmission : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHSUBMISSION_IID)
/* readonly attribute nsIInputStream postData; */
NS_SCRIPTABLE NS_IMETHOD GetPostData(nsIInputStream * *aPostData) = 0;
/* readonly attribute nsIURI uri; */
NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetPostData(nsIInputStream * *aPostData); \
NS_SCRIPTABLE NS_IMETHOD 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_SCRIPTABLE NS_IMETHOD GetPostData(nsIInputStream * *aPostData) { return _to GetPostData(aPostData); } \
NS_SCRIPTABLE NS_IMETHOD GetUri(nsIURI * *aUri) { 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_SCRIPTABLE NS_IMETHOD GetPostData(nsIInputStream * *aPostData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPostData(aPostData); } \
NS_SCRIPTABLE NS_IMETHOD GetUri(nsIURI * *aUri) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUri(aUri); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsSearchSubmission : public nsISearchSubmission
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISEARCHSUBMISSION
nsSearchSubmission();
private:
~nsSearchSubmission();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsSearchSubmission, nsISearchSubmission)
nsSearchSubmission::nsSearchSubmission()
{
/* member initializers and constructor code */
}
nsSearchSubmission::~nsSearchSubmission()
{
/* destructor code */
}
/* readonly attribute nsIInputStream postData; */
NS_IMETHODIMP nsSearchSubmission::GetPostData(nsIInputStream * *aPostData)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIURI uri; */
NS_IMETHODIMP nsSearchSubmission::GetUri(nsIURI * *aUri)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsISearchEngine */
#define NS_ISEARCHENGINE_IID_STR "803e510b-4b27-4ba2-a16d-bb5fa953c166"
#define NS_ISEARCHENGINE_IID \
{0x803e510b, 0x4b27, 0x4ba2, \
{ 0xa1, 0x6d, 0xbb, 0x5f, 0xa9, 0x53, 0xc1, 0x66 }}
class NS_NO_VTABLE NS_SCRIPTABLE nsISearchEngine : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHENGINE_IID)
/* nsISearchSubmission getSubmission (in AString data, [optional] in AString responseType); */
NS_SCRIPTABLE NS_IMETHOD GetSubmission(const nsAString & data, const nsAString & responseType, nsISearchSubmission * *_retval NS_OUTPARAM) = 0;
/* void addParam (in AString name, in AString value, in AString responseType); */
NS_SCRIPTABLE NS_IMETHOD AddParam(const nsAString & name, const nsAString & value, const nsAString & responseType) = 0;
/* boolean supportsResponseType (in AString responseType); */
NS_SCRIPTABLE NS_IMETHOD SupportsResponseType(const nsAString & responseType, bool *_retval NS_OUTPARAM) = 0;
enum {
TYPE_MOZSEARCH = 1U,
TYPE_SHERLOCK = 2U,
TYPE_OPENSEARCH = 3U,
DATA_XML = 1U,
DATA_TEXT = 2U
};
/* attribute AString alias; */
NS_SCRIPTABLE NS_IMETHOD GetAlias(nsAString & aAlias) = 0;
NS_SCRIPTABLE NS_IMETHOD SetAlias(const nsAString & aAlias) = 0;
/* readonly attribute AString description; */
NS_SCRIPTABLE NS_IMETHOD GetDescription(nsAString & aDescription) = 0;
/* attribute boolean hidden; */
NS_SCRIPTABLE NS_IMETHOD GetHidden(bool *aHidden) = 0;
NS_SCRIPTABLE NS_IMETHOD SetHidden(bool aHidden) = 0;
/* readonly attribute nsIURI iconURI; */
NS_SCRIPTABLE NS_IMETHOD GetIconURI(nsIURI * *aIconURI) = 0;
/* readonly attribute AString name; */
NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
/* readonly attribute AString searchForm; */
NS_SCRIPTABLE NS_IMETHOD GetSearchForm(nsAString & aSearchForm) = 0;
/* readonly attribute long type; */
NS_SCRIPTABLE NS_IMETHOD GetType(PRInt32 *aType) = 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_SCRIPTABLE NS_IMETHOD GetSubmission(const nsAString & data, const nsAString & responseType, nsISearchSubmission * *_retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD AddParam(const nsAString & name, const nsAString & value, const nsAString & responseType); \
NS_SCRIPTABLE NS_IMETHOD SupportsResponseType(const nsAString & responseType, bool *_retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GetAlias(nsAString & aAlias); \
NS_SCRIPTABLE NS_IMETHOD SetAlias(const nsAString & aAlias); \
NS_SCRIPTABLE NS_IMETHOD GetDescription(nsAString & aDescription); \
NS_SCRIPTABLE NS_IMETHOD GetHidden(bool *aHidden); \
NS_SCRIPTABLE NS_IMETHOD SetHidden(bool aHidden); \
NS_SCRIPTABLE NS_IMETHOD GetIconURI(nsIURI * *aIconURI); \
NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
NS_SCRIPTABLE NS_IMETHOD GetSearchForm(nsAString & aSearchForm); \
NS_SCRIPTABLE NS_IMETHOD GetType(PRInt32 *aType);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISEARCHENGINE(_to) \
NS_SCRIPTABLE NS_IMETHOD GetSubmission(const nsAString & data, const nsAString & responseType, nsISearchSubmission * *_retval NS_OUTPARAM) { return _to GetSubmission(data, responseType, _retval); } \
NS_SCRIPTABLE NS_IMETHOD AddParam(const nsAString & name, const nsAString & value, const nsAString & responseType) { return _to AddParam(name, value, responseType); } \
NS_SCRIPTABLE NS_IMETHOD SupportsResponseType(const nsAString & responseType, bool *_retval NS_OUTPARAM) { return _to SupportsResponseType(responseType, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GetAlias(nsAString & aAlias) { return _to GetAlias(aAlias); } \
NS_SCRIPTABLE NS_IMETHOD SetAlias(const nsAString & aAlias) { return _to SetAlias(aAlias); } \
NS_SCRIPTABLE NS_IMETHOD GetDescription(nsAString & aDescription) { return _to GetDescription(aDescription); } \
NS_SCRIPTABLE NS_IMETHOD GetHidden(bool *aHidden) { return _to GetHidden(aHidden); } \
NS_SCRIPTABLE NS_IMETHOD SetHidden(bool aHidden) { return _to SetHidden(aHidden); } \
NS_SCRIPTABLE NS_IMETHOD GetIconURI(nsIURI * *aIconURI) { return _to GetIconURI(aIconURI); } \
NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
NS_SCRIPTABLE NS_IMETHOD GetSearchForm(nsAString & aSearchForm) { return _to GetSearchForm(aSearchForm); } \
NS_SCRIPTABLE NS_IMETHOD GetType(PRInt32 *aType) { return _to GetType(aType); }
/* 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_SCRIPTABLE NS_IMETHOD GetSubmission(const nsAString & data, const nsAString & responseType, nsISearchSubmission * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubmission(data, responseType, _retval); } \
NS_SCRIPTABLE NS_IMETHOD AddParam(const nsAString & name, const nsAString & value, const nsAString & responseType) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddParam(name, value, responseType); } \
NS_SCRIPTABLE NS_IMETHOD SupportsResponseType(const nsAString & responseType, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsResponseType(responseType, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GetAlias(nsAString & aAlias) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlias(aAlias); } \
NS_SCRIPTABLE NS_IMETHOD SetAlias(const nsAString & aAlias) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlias(aAlias); } \
NS_SCRIPTABLE NS_IMETHOD GetDescription(nsAString & aDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescription(aDescription); } \
NS_SCRIPTABLE NS_IMETHOD GetHidden(bool *aHidden) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHidden(aHidden); } \
NS_SCRIPTABLE NS_IMETHOD SetHidden(bool aHidden) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHidden(aHidden); } \
NS_SCRIPTABLE NS_IMETHOD GetIconURI(nsIURI * *aIconURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIconURI(aIconURI); } \
NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
NS_SCRIPTABLE NS_IMETHOD GetSearchForm(nsAString & aSearchForm) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchForm(aSearchForm); } \
NS_SCRIPTABLE NS_IMETHOD GetType(PRInt32 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsSearchEngine : public nsISearchEngine
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISEARCHENGINE
nsSearchEngine();
private:
~nsSearchEngine();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsSearchEngine, nsISearchEngine)
nsSearchEngine::nsSearchEngine()
{
/* member initializers and constructor code */
}
nsSearchEngine::~nsSearchEngine()
{
/* destructor code */
}
/* nsISearchSubmission getSubmission (in AString data, [optional] in AString responseType); */
NS_IMETHODIMP nsSearchEngine::GetSubmission(const nsAString & data, const nsAString & responseType, nsISearchSubmission * *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addParam (in AString name, in AString value, in AString responseType); */
NS_IMETHODIMP nsSearchEngine::AddParam(const nsAString & name, const nsAString & value, const nsAString & responseType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean supportsResponseType (in AString responseType); */
NS_IMETHODIMP nsSearchEngine::SupportsResponseType(const nsAString & responseType, bool *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute AString alias; */
NS_IMETHODIMP nsSearchEngine::GetAlias(nsAString & aAlias)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSearchEngine::SetAlias(const nsAString & aAlias)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString description; */
NS_IMETHODIMP nsSearchEngine::GetDescription(nsAString & aDescription)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean hidden; */
NS_IMETHODIMP nsSearchEngine::GetHidden(bool *aHidden)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSearchEngine::SetHidden(bool aHidden)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIURI iconURI; */
NS_IMETHODIMP nsSearchEngine::GetIconURI(nsIURI * *aIconURI)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString name; */
NS_IMETHODIMP nsSearchEngine::GetName(nsAString & aName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString searchForm; */
NS_IMETHODIMP nsSearchEngine::GetSearchForm(nsAString & aSearchForm)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute long type; */
NS_IMETHODIMP nsSearchEngine::GetType(PRInt32 *aType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIBrowserSearchService */
#define NS_IBROWSERSEARCHSERVICE_IID_STR "8307b8f2-08ea-45b8-96bf-b1dc7688fe3b"
#define NS_IBROWSERSEARCHSERVICE_IID \
{0x8307b8f2, 0x08ea, 0x45b8, \
{ 0x96, 0xbf, 0xb1, 0xdc, 0x76, 0x88, 0xfe, 0x3b }}
class NS_NO_VTABLE NS_SCRIPTABLE nsIBrowserSearchService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBROWSERSEARCHSERVICE_IID)
/* void addEngine (in AString engineURL, in long dataType, in AString iconURL, in boolean confirm); */
NS_SCRIPTABLE NS_IMETHOD AddEngine(const nsAString & engineURL, PRInt32 dataType, const nsAString & iconURL, bool confirm) = 0;
/* void addEngineWithDetails (in AString name, in AString iconURL, in AString alias, in AString description, in AString method, in AString url); */
NS_SCRIPTABLE NS_IMETHOD AddEngineWithDetails(const nsAString & name, const nsAString & iconURL, const nsAString & alias, const nsAString & description, const nsAString & method, const nsAString & url) = 0;
/* void restoreDefaultEngines (); */
NS_SCRIPTABLE NS_IMETHOD RestoreDefaultEngines(void) = 0;
/* nsISearchEngine getEngineByAlias (in AString alias); */
NS_SCRIPTABLE NS_IMETHOD GetEngineByAlias(const nsAString & alias, nsISearchEngine * *_retval NS_OUTPARAM) = 0;
/* nsISearchEngine getEngineByName (in AString aEngineName); */
NS_SCRIPTABLE NS_IMETHOD GetEngineByName(const nsAString & aEngineName, nsISearchEngine * *_retval NS_OUTPARAM) = 0;
/* void getEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
NS_SCRIPTABLE NS_IMETHOD GetEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) = 0;
/* void getVisibleEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
NS_SCRIPTABLE NS_IMETHOD GetVisibleEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) = 0;
/* void getDefaultEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) = 0;
/* void moveEngine (in nsISearchEngine engine, in long newIndex); */
NS_SCRIPTABLE NS_IMETHOD MoveEngine(nsISearchEngine *engine, PRInt32 newIndex) = 0;
/* void removeEngine (in nsISearchEngine engine); */
NS_SCRIPTABLE NS_IMETHOD RemoveEngine(nsISearchEngine *engine) = 0;
/* readonly attribute nsISearchEngine defaultEngine; */
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngine(nsISearchEngine * *aDefaultEngine) = 0;
/* attribute nsISearchEngine currentEngine; */
NS_SCRIPTABLE NS_IMETHOD GetCurrentEngine(nsISearchEngine * *aCurrentEngine) = 0;
NS_SCRIPTABLE NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) = 0;
/* readonly attribute nsISearchEngine originalDefaultEngine; */
NS_SCRIPTABLE NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine * *aOriginalDefaultEngine) = 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_SCRIPTABLE NS_IMETHOD AddEngine(const nsAString & engineURL, PRInt32 dataType, const nsAString & iconURL, bool confirm); \
NS_SCRIPTABLE NS_IMETHOD AddEngineWithDetails(const nsAString & name, const nsAString & iconURL, const nsAString & alias, const nsAString & description, const nsAString & method, const nsAString & url); \
NS_SCRIPTABLE NS_IMETHOD RestoreDefaultEngines(void); \
NS_SCRIPTABLE NS_IMETHOD GetEngineByAlias(const nsAString & alias, nsISearchEngine * *_retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GetEngineByName(const nsAString & aEngineName, nsISearchEngine * *_retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GetEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GetVisibleEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD MoveEngine(nsISearchEngine *engine, PRInt32 newIndex); \
NS_SCRIPTABLE NS_IMETHOD RemoveEngine(nsISearchEngine *engine); \
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngine(nsISearchEngine * *aDefaultEngine); \
NS_SCRIPTABLE NS_IMETHOD GetCurrentEngine(nsISearchEngine * *aCurrentEngine); \
NS_SCRIPTABLE NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine); \
NS_SCRIPTABLE NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine * *aOriginalDefaultEngine);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBROWSERSEARCHSERVICE(_to) \
NS_SCRIPTABLE NS_IMETHOD AddEngine(const nsAString & engineURL, PRInt32 dataType, const nsAString & iconURL, bool confirm) { return _to AddEngine(engineURL, dataType, iconURL, confirm); } \
NS_SCRIPTABLE NS_IMETHOD AddEngineWithDetails(const nsAString & name, const nsAString & iconURL, const nsAString & alias, const nsAString & description, const nsAString & method, const nsAString & url) { return _to AddEngineWithDetails(name, iconURL, alias, description, method, url); } \
NS_SCRIPTABLE NS_IMETHOD RestoreDefaultEngines(void) { return _to RestoreDefaultEngines(); } \
NS_SCRIPTABLE NS_IMETHOD GetEngineByAlias(const nsAString & alias, nsISearchEngine * *_retval NS_OUTPARAM) { return _to GetEngineByAlias(alias, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GetEngineByName(const nsAString & aEngineName, nsISearchEngine * *_retval NS_OUTPARAM) { return _to GetEngineByName(aEngineName, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GetEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) { return _to GetEngines(engineCount, engines); } \
NS_SCRIPTABLE NS_IMETHOD GetVisibleEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) { return _to GetVisibleEngines(engineCount, engines); } \
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) { return _to GetDefaultEngines(engineCount, engines); } \
NS_SCRIPTABLE NS_IMETHOD MoveEngine(nsISearchEngine *engine, PRInt32 newIndex) { return _to MoveEngine(engine, newIndex); } \
NS_SCRIPTABLE NS_IMETHOD RemoveEngine(nsISearchEngine *engine) { return _to RemoveEngine(engine); } \
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngine(nsISearchEngine * *aDefaultEngine) { return _to GetDefaultEngine(aDefaultEngine); } \
NS_SCRIPTABLE NS_IMETHOD GetCurrentEngine(nsISearchEngine * *aCurrentEngine) { return _to GetCurrentEngine(aCurrentEngine); } \
NS_SCRIPTABLE NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) { return _to SetCurrentEngine(aCurrentEngine); } \
NS_SCRIPTABLE NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine * *aOriginalDefaultEngine) { return _to GetOriginalDefaultEngine(aOriginalDefaultEngine); }
/* 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_SCRIPTABLE NS_IMETHOD AddEngine(const nsAString & engineURL, PRInt32 dataType, const nsAString & iconURL, bool confirm) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEngine(engineURL, dataType, iconURL, confirm); } \
NS_SCRIPTABLE NS_IMETHOD AddEngineWithDetails(const nsAString & name, const nsAString & iconURL, const nsAString & alias, const nsAString & description, const nsAString & method, const nsAString & url) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEngineWithDetails(name, iconURL, alias, description, method, url); } \
NS_SCRIPTABLE NS_IMETHOD RestoreDefaultEngines(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RestoreDefaultEngines(); } \
NS_SCRIPTABLE NS_IMETHOD GetEngineByAlias(const nsAString & alias, nsISearchEngine * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngineByAlias(alias, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GetEngineByName(const nsAString & aEngineName, nsISearchEngine * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngineByName(aEngineName, _retval); } \
NS_SCRIPTABLE NS_IMETHOD GetEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEngines(engineCount, engines); } \
NS_SCRIPTABLE NS_IMETHOD GetVisibleEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisibleEngines(engineCount, engines); } \
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultEngines(engineCount, engines); } \
NS_SCRIPTABLE NS_IMETHOD MoveEngine(nsISearchEngine *engine, PRInt32 newIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveEngine(engine, newIndex); } \
NS_SCRIPTABLE NS_IMETHOD RemoveEngine(nsISearchEngine *engine) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEngine(engine); } \
NS_SCRIPTABLE NS_IMETHOD GetDefaultEngine(nsISearchEngine * *aDefaultEngine) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultEngine(aDefaultEngine); } \
NS_SCRIPTABLE NS_IMETHOD GetCurrentEngine(nsISearchEngine * *aCurrentEngine) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentEngine(aCurrentEngine); } \
NS_SCRIPTABLE NS_IMETHOD SetCurrentEngine(nsISearchEngine *aCurrentEngine) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentEngine(aCurrentEngine); } \
NS_SCRIPTABLE NS_IMETHOD GetOriginalDefaultEngine(nsISearchEngine * *aOriginalDefaultEngine) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginalDefaultEngine(aOriginalDefaultEngine); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsBrowserSearchService : public nsIBrowserSearchService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIBROWSERSEARCHSERVICE
nsBrowserSearchService();
private:
~nsBrowserSearchService();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsBrowserSearchService, nsIBrowserSearchService)
nsBrowserSearchService::nsBrowserSearchService()
{
/* member initializers and constructor code */
}
nsBrowserSearchService::~nsBrowserSearchService()
{
/* destructor code */
}
/* void addEngine (in AString engineURL, in long dataType, in AString iconURL, in boolean confirm); */
NS_IMETHODIMP nsBrowserSearchService::AddEngine(const nsAString & engineURL, PRInt32 dataType, const nsAString & iconURL, bool confirm)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addEngineWithDetails (in AString name, in AString iconURL, in AString alias, in AString description, in AString method, in AString url); */
NS_IMETHODIMP nsBrowserSearchService::AddEngineWithDetails(const nsAString & name, const nsAString & iconURL, const nsAString & alias, const nsAString & description, const nsAString & method, const nsAString & url)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void restoreDefaultEngines (); */
NS_IMETHODIMP nsBrowserSearchService::RestoreDefaultEngines()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsISearchEngine getEngineByAlias (in AString alias); */
NS_IMETHODIMP nsBrowserSearchService::GetEngineByAlias(const nsAString & alias, nsISearchEngine * *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsISearchEngine getEngineByName (in AString aEngineName); */
NS_IMETHODIMP nsBrowserSearchService::GetEngineByName(const nsAString & aEngineName, nsISearchEngine * *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
NS_IMETHODIMP nsBrowserSearchService::GetEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getVisibleEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
NS_IMETHODIMP nsBrowserSearchService::GetVisibleEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getDefaultEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines); */
NS_IMETHODIMP nsBrowserSearchService::GetDefaultEngines(PRUint32 *engineCount NS_OUTPARAM, nsISearchEngine * **engines NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void moveEngine (in nsISearchEngine engine, in long newIndex); */
NS_IMETHODIMP nsBrowserSearchService::MoveEngine(nsISearchEngine *engine, PRInt32 newIndex)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeEngine (in nsISearchEngine engine); */
NS_IMETHODIMP nsBrowserSearchService::RemoveEngine(nsISearchEngine *engine)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsISearchEngine defaultEngine; */
NS_IMETHODIMP nsBrowserSearchService::GetDefaultEngine(nsISearchEngine * *aDefaultEngine)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsISearchEngine currentEngine; */
NS_IMETHODIMP nsBrowserSearchService::GetCurrentEngine(nsISearchEngine * *aCurrentEngine)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsBrowserSearchService::SetCurrentEngine(nsISearchEngine *aCurrentEngine)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsISearchEngine originalDefaultEngine; */
NS_IMETHODIMP nsBrowserSearchService::GetOriginalDefaultEngine(nsISearchEngine * *aOriginalDefaultEngine)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/**
* 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";
#endif /* __gen_nsIBrowserSearchService_h__ */
|