/usr/include/thunderbird/nsIAnnotationService.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 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAnnotationService.idl
*/
#ifndef __gen_nsIAnnotationService_h__
#define __gen_nsIAnnotationService_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 nsIVariant; /* forward declaration */
class mozIAnnotatedResult; /* forward declaration */
/* starting interface: nsIAnnotationObserver */
#define NS_IANNOTATIONOBSERVER_IID_STR "63fe98e0-6889-4c2c-ac9f-703e4bc25027"
#define NS_IANNOTATIONOBSERVER_IID \
{0x63fe98e0, 0x6889, 0x4c2c, \
{ 0xac, 0x9f, 0x70, 0x3e, 0x4b, 0xc2, 0x50, 0x27 }}
class NS_NO_VTABLE nsIAnnotationObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANNOTATIONOBSERVER_IID)
/* void onPageAnnotationSet (in nsIURI aPage, in AUTF8String aName); */
NS_IMETHOD OnPageAnnotationSet(nsIURI *aPage, const nsACString & aName) = 0;
/* void onItemAnnotationSet (in long long aItemId, in AUTF8String aName, in unsigned short aSource); */
NS_IMETHOD OnItemAnnotationSet(int64_t aItemId, const nsACString & aName, uint16_t aSource) = 0;
/* void onPageAnnotationRemoved (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD OnPageAnnotationRemoved(nsIURI *aURI, const nsACString & aName) = 0;
/* void onItemAnnotationRemoved (in long long aItemId, in AUTF8String aName, in unsigned short aSource); */
NS_IMETHOD OnItemAnnotationRemoved(int64_t aItemId, const nsACString & aName, uint16_t aSource) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAnnotationObserver, NS_IANNOTATIONOBSERVER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANNOTATIONOBSERVER \
NS_IMETHOD OnPageAnnotationSet(nsIURI *aPage, const nsACString & aName) override; \
NS_IMETHOD OnItemAnnotationSet(int64_t aItemId, const nsACString & aName, uint16_t aSource) override; \
NS_IMETHOD OnPageAnnotationRemoved(nsIURI *aURI, const nsACString & aName) override; \
NS_IMETHOD OnItemAnnotationRemoved(int64_t aItemId, const nsACString & aName, uint16_t aSource) 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_NSIANNOTATIONOBSERVER \
NS_METHOD OnPageAnnotationSet(nsIURI *aPage, const nsACString & aName); \
NS_METHOD OnItemAnnotationSet(int64_t aItemId, const nsACString & aName, uint16_t aSource); \
NS_METHOD OnPageAnnotationRemoved(nsIURI *aURI, const nsACString & aName); \
NS_METHOD OnItemAnnotationRemoved(int64_t aItemId, const nsACString & aName, uint16_t aSource);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANNOTATIONOBSERVER(_to) \
NS_IMETHOD OnPageAnnotationSet(nsIURI *aPage, const nsACString & aName) override { return _to OnPageAnnotationSet(aPage, aName); } \
NS_IMETHOD OnItemAnnotationSet(int64_t aItemId, const nsACString & aName, uint16_t aSource) override { return _to OnItemAnnotationSet(aItemId, aName, aSource); } \
NS_IMETHOD OnPageAnnotationRemoved(nsIURI *aURI, const nsACString & aName) override { return _to OnPageAnnotationRemoved(aURI, aName); } \
NS_IMETHOD OnItemAnnotationRemoved(int64_t aItemId, const nsACString & aName, uint16_t aSource) override { return _to OnItemAnnotationRemoved(aItemId, aName, aSource); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANNOTATIONOBSERVER(_to) \
NS_IMETHOD OnPageAnnotationSet(nsIURI *aPage, const nsACString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPageAnnotationSet(aPage, aName); } \
NS_IMETHOD OnItemAnnotationSet(int64_t aItemId, const nsACString & aName, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnItemAnnotationSet(aItemId, aName, aSource); } \
NS_IMETHOD OnPageAnnotationRemoved(nsIURI *aURI, const nsACString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPageAnnotationRemoved(aURI, aName); } \
NS_IMETHOD OnItemAnnotationRemoved(int64_t aItemId, const nsACString & aName, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnItemAnnotationRemoved(aItemId, aName, aSource); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsAnnotationObserver : public nsIAnnotationObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIANNOTATIONOBSERVER
nsAnnotationObserver();
private:
~nsAnnotationObserver();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsAnnotationObserver, nsIAnnotationObserver)
nsAnnotationObserver::nsAnnotationObserver()
{
/* member initializers and constructor code */
}
nsAnnotationObserver::~nsAnnotationObserver()
{
/* destructor code */
}
/* void onPageAnnotationSet (in nsIURI aPage, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationObserver::OnPageAnnotationSet(nsIURI *aPage, const nsACString & aName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onItemAnnotationSet (in long long aItemId, in AUTF8String aName, in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationObserver::OnItemAnnotationSet(int64_t aItemId, const nsACString & aName, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onPageAnnotationRemoved (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationObserver::OnPageAnnotationRemoved(nsIURI *aURI, const nsACString & aName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void onItemAnnotationRemoved (in long long aItemId, in AUTF8String aName, in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationObserver::OnItemAnnotationRemoved(int64_t aItemId, const nsACString & aName, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIAnnotationService */
#define NS_IANNOTATIONSERVICE_IID_STR "d4cdaab1-8eec-47a8-b420-ad7cb333056a"
#define NS_IANNOTATIONSERVICE_IID \
{0xd4cdaab1, 0x8eec, 0x47a8, \
{ 0xb4, 0x20, 0xad, 0x7c, 0xb3, 0x33, 0x05, 0x6a }}
class NS_NO_VTABLE nsIAnnotationService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANNOTATIONSERVICE_IID)
enum {
EXPIRE_SESSION = 0U,
EXPIRE_WEEKS = 2U,
EXPIRE_MONTHS = 3U,
EXPIRE_NEVER = 4U,
EXPIRE_WITH_HISTORY = 5U,
EXPIRE_DAYS = 6U,
TYPE_INT32 = 1U,
TYPE_DOUBLE = 2U,
TYPE_STRING = 3U,
TYPE_INT64 = 5U
};
/* void setPageAnnotation (in nsIURI aURI, in AUTF8String aName, in nsIVariant aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHOD SetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration) = 0;
/* void setItemAnnotation (in long long aItemId, in AUTF8String aName, in nsIVariant aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHOD SetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) = 0;
/* [noscript] void setPageAnnotationString (in nsIURI aURI, in AUTF8String aName, in AString aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHOD SetPageAnnotationString(nsIURI *aURI, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration) = 0;
/* [noscript] void setItemAnnotationString (in long long aItemId, in AUTF8String aName, in AString aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHOD SetItemAnnotationString(int64_t aItemId, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) = 0;
/* [noscript] void setPageAnnotationInt32 (in nsIURI aURI, in AUTF8String aName, in long aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHOD SetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration) = 0;
/* [noscript] void setItemAnnotationInt32 (in long long aItemId, in AUTF8String aName, in long aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHOD SetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) = 0;
/* [noscript] void setPageAnnotationInt64 (in nsIURI aURI, in AUTF8String aName, in long long aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHOD SetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration) = 0;
/* [noscript] void setItemAnnotationInt64 (in long long aItemId, in AUTF8String aName, in long long aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHOD SetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) = 0;
/* [noscript] void setPageAnnotationDouble (in nsIURI aURI, in AUTF8String aName, in double aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHOD SetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration) = 0;
/* [noscript] void setItemAnnotationDouble (in long long aItemId, in AUTF8String aName, in double aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHOD SetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) = 0;
/* nsIVariant getPageAnnotation (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD GetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant * *_retval) = 0;
/* nsIVariant getItemAnnotation (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD GetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant * *_retval) = 0;
/* [noscript] AString getPageAnnotationString (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD GetPageAnnotationString(nsIURI *aURI, const nsACString & aName, nsAString & _retval) = 0;
/* [noscript] AString getItemAnnotationString (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD GetItemAnnotationString(int64_t aItemId, const nsACString & aName, nsAString & _retval) = 0;
/* [noscript] long getPageAnnotationInt32 (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD GetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t *_retval) = 0;
/* [noscript] long getItemAnnotationInt32 (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD GetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t *_retval) = 0;
/* [noscript] long long getPageAnnotationInt64 (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD GetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t *_retval) = 0;
/* [noscript] long long getItemAnnotationInt64 (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD GetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t *_retval) = 0;
/* [noscript] double getPageAnnotationDouble (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD GetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double *_retval) = 0;
/* [noscript] double getItemAnnotationDouble (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD GetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double *_retval) = 0;
/* void getPageAnnotationInfo (in nsIURI aURI, in AUTF8String aName, out int32_t aFlags, out unsigned short aExpiration, out unsigned short aType); */
NS_IMETHOD GetPageAnnotationInfo(nsIURI *aURI, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) = 0;
/* void getItemAnnotationInfo (in long long aItemId, in AUTF8String aName, out long aFlags, out unsigned short aExpiration, out unsigned short aType); */
NS_IMETHOD GetItemAnnotationInfo(int64_t aItemId, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) = 0;
/* uint16_t getPageAnnotationType (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD GetPageAnnotationType(nsIURI *aURI, const nsACString & aName, uint16_t *_retval) = 0;
/* uint16_t getItemAnnotationType (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD GetItemAnnotationType(int64_t aItemId, const nsACString & aName, uint16_t *_retval) = 0;
/* void getPagesWithAnnotation (in AUTF8String name, [optional] out unsigned long resultCount, [array, size_is (resultCount), retval] out nsIURI results); */
NS_IMETHOD GetPagesWithAnnotation(const nsACString & name, uint32_t *resultCount, nsIURI * **results) = 0;
/* void getItemsWithAnnotation (in AUTF8String name, [optional] out unsigned long resultCount, [array, size_is (resultCount), retval] out long long results); */
NS_IMETHOD GetItemsWithAnnotation(const nsACString & name, uint32_t *resultCount, int64_t **results) = 0;
/* void getAnnotationsWithName (in AUTF8String name, [optional] out unsigned long count, [array, size_is (count), retval] out mozIAnnotatedResult results); */
NS_IMETHOD GetAnnotationsWithName(const nsACString & name, uint32_t *count, mozIAnnotatedResult * **results) = 0;
/* void getPageAnnotationNames (in nsIURI aURI, [optional] out unsigned long count, [array, size_is (count), retval] out nsIVariant result); */
NS_IMETHOD GetPageAnnotationNames(nsIURI *aURI, uint32_t *count, nsIVariant * **result) = 0;
/* void getItemAnnotationNames (in long long aItemId, [optional] out unsigned long count, [array, size_is (count), retval] out nsIVariant result); */
NS_IMETHOD GetItemAnnotationNames(int64_t aItemId, uint32_t *count, nsIVariant * **result) = 0;
/* boolean pageHasAnnotation (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD PageHasAnnotation(nsIURI *aURI, const nsACString & aName, bool *_retval) = 0;
/* boolean itemHasAnnotation (in long long aItemId, in AUTF8String aName); */
NS_IMETHOD ItemHasAnnotation(int64_t aItemId, const nsACString & aName, bool *_retval) = 0;
/* void removePageAnnotation (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHOD RemovePageAnnotation(nsIURI *aURI, const nsACString & aName) = 0;
/* void removeItemAnnotation (in long long aItemId, in AUTF8String aName, [optional] in unsigned short aSource); */
NS_IMETHOD RemoveItemAnnotation(int64_t aItemId, const nsACString & aName, uint16_t aSource) = 0;
/* void removePageAnnotations (in nsIURI aURI); */
NS_IMETHOD RemovePageAnnotations(nsIURI *aURI) = 0;
/* void removeItemAnnotations (in long long aItemId, [optional] in unsigned short aSource); */
NS_IMETHOD RemoveItemAnnotations(int64_t aItemId, uint16_t aSource) = 0;
/* void copyPageAnnotations (in nsIURI aSourceURI, in nsIURI aDestURI, in boolean aOverwriteDest); */
NS_IMETHOD CopyPageAnnotations(nsIURI *aSourceURI, nsIURI *aDestURI, bool aOverwriteDest) = 0;
/* void copyItemAnnotations (in long long aSourceItemId, in long long aDestItemId, in boolean aOverwriteDest, [optional] in unsigned short aSource); */
NS_IMETHOD CopyItemAnnotations(int64_t aSourceItemId, int64_t aDestItemId, bool aOverwriteDest, uint16_t aSource) = 0;
/* void addObserver (in nsIAnnotationObserver aObserver); */
NS_IMETHOD AddObserver(nsIAnnotationObserver *aObserver) = 0;
/* void removeObserver (in nsIAnnotationObserver aObserver); */
NS_IMETHOD RemoveObserver(nsIAnnotationObserver *aObserver) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAnnotationService, NS_IANNOTATIONSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANNOTATIONSERVICE \
NS_IMETHOD SetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration) override; \
NS_IMETHOD SetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override; \
NS_IMETHOD SetPageAnnotationString(nsIURI *aURI, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration) override; \
NS_IMETHOD SetItemAnnotationString(int64_t aItemId, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override; \
NS_IMETHOD SetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration) override; \
NS_IMETHOD SetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override; \
NS_IMETHOD SetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration) override; \
NS_IMETHOD SetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override; \
NS_IMETHOD SetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration) override; \
NS_IMETHOD SetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override; \
NS_IMETHOD GetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant * *_retval) override; \
NS_IMETHOD GetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant * *_retval) override; \
NS_IMETHOD GetPageAnnotationString(nsIURI *aURI, const nsACString & aName, nsAString & _retval) override; \
NS_IMETHOD GetItemAnnotationString(int64_t aItemId, const nsACString & aName, nsAString & _retval) override; \
NS_IMETHOD GetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t *_retval) override; \
NS_IMETHOD GetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t *_retval) override; \
NS_IMETHOD GetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t *_retval) override; \
NS_IMETHOD GetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t *_retval) override; \
NS_IMETHOD GetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double *_retval) override; \
NS_IMETHOD GetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double *_retval) override; \
NS_IMETHOD GetPageAnnotationInfo(nsIURI *aURI, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) override; \
NS_IMETHOD GetItemAnnotationInfo(int64_t aItemId, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) override; \
NS_IMETHOD GetPageAnnotationType(nsIURI *aURI, const nsACString & aName, uint16_t *_retval) override; \
NS_IMETHOD GetItemAnnotationType(int64_t aItemId, const nsACString & aName, uint16_t *_retval) override; \
NS_IMETHOD GetPagesWithAnnotation(const nsACString & name, uint32_t *resultCount, nsIURI * **results) override; \
NS_IMETHOD GetItemsWithAnnotation(const nsACString & name, uint32_t *resultCount, int64_t **results) override; \
NS_IMETHOD GetAnnotationsWithName(const nsACString & name, uint32_t *count, mozIAnnotatedResult * **results) override; \
NS_IMETHOD GetPageAnnotationNames(nsIURI *aURI, uint32_t *count, nsIVariant * **result) override; \
NS_IMETHOD GetItemAnnotationNames(int64_t aItemId, uint32_t *count, nsIVariant * **result) override; \
NS_IMETHOD PageHasAnnotation(nsIURI *aURI, const nsACString & aName, bool *_retval) override; \
NS_IMETHOD ItemHasAnnotation(int64_t aItemId, const nsACString & aName, bool *_retval) override; \
NS_IMETHOD RemovePageAnnotation(nsIURI *aURI, const nsACString & aName) override; \
NS_IMETHOD RemoveItemAnnotation(int64_t aItemId, const nsACString & aName, uint16_t aSource) override; \
NS_IMETHOD RemovePageAnnotations(nsIURI *aURI) override; \
NS_IMETHOD RemoveItemAnnotations(int64_t aItemId, uint16_t aSource) override; \
NS_IMETHOD CopyPageAnnotations(nsIURI *aSourceURI, nsIURI *aDestURI, bool aOverwriteDest) override; \
NS_IMETHOD CopyItemAnnotations(int64_t aSourceItemId, int64_t aDestItemId, bool aOverwriteDest, uint16_t aSource) override; \
NS_IMETHOD AddObserver(nsIAnnotationObserver *aObserver) override; \
NS_IMETHOD RemoveObserver(nsIAnnotationObserver *aObserver) 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_NSIANNOTATIONSERVICE \
NS_METHOD SetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration); \
NS_METHOD SetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource); \
NS_METHOD SetPageAnnotationString(nsIURI *aURI, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration); \
NS_METHOD SetItemAnnotationString(int64_t aItemId, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource); \
NS_METHOD SetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration); \
NS_METHOD SetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource); \
NS_METHOD SetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration); \
NS_METHOD SetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource); \
NS_METHOD SetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration); \
NS_METHOD SetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource); \
NS_METHOD GetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant * *_retval); \
NS_METHOD GetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant * *_retval); \
NS_METHOD GetPageAnnotationString(nsIURI *aURI, const nsACString & aName, nsAString & _retval); \
NS_METHOD GetItemAnnotationString(int64_t aItemId, const nsACString & aName, nsAString & _retval); \
NS_METHOD GetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t *_retval); \
NS_METHOD GetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t *_retval); \
NS_METHOD GetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t *_retval); \
NS_METHOD GetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t *_retval); \
NS_METHOD GetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double *_retval); \
NS_METHOD GetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double *_retval); \
NS_METHOD GetPageAnnotationInfo(nsIURI *aURI, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType); \
NS_METHOD GetItemAnnotationInfo(int64_t aItemId, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType); \
NS_METHOD GetPageAnnotationType(nsIURI *aURI, const nsACString & aName, uint16_t *_retval); \
NS_METHOD GetItemAnnotationType(int64_t aItemId, const nsACString & aName, uint16_t *_retval); \
NS_METHOD GetPagesWithAnnotation(const nsACString & name, uint32_t *resultCount, nsIURI * **results); \
NS_METHOD GetItemsWithAnnotation(const nsACString & name, uint32_t *resultCount, int64_t **results); \
NS_METHOD GetAnnotationsWithName(const nsACString & name, uint32_t *count, mozIAnnotatedResult * **results); \
NS_METHOD GetPageAnnotationNames(nsIURI *aURI, uint32_t *count, nsIVariant * **result); \
NS_METHOD GetItemAnnotationNames(int64_t aItemId, uint32_t *count, nsIVariant * **result); \
NS_METHOD PageHasAnnotation(nsIURI *aURI, const nsACString & aName, bool *_retval); \
NS_METHOD ItemHasAnnotation(int64_t aItemId, const nsACString & aName, bool *_retval); \
NS_METHOD RemovePageAnnotation(nsIURI *aURI, const nsACString & aName); \
NS_METHOD RemoveItemAnnotation(int64_t aItemId, const nsACString & aName, uint16_t aSource); \
NS_METHOD RemovePageAnnotations(nsIURI *aURI); \
NS_METHOD RemoveItemAnnotations(int64_t aItemId, uint16_t aSource); \
NS_METHOD CopyPageAnnotations(nsIURI *aSourceURI, nsIURI *aDestURI, bool aOverwriteDest); \
NS_METHOD CopyItemAnnotations(int64_t aSourceItemId, int64_t aDestItemId, bool aOverwriteDest, uint16_t aSource); \
NS_METHOD AddObserver(nsIAnnotationObserver *aObserver); \
NS_METHOD RemoveObserver(nsIAnnotationObserver *aObserver);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANNOTATIONSERVICE(_to) \
NS_IMETHOD SetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration) override { return _to SetPageAnnotation(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return _to SetItemAnnotation(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationString(nsIURI *aURI, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration) override { return _to SetPageAnnotationString(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationString(int64_t aItemId, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return _to SetItemAnnotationString(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration) override { return _to SetPageAnnotationInt32(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return _to SetItemAnnotationInt32(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration) override { return _to SetPageAnnotationInt64(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return _to SetItemAnnotationInt64(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration) override { return _to SetPageAnnotationDouble(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return _to SetItemAnnotationDouble(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD GetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant * *_retval) override { return _to GetPageAnnotation(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant * *_retval) override { return _to GetItemAnnotation(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationString(nsIURI *aURI, const nsACString & aName, nsAString & _retval) override { return _to GetPageAnnotationString(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationString(int64_t aItemId, const nsACString & aName, nsAString & _retval) override { return _to GetItemAnnotationString(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t *_retval) override { return _to GetPageAnnotationInt32(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t *_retval) override { return _to GetItemAnnotationInt32(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t *_retval) override { return _to GetPageAnnotationInt64(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t *_retval) override { return _to GetItemAnnotationInt64(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double *_retval) override { return _to GetPageAnnotationDouble(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double *_retval) override { return _to GetItemAnnotationDouble(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationInfo(nsIURI *aURI, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) override { return _to GetPageAnnotationInfo(aURI, aName, aFlags, aExpiration, aType); } \
NS_IMETHOD GetItemAnnotationInfo(int64_t aItemId, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) override { return _to GetItemAnnotationInfo(aItemId, aName, aFlags, aExpiration, aType); } \
NS_IMETHOD GetPageAnnotationType(nsIURI *aURI, const nsACString & aName, uint16_t *_retval) override { return _to GetPageAnnotationType(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationType(int64_t aItemId, const nsACString & aName, uint16_t *_retval) override { return _to GetItemAnnotationType(aItemId, aName, _retval); } \
NS_IMETHOD GetPagesWithAnnotation(const nsACString & name, uint32_t *resultCount, nsIURI * **results) override { return _to GetPagesWithAnnotation(name, resultCount, results); } \
NS_IMETHOD GetItemsWithAnnotation(const nsACString & name, uint32_t *resultCount, int64_t **results) override { return _to GetItemsWithAnnotation(name, resultCount, results); } \
NS_IMETHOD GetAnnotationsWithName(const nsACString & name, uint32_t *count, mozIAnnotatedResult * **results) override { return _to GetAnnotationsWithName(name, count, results); } \
NS_IMETHOD GetPageAnnotationNames(nsIURI *aURI, uint32_t *count, nsIVariant * **result) override { return _to GetPageAnnotationNames(aURI, count, result); } \
NS_IMETHOD GetItemAnnotationNames(int64_t aItemId, uint32_t *count, nsIVariant * **result) override { return _to GetItemAnnotationNames(aItemId, count, result); } \
NS_IMETHOD PageHasAnnotation(nsIURI *aURI, const nsACString & aName, bool *_retval) override { return _to PageHasAnnotation(aURI, aName, _retval); } \
NS_IMETHOD ItemHasAnnotation(int64_t aItemId, const nsACString & aName, bool *_retval) override { return _to ItemHasAnnotation(aItemId, aName, _retval); } \
NS_IMETHOD RemovePageAnnotation(nsIURI *aURI, const nsACString & aName) override { return _to RemovePageAnnotation(aURI, aName); } \
NS_IMETHOD RemoveItemAnnotation(int64_t aItemId, const nsACString & aName, uint16_t aSource) override { return _to RemoveItemAnnotation(aItemId, aName, aSource); } \
NS_IMETHOD RemovePageAnnotations(nsIURI *aURI) override { return _to RemovePageAnnotations(aURI); } \
NS_IMETHOD RemoveItemAnnotations(int64_t aItemId, uint16_t aSource) override { return _to RemoveItemAnnotations(aItemId, aSource); } \
NS_IMETHOD CopyPageAnnotations(nsIURI *aSourceURI, nsIURI *aDestURI, bool aOverwriteDest) override { return _to CopyPageAnnotations(aSourceURI, aDestURI, aOverwriteDest); } \
NS_IMETHOD CopyItemAnnotations(int64_t aSourceItemId, int64_t aDestItemId, bool aOverwriteDest, uint16_t aSource) override { return _to CopyItemAnnotations(aSourceItemId, aDestItemId, aOverwriteDest, aSource); } \
NS_IMETHOD AddObserver(nsIAnnotationObserver *aObserver) override { return _to AddObserver(aObserver); } \
NS_IMETHOD RemoveObserver(nsIAnnotationObserver *aObserver) override { return _to RemoveObserver(aObserver); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANNOTATIONSERVICE(_to) \
NS_IMETHOD SetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageAnnotation(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemAnnotation(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationString(nsIURI *aURI, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageAnnotationString(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationString(int64_t aItemId, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemAnnotationString(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageAnnotationInt32(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemAnnotationInt32(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageAnnotationInt64(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemAnnotationInt64(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD SetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageAnnotationDouble(aURI, aName, aValue, aFlags, aExpiration); } \
NS_IMETHOD SetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemAnnotationDouble(aItemId, aName, aValue, aFlags, aExpiration, aSource); } \
NS_IMETHOD GetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotation(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotation(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationString(nsIURI *aURI, const nsACString & aName, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationString(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationString(int64_t aItemId, const nsACString & aName, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationString(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationInt32(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationInt32(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationInt64(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationInt64(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationDouble(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationDouble(aItemId, aName, _retval); } \
NS_IMETHOD GetPageAnnotationInfo(nsIURI *aURI, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationInfo(aURI, aName, aFlags, aExpiration, aType); } \
NS_IMETHOD GetItemAnnotationInfo(int64_t aItemId, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationInfo(aItemId, aName, aFlags, aExpiration, aType); } \
NS_IMETHOD GetPageAnnotationType(nsIURI *aURI, const nsACString & aName, uint16_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationType(aURI, aName, _retval); } \
NS_IMETHOD GetItemAnnotationType(int64_t aItemId, const nsACString & aName, uint16_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationType(aItemId, aName, _retval); } \
NS_IMETHOD GetPagesWithAnnotation(const nsACString & name, uint32_t *resultCount, nsIURI * **results) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPagesWithAnnotation(name, resultCount, results); } \
NS_IMETHOD GetItemsWithAnnotation(const nsACString & name, uint32_t *resultCount, int64_t **results) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemsWithAnnotation(name, resultCount, results); } \
NS_IMETHOD GetAnnotationsWithName(const nsACString & name, uint32_t *count, mozIAnnotatedResult * **results) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnnotationsWithName(name, count, results); } \
NS_IMETHOD GetPageAnnotationNames(nsIURI *aURI, uint32_t *count, nsIVariant * **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPageAnnotationNames(aURI, count, result); } \
NS_IMETHOD GetItemAnnotationNames(int64_t aItemId, uint32_t *count, nsIVariant * **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemAnnotationNames(aItemId, count, result); } \
NS_IMETHOD PageHasAnnotation(nsIURI *aURI, const nsACString & aName, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PageHasAnnotation(aURI, aName, _retval); } \
NS_IMETHOD ItemHasAnnotation(int64_t aItemId, const nsACString & aName, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ItemHasAnnotation(aItemId, aName, _retval); } \
NS_IMETHOD RemovePageAnnotation(nsIURI *aURI, const nsACString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePageAnnotation(aURI, aName); } \
NS_IMETHOD RemoveItemAnnotation(int64_t aItemId, const nsACString & aName, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveItemAnnotation(aItemId, aName, aSource); } \
NS_IMETHOD RemovePageAnnotations(nsIURI *aURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePageAnnotations(aURI); } \
NS_IMETHOD RemoveItemAnnotations(int64_t aItemId, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveItemAnnotations(aItemId, aSource); } \
NS_IMETHOD CopyPageAnnotations(nsIURI *aSourceURI, nsIURI *aDestURI, bool aOverwriteDest) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyPageAnnotations(aSourceURI, aDestURI, aOverwriteDest); } \
NS_IMETHOD CopyItemAnnotations(int64_t aSourceItemId, int64_t aDestItemId, bool aOverwriteDest, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyItemAnnotations(aSourceItemId, aDestItemId, aOverwriteDest, aSource); } \
NS_IMETHOD AddObserver(nsIAnnotationObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
NS_IMETHOD RemoveObserver(nsIAnnotationObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsAnnotationService : public nsIAnnotationService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIANNOTATIONSERVICE
nsAnnotationService();
private:
~nsAnnotationService();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsAnnotationService, nsIAnnotationService)
nsAnnotationService::nsAnnotationService()
{
/* member initializers and constructor code */
}
nsAnnotationService::~nsAnnotationService()
{
/* destructor code */
}
/* void setPageAnnotation (in nsIURI aURI, in AUTF8String aName, in nsIVariant aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHODIMP nsAnnotationService::SetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setItemAnnotation (in long long aItemId, in AUTF8String aName, in nsIVariant aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::SetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant *aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setPageAnnotationString (in nsIURI aURI, in AUTF8String aName, in AString aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHODIMP nsAnnotationService::SetPageAnnotationString(nsIURI *aURI, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setItemAnnotationString (in long long aItemId, in AUTF8String aName, in AString aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::SetItemAnnotationString(int64_t aItemId, const nsACString & aName, const nsAString & aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setPageAnnotationInt32 (in nsIURI aURI, in AUTF8String aName, in long aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHODIMP nsAnnotationService::SetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setItemAnnotationInt32 (in long long aItemId, in AUTF8String aName, in long aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::SetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setPageAnnotationInt64 (in nsIURI aURI, in AUTF8String aName, in long long aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHODIMP nsAnnotationService::SetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setItemAnnotationInt64 (in long long aItemId, in AUTF8String aName, in long long aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::SetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setPageAnnotationDouble (in nsIURI aURI, in AUTF8String aName, in double aValue, in long aFlags, in unsigned short aExpiration); */
NS_IMETHODIMP nsAnnotationService::SetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void setItemAnnotationDouble (in long long aItemId, in AUTF8String aName, in double aValue, in long aFlags, in unsigned short aExpiration, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::SetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double aValue, int32_t aFlags, uint16_t aExpiration, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIVariant getPageAnnotation (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotation(nsIURI *aURI, const nsACString & aName, nsIVariant * *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIVariant getItemAnnotation (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotation(int64_t aItemId, const nsACString & aName, nsIVariant * *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] AString getPageAnnotationString (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationString(nsIURI *aURI, const nsACString & aName, nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] AString getItemAnnotationString (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationString(int64_t aItemId, const nsACString & aName, nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] long getPageAnnotationInt32 (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationInt32(nsIURI *aURI, const nsACString & aName, int32_t *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] long getItemAnnotationInt32 (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationInt32(int64_t aItemId, const nsACString & aName, int32_t *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] long long getPageAnnotationInt64 (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationInt64(nsIURI *aURI, const nsACString & aName, int64_t *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] long long getItemAnnotationInt64 (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationInt64(int64_t aItemId, const nsACString & aName, int64_t *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] double getPageAnnotationDouble (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationDouble(nsIURI *aURI, const nsACString & aName, double *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] double getItemAnnotationDouble (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationDouble(int64_t aItemId, const nsACString & aName, double *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getPageAnnotationInfo (in nsIURI aURI, in AUTF8String aName, out int32_t aFlags, out unsigned short aExpiration, out unsigned short aType); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationInfo(nsIURI *aURI, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getItemAnnotationInfo (in long long aItemId, in AUTF8String aName, out long aFlags, out unsigned short aExpiration, out unsigned short aType); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationInfo(int64_t aItemId, const nsACString & aName, int32_t *aFlags, uint16_t *aExpiration, uint16_t *aType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* uint16_t getPageAnnotationType (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationType(nsIURI *aURI, const nsACString & aName, uint16_t *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* uint16_t getItemAnnotationType (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationType(int64_t aItemId, const nsACString & aName, uint16_t *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getPagesWithAnnotation (in AUTF8String name, [optional] out unsigned long resultCount, [array, size_is (resultCount), retval] out nsIURI results); */
NS_IMETHODIMP nsAnnotationService::GetPagesWithAnnotation(const nsACString & name, uint32_t *resultCount, nsIURI * **results)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getItemsWithAnnotation (in AUTF8String name, [optional] out unsigned long resultCount, [array, size_is (resultCount), retval] out long long results); */
NS_IMETHODIMP nsAnnotationService::GetItemsWithAnnotation(const nsACString & name, uint32_t *resultCount, int64_t **results)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getAnnotationsWithName (in AUTF8String name, [optional] out unsigned long count, [array, size_is (count), retval] out mozIAnnotatedResult results); */
NS_IMETHODIMP nsAnnotationService::GetAnnotationsWithName(const nsACString & name, uint32_t *count, mozIAnnotatedResult * **results)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getPageAnnotationNames (in nsIURI aURI, [optional] out unsigned long count, [array, size_is (count), retval] out nsIVariant result); */
NS_IMETHODIMP nsAnnotationService::GetPageAnnotationNames(nsIURI *aURI, uint32_t *count, nsIVariant * **result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getItemAnnotationNames (in long long aItemId, [optional] out unsigned long count, [array, size_is (count), retval] out nsIVariant result); */
NS_IMETHODIMP nsAnnotationService::GetItemAnnotationNames(int64_t aItemId, uint32_t *count, nsIVariant * **result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean pageHasAnnotation (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::PageHasAnnotation(nsIURI *aURI, const nsACString & aName, bool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean itemHasAnnotation (in long long aItemId, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::ItemHasAnnotation(int64_t aItemId, const nsACString & aName, bool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removePageAnnotation (in nsIURI aURI, in AUTF8String aName); */
NS_IMETHODIMP nsAnnotationService::RemovePageAnnotation(nsIURI *aURI, const nsACString & aName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeItemAnnotation (in long long aItemId, in AUTF8String aName, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::RemoveItemAnnotation(int64_t aItemId, const nsACString & aName, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removePageAnnotations (in nsIURI aURI); */
NS_IMETHODIMP nsAnnotationService::RemovePageAnnotations(nsIURI *aURI)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeItemAnnotations (in long long aItemId, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::RemoveItemAnnotations(int64_t aItemId, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void copyPageAnnotations (in nsIURI aSourceURI, in nsIURI aDestURI, in boolean aOverwriteDest); */
NS_IMETHODIMP nsAnnotationService::CopyPageAnnotations(nsIURI *aSourceURI, nsIURI *aDestURI, bool aOverwriteDest)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void copyItemAnnotations (in long long aSourceItemId, in long long aDestItemId, in boolean aOverwriteDest, [optional] in unsigned short aSource); */
NS_IMETHODIMP nsAnnotationService::CopyItemAnnotations(int64_t aSourceItemId, int64_t aDestItemId, bool aOverwriteDest, uint16_t aSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addObserver (in nsIAnnotationObserver aObserver); */
NS_IMETHODIMP nsAnnotationService::AddObserver(nsIAnnotationObserver *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeObserver (in nsIAnnotationObserver aObserver); */
NS_IMETHODIMP nsAnnotationService::RemoveObserver(nsIAnnotationObserver *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: mozIAnnotatedResult */
#define MOZIANNOTATEDRESULT_IID_STR "81fd0188-db6a-492e-80b6-f6414913b396"
#define MOZIANNOTATEDRESULT_IID \
{0x81fd0188, 0xdb6a, 0x492e, \
{ 0x80, 0xb6, 0xf6, 0x41, 0x49, 0x13, 0xb3, 0x96 }}
class NS_NO_VTABLE mozIAnnotatedResult : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZIANNOTATEDRESULT_IID)
/* readonly attribute AUTF8String guid; */
NS_IMETHOD GetGuid(nsACString & aGuid) = 0;
/* readonly attribute nsIURI uri; */
NS_IMETHOD GetUri(nsIURI * *aUri) = 0;
/* readonly attribute long long itemId; */
NS_IMETHOD GetItemId(int64_t *aItemId) = 0;
/* readonly attribute AUTF8String annotationName; */
NS_IMETHOD GetAnnotationName(nsACString & aAnnotationName) = 0;
/* readonly attribute nsIVariant annotationValue; */
NS_IMETHOD GetAnnotationValue(nsIVariant * *aAnnotationValue) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIAnnotatedResult, MOZIANNOTATEDRESULT_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIANNOTATEDRESULT \
NS_IMETHOD GetGuid(nsACString & aGuid) override; \
NS_IMETHOD GetUri(nsIURI * *aUri) override; \
NS_IMETHOD GetItemId(int64_t *aItemId) override; \
NS_IMETHOD GetAnnotationName(nsACString & aAnnotationName) override; \
NS_IMETHOD GetAnnotationValue(nsIVariant * *aAnnotationValue) 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_MOZIANNOTATEDRESULT \
NS_METHOD GetGuid(nsACString & aGuid); \
NS_METHOD GetUri(nsIURI * *aUri); \
NS_METHOD GetItemId(int64_t *aItemId); \
NS_METHOD GetAnnotationName(nsACString & aAnnotationName); \
NS_METHOD GetAnnotationValue(nsIVariant * *aAnnotationValue);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIANNOTATEDRESULT(_to) \
NS_IMETHOD GetGuid(nsACString & aGuid) override { return _to GetGuid(aGuid); } \
NS_IMETHOD GetUri(nsIURI * *aUri) override { return _to GetUri(aUri); } \
NS_IMETHOD GetItemId(int64_t *aItemId) override { return _to GetItemId(aItemId); } \
NS_IMETHOD GetAnnotationName(nsACString & aAnnotationName) override { return _to GetAnnotationName(aAnnotationName); } \
NS_IMETHOD GetAnnotationValue(nsIVariant * *aAnnotationValue) override { return _to GetAnnotationValue(aAnnotationValue); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIANNOTATEDRESULT(_to) \
NS_IMETHOD GetGuid(nsACString & aGuid) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGuid(aGuid); } \
NS_IMETHOD GetUri(nsIURI * *aUri) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUri(aUri); } \
NS_IMETHOD GetItemId(int64_t *aItemId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemId(aItemId); } \
NS_IMETHOD GetAnnotationName(nsACString & aAnnotationName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnnotationName(aAnnotationName); } \
NS_IMETHOD GetAnnotationValue(nsIVariant * *aAnnotationValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnnotationValue(aAnnotationValue); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public mozIAnnotatedResult
{
public:
NS_DECL_ISUPPORTS
NS_DECL_MOZIANNOTATEDRESULT
_MYCLASS_();
private:
~_MYCLASS_();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(_MYCLASS_, mozIAnnotatedResult)
_MYCLASS_::_MYCLASS_()
{
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* readonly attribute AUTF8String guid; */
NS_IMETHODIMP _MYCLASS_::GetGuid(nsACString & aGuid)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIURI uri; */
NS_IMETHODIMP _MYCLASS_::GetUri(nsIURI * *aUri)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute long long itemId; */
NS_IMETHODIMP _MYCLASS_::GetItemId(int64_t *aItemId)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AUTF8String annotationName; */
NS_IMETHODIMP _MYCLASS_::GetAnnotationName(nsACString & aAnnotationName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIVariant annotationValue; */
NS_IMETHODIMP _MYCLASS_::GetAnnotationValue(nsIVariant * *aAnnotationValue)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIAnnotationService_h__ */
|