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 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 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mailnews/db/msgdb/public/nsIMsgDatabase.idl
 */

#ifndef __gen_nsIMsgDatabase_h__
#define __gen_nsIMsgDatabase_h__


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

#ifndef __gen_nsIDBChangeAnnouncer_h__
#include "nsIDBChangeAnnouncer.h"
#endif

#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
#include "nsTArray.h"
class nsIMutableArray; /* forward declaration */

class nsIMsgDatabase; /* forward declaration */

class nsIMsgDBView; /* forward declaration */

class nsIDBChangeListener; /* forward declaration */

class nsIMsgDBHdr; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */

class nsIMsgThread; /* forward declaration */

class nsIDBFolderInfo; /* forward declaration */

class nsIMsgOfflineImapOperation; /* forward declaration */

class nsIMsgFolder; /* forward declaration */

class nsIMsgKeyArray; /* forward declaration */

class nsIFile; /* forward declaration */

class nsIArray; /* forward declaration */

typedef uint32_t  nsMsgRetainByPreference;


/* starting interface:    nsIMsgRetentionSettings */
#define NS_IMSGRETENTIONSETTINGS_IID_STR "fe8b7cec-eec8-4bcd-82ff-d8bb23cef3da"

#define NS_IMSGRETENTIONSETTINGS_IID \
  {0xfe8b7cec, 0xeec8, 0x4bcd, \
    { 0x82, 0xff, 0xd8, 0xbb, 0x23, 0xce, 0xf3, 0xda }}

class NS_NO_VTABLE nsIMsgRetentionSettings : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGRETENTIONSETTINGS_IID)

  enum {
    nsMsgRetainAll = 1U,
    nsMsgRetainByAge = 2U,
    nsMsgRetainByNumHeaders = 3U
  };

  /* attribute boolean useServerDefaults; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) = 0;

  /* attribute nsMsgRetainByPreference retainByPreference; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) = 0;

  /* attribute unsigned long daysToKeepHdrs; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) = 0;

  /* attribute unsigned long numHeadersToKeep; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) = 0;

  /* attribute boolean cleanupBodiesByDays; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) = 0;

  /* attribute unsigned long daysToKeepBodies; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) = 0;

  /* attribute boolean applyToFlaggedMessages; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgRetentionSettings, NS_IMSGRETENTIONSETTINGS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGRETENTIONSETTINGS \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override; \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override; \
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) override; \
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) override; \
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) override; \
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) override; \
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) override; \
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) override; \
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) override; \
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) override; \
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) override; \
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) override; \
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) override; \
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) 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_NSIMSGRETENTIONSETTINGS \
  nsresult GetUseServerDefaults(bool *aUseServerDefaults); \
  nsresult SetUseServerDefaults(bool aUseServerDefaults); \
  nsresult GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference); \
  nsresult SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference); \
  nsresult GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs); \
  nsresult SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs); \
  nsresult GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep); \
  nsresult SetNumHeadersToKeep(uint32_t aNumHeadersToKeep); \
  nsresult GetCleanupBodiesByDays(bool *aCleanupBodiesByDays); \
  nsresult SetCleanupBodiesByDays(bool aCleanupBodiesByDays); \
  nsresult GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies); \
  nsresult SetDaysToKeepBodies(uint32_t aDaysToKeepBodies); \
  nsresult GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages); \
  nsresult SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGRETENTIONSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return _to GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return _to SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) override { return _to GetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) override { return _to SetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) override { return _to GetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) override { return _to SetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) override { return _to GetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) override { return _to SetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) override { return _to GetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) override { return _to SetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) override { return _to GetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) override { return _to SetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) override { return _to GetApplyToFlaggedMessages(aApplyToFlaggedMessages); } \
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) override { return _to SetApplyToFlaggedMessages(aApplyToFlaggedMessages); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGRETENTIONSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplyToFlaggedMessages(aApplyToFlaggedMessages); } \
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetApplyToFlaggedMessages(aApplyToFlaggedMessages); } 


/* starting interface:    nsIMsgDownloadSettings */
#define NS_IMSGDOWNLOADSETTINGS_IID_STR "86a9da90-14f1-11d5-a5c0-0060b0fc04b7"

#define NS_IMSGDOWNLOADSETTINGS_IID \
  {0x86a9da90, 0x14f1, 0x11d5, \
    { 0xa5, 0xc0, 0x00, 0x60, 0xb0, 0xfc, 0x04, 0xb7 }}

class NS_NO_VTABLE nsIMsgDownloadSettings : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGDOWNLOADSETTINGS_IID)

  /* attribute boolean useServerDefaults; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) = 0;

  /* attribute boolean downloadByDate; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) = 0;

  /* attribute boolean downloadUnreadOnly; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) = 0;

  /* attribute unsigned long ageLimitOfMsgsToDownload; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgDownloadSettings, NS_IMSGDOWNLOADSETTINGS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDOWNLOADSETTINGS \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override; \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override; \
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) override; \
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) override; \
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) override; \
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) override; \
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) override; \
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) 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_NSIMSGDOWNLOADSETTINGS \
  nsresult GetUseServerDefaults(bool *aUseServerDefaults); \
  nsresult SetUseServerDefaults(bool aUseServerDefaults); \
  nsresult GetDownloadByDate(bool *aDownloadByDate); \
  nsresult SetDownloadByDate(bool aDownloadByDate); \
  nsresult GetDownloadUnreadOnly(bool *aDownloadUnreadOnly); \
  nsresult SetDownloadUnreadOnly(bool aDownloadUnreadOnly); \
  nsresult GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload); \
  nsresult SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDOWNLOADSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return _to GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return _to SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) override { return _to GetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) override { return _to SetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) override { return _to GetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) override { return _to SetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) override { return _to GetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } \
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) override { return _to SetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGDOWNLOADSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } \
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } 

typedef int32_t  nsMsgDBCommit;


/* starting interface:    nsMsgDBCommitType */
#define NS_MSGDBCOMMITTYPE_IID_STR "15431853-e448-45dc-8978-9958bf74d9b7"

#define NS_MSGDBCOMMITTYPE_IID \
  {0x15431853, 0xe448, 0x45dc, \
    { 0x89, 0x78, 0x99, 0x58, 0xbf, 0x74, 0xd9, 0xb7 }}

class NS_NO_VTABLE nsMsgDBCommitType {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGDBCOMMITTYPE_IID)

  enum {
    kLargeCommit = 1,
    kSessionCommit = 2,
    kCompressCommit = 3
  };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgDBCommitType, NS_MSGDBCOMMITTYPE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSMSGDBCOMMITTYPE \

/* 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_NSMSGDBCOMMITTYPE \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGDBCOMMITTYPE(_to) \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSMSGDBCOMMITTYPE(_to) \


/* starting interface:    nsIMsgDBService */
#define NS_IMSGDBSERVICE_IID_STR "4cbbf024-3760-402d-89f3-6ababafeb07d"

#define NS_IMSGDBSERVICE_IID \
  {0x4cbbf024, 0x3760, 0x402d, \
    { 0x89, 0xf3, 0x6a, 0xba, 0xba, 0xfe, 0xb0, 0x7d }}

class NS_NO_VTABLE nsIMsgDBService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGDBSERVICE_IID)

  /* nsIMsgDatabase openFolderDB (in nsIMsgFolder aFolder, in boolean aLeaveInvalidDB); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) = 0;

  /* nsIMsgDatabase asyncOpenFolderDB (in nsIMsgFolder aFolder, in boolean aLeaveInvalidDB); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) = 0;

  /* boolean openMore (in nsIMsgDatabase aDB, in unsigned long aTimeHint); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) = 0;

  /* nsIMsgDatabase createNewDB (in nsIMsgFolder aFolder); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) = 0;

  /* nsIMsgDatabase openMailDBFromFile (in nsIFile aFile, in nsIMsgFolder aFolder, in boolean aCreate, in boolean aLeaveInvalidDB); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) = 0;

  /* void registerPendingListener (in nsIMsgFolder aFolder, in nsIDBChangeListener aListener); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) = 0;

  /* void unregisterPendingListener (in nsIDBChangeListener aListener); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) = 0;

  /* nsIMsgDatabase cachedDBForFolder (in nsIMsgFolder aFolder); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) = 0;

  /* void forceFolderDBClosed (in nsIMsgFolder aFolder); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) = 0;

  /* readonly attribute nsIArray openDBs; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetOpenDBs(nsIArray **aOpenDBs) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgDBService, NS_IMSGDBSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDBSERVICE \
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override; \
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override; \
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) override; \
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) override; \
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override; \
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) override; \
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) override; \
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) override; \
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) override; \
  NS_IMETHOD GetOpenDBs(nsIArray **aOpenDBs) 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_NSIMSGDBSERVICE \
  nsresult OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval); \
  nsresult AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval); \
  nsresult OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval); \
  nsresult CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval); \
  nsresult OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase **_retval); \
  nsresult RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener); \
  nsresult UnregisterPendingListener(nsIDBChangeListener *aListener); \
  nsresult CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval); \
  nsresult ForceFolderDBClosed(nsIMsgFolder *aFolder); \
  nsresult GetOpenDBs(nsIArray **aOpenDBs); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDBSERVICE(_to) \
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override { return _to OpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override { return _to AsyncOpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) override { return _to OpenMore(aDB, aTimeHint, _retval); } \
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) override { return _to CreateNewDB(aFolder, _retval); } \
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override { return _to OpenMailDBFromFile(aFile, aFolder, aCreate, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) override { return _to RegisterPendingListener(aFolder, aListener); } \
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) override { return _to UnregisterPendingListener(aListener); } \
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) override { return _to CachedDBForFolder(aFolder, _retval); } \
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) override { return _to ForceFolderDBClosed(aFolder); } \
  NS_IMETHOD GetOpenDBs(nsIArray **aOpenDBs) override { return _to GetOpenDBs(aOpenDBs); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGDBSERVICE(_to) \
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncOpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenMore(aDB, aTimeHint, _retval); } \
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewDB(aFolder, _retval); } \
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenMailDBFromFile(aFile, aFolder, aCreate, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterPendingListener(aFolder, aListener); } \
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterPendingListener(aListener); } \
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CachedDBForFolder(aFolder, _retval); } \
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceFolderDBClosed(aFolder); } \
  NS_IMETHOD GetOpenDBs(nsIArray **aOpenDBs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOpenDBs(aOpenDBs); } 


/* starting interface:    nsIMsgDatabase */
#define NS_IMSGDATABASE_IID_STR "b64e66f8-4717-423a-be42-482658fb2199"

#define NS_IMSGDATABASE_IID \
  {0xb64e66f8, 0x4717, 0x423a, \
    { 0xbe, 0x42, 0x48, 0x26, 0x58, 0xfb, 0x21, 0x99 }}

class NS_NO_VTABLE nsIMsgDatabase : public nsIDBChangeAnnouncer {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGDATABASE_IID)

  /* void Close (in boolean aForceCommit); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Close(bool aForceCommit) = 0;

  /* void Commit (in nsMsgDBCommit commitType); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Commit(nsMsgDBCommit commitType) = 0;

  /* void ForceClosed (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ForceClosed(void) = 0;

  /* void clearCachedHdrs (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearCachedHdrs(void) = 0;

  /* void resetHdrCacheSize (in unsigned long size); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ResetHdrCacheSize(uint32_t size) = 0;

  /* readonly attribute nsIDBFolderInfo dBFolderInfo; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo **aDBFolderInfo) = 0;

  /* readonly attribute long long databaseSize; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) = 0;

  /* readonly attribute nsIMsgFolder folder; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFolder(nsIMsgFolder **aFolder) = 0;

  /* attribute PRTime lastUseTime; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) = 0;

  /* nsIMsgDBHdr GetMsgHdrForKey (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval) = 0;

  /* nsIMsgDBHdr getMsgHdrForMessageID (in string messageID); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr **_retval) = 0;

  /* nsIMsgDBHdr GetMsgHdrForGMMsgID (in string aGmailMessageID); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr **_retval) = 0;

  /* boolean ContainsKey (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) = 0;

  /* nsIMsgDBHdr CreateNewHdr (in nsMsgKey aKey); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr **_retval) = 0;

  /* void AddNewHdrToDB (in nsIMsgDBHdr newHdr, in boolean notify); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) = 0;

  /* nsIMsgDBHdr CopyHdrFromExistingHdr (in nsMsgKey key, in nsIMsgDBHdr existingHdr, in boolean addHdrToDB); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr **_retval) = 0;

  /* void ListAllKeys (in nsIMsgKeyArray array); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) = 0;

  /* nsISimpleEnumerator EnumerateMessages (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval) = 0;

  /* nsISimpleEnumerator ReverseEnumerateMessages (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator **_retval) = 0;

  /* nsISimpleEnumerator EnumerateThreads (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval) = 0;

  /* nsISimpleEnumerator getFilterEnumerator (in nsIArray searchTerms, [optional] in boolean reverse); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator **_retval) = 0;

  /* boolean nextMatchingHdrs (in nsISimpleEnumerator enumerator, in long numHdrsToLookAt, in long maxResults, in nsIMutableArray matchingHdrs, out long numMatches); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) = 0;

  /* void syncCounts (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SyncCounts(void) = 0;

  /* nsIMsgThread GetThreadContainingMsgHdr (in nsIMsgDBHdr msgHdr); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval) = 0;

  /* void MarkHdrRead (in nsIMsgDBHdr msgHdr, in boolean bRead, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) = 0;

  /* void MarkHdrReplied (in nsIMsgDBHdr msgHdr, in boolean bReplied, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) = 0;

  /* void MarkHdrMarked (in nsIMsgDBHdr msgHdr, in boolean mark, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) = 0;

  /* void MarkHdrNotNew (in nsIMsgDBHdr aMsgHdr, in nsIDBChangeListener aInstigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) = 0;

  /* void MarkMDNNeeded (in nsMsgKey key, in boolean bNeeded, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) = 0;

  /* boolean IsMDNNeeded (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) = 0;

  /* void MarkMDNSent (in nsMsgKey key, in boolean bNeeded, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) = 0;

  /* boolean IsMDNSent (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) = 0;

  /* void MarkRead (in nsMsgKey key, in boolean bRead, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) = 0;

  /* void MarkReplied (in nsMsgKey key, in boolean bReplied, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) = 0;

  /* void MarkForwarded (in nsMsgKey key, in boolean bForwarded, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) = 0;

  /* void MarkHasAttachments (in nsMsgKey key, in boolean bHasAttachments, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) = 0;

  /* void MarkThreadRead (in nsIMsgThread thread, in nsIDBChangeListener instigator, out unsigned long aCount, [array, size_is (aCount)] out nsMsgKey aKeys); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) = 0;

  /* void MarkThreadIgnored (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bIgnored, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) = 0;

  /* void MarkThreadWatched (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bWatched, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) = 0;

  /* void MarkHeaderKilled (in nsIMsgDBHdr msg, in boolean bIgnored, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) = 0;

  /* boolean IsRead (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) = 0;

  /* boolean IsIgnored (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) = 0;

  /* boolean IsWatched (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) = 0;

  /* boolean IsMarked (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) = 0;

  /* boolean HasAttachments (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) = 0;

  /* void MarkAllRead (out unsigned long aCount, [array, size_is (aCount)] out nsMsgKey aKeys); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) = 0;

  /* void deleteMessages (in unsigned long aNumKeys, [array, size_is (aNumKeys)] in nsMsgKey nsMsgKeys, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) = 0;

  /* void DeleteMessage (in nsMsgKey key, in nsIDBChangeListener instigator, in boolean commit); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) = 0;

  /* void DeleteHeader (in nsIMsgDBHdr msgHdr, in nsIDBChangeListener instigator, in boolean commit, in boolean notify); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) = 0;

  /* void RemoveHeaderMdbRow (in nsIMsgDBHdr msgHdr); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) = 0;

  /* void UndoDelete (in nsIMsgDBHdr msgHdr); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) = 0;

  /* void MarkMarked (in nsMsgKey key, in boolean mark, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) = 0;

  /* void MarkOffline (in nsMsgKey key, in boolean offline, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) = 0;

  /* void SetLabel (in nsMsgKey key, in nsMsgLabelValue label); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) = 0;

  /* void setStringProperty (in nsMsgKey aKey, in string aProperty, in string aValue); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) = 0;

  /* void setStringPropertyByHdr (in nsIMsgDBHdr msgHdr, in string aProperty, in string aValue); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) = 0;

  /* void setUint32PropertyByHdr (in nsIMsgDBHdr aMsgHdr, in string aProperty, in unsigned long aValue); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) = 0;

  /* void MarkImapDeleted (in nsMsgKey key, in boolean deleted, in nsIDBChangeListener instigator); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) = 0;

  /* readonly attribute nsMsgKey FirstNew; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) = 0;

  /* attribute nsIMsgRetentionSettings msgRetentionSettings; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings **aMsgRetentionSettings) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) = 0;

  /* void applyRetentionSettings (in nsIMsgRetentionSettings aMsgRetentionSettings, in boolean aDeleteViaFolder); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) = 0;

  /* attribute nsIMsgDownloadSettings msgDownloadSettings; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings **aMsgDownloadSettings) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) = 0;

  /* boolean HasNew (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasNew(bool *_retval) = 0;

  /* void ClearNewList (in boolean notify); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearNewList(bool notify) = 0;

  /* void AddToNewList (in nsMsgKey key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddToNewList(nsMsgKey key) = 0;

  /* attribute boolean summaryValid; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSummaryValid(bool *aSummaryValid) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetSummaryValid(bool aSummaryValid) = 0;

  /* nsIMsgOfflineImapOperation GetOfflineOpForKey (in nsMsgKey messageKey, in boolean create); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation **_retval) = 0;

  /* void RemoveOfflineOp (in nsIMsgOfflineImapOperation op); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) = 0;

  /* nsISimpleEnumerator EnumerateOfflineOps (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator **_retval) = 0;

  /* [noscript] void ListAllOfflineOpIds (in nsMsgKeyArrayPtr offlineOpIds); */
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> * offlineOpIds) = 0;

  /* [noscript] void ListAllOfflineDeletes (in nsMsgKeyArrayPtr offlineDeletes); */
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> * offlineDeletes) = 0;

  /* void ListAllOfflineMsgs (in nsIMsgKeyArray aKeys); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) = 0;

  /* void setAttributeOnPendingHdr (in nsIMsgDBHdr pendingHdr, in string property, in string propertyVal); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) = 0;

  /* void setUint32AttributeOnPendingHdr (in nsIMsgDBHdr pendingHdr, in string property, in unsigned long propertyVal); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) = 0;

  /* void setUint64AttributeOnPendingHdr (in nsIMsgDBHdr aPendingHdr, in string aProperty, in unsigned long long aPropertyVal); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) = 0;

  /* void updatePendingAttributes (in nsIMsgDBHdr aNewHdr); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) = 0;

  /* readonly attribute nsMsgKey lowWaterArticleNum; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) = 0;

  /* readonly attribute nsMsgKey highWaterArticleNum; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) = 0;

  /* attribute nsMsgKey nextPseudoMsgKey; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) = 0;

  /* readonly attribute nsMsgKey nextFakeOfflineMsgKey; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) = 0;

  /* void createCollationKey (in AString sourceString, out unsigned long aCount, [array, size_is (aCount)] out octet aKey); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateCollationKey(const nsAString& sourceString, uint32_t *aCount, uint8_t **aKey) = 0;

  /* long compareCollationKeys (in unsigned long aLen1, [array, size_is (aLen1)] in octet key1, in unsigned long aLen2, [array, size_is (aLen2)] in octet key2); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) = 0;

  /* readonly attribute nsMsgViewFlagsTypeValue defaultViewFlags; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) = 0;

  /* readonly attribute nsMsgViewSortTypeValue defaultSortType; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) = 0;

  /* readonly attribute nsMsgViewSortOrderValue defaultSortOrder; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) = 0;

  /* attribute unsigned long msgHdrCacheSize; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) = 0;

  /* void getNewList (out unsigned long count, [array, size_is (count)] out nsMsgKey newKeys); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) = 0;

  /* nsISimpleEnumerator getCachedHits (in string aSearchFolderUri); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator **_retval) = 0;

  /* void refreshCache (in string aSearchFolderUri, in unsigned long aNumKeys, [array, size_is (aNumKeys)] in nsMsgKey aNewHits, out unsigned long aNumBadHits, [array, size_is (aNumBadHits)] out nsMsgKey aStaleHits); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) = 0;

  /* void updateHdrInCache (in string aSearchFolderUri, in nsIMsgDBHdr aHdr, in boolean aAdd); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) = 0;

  /* boolean hdrIsInCache (in string aSearchFolderUri, in nsIMsgDBHdr aHdr); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgDatabase, NS_IMSGDATABASE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDATABASE \
  NS_IMETHOD Close(bool aForceCommit) override; \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) override; \
  NS_IMETHOD ForceClosed(void) override; \
  NS_IMETHOD ClearCachedHdrs(void) override; \
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) override; \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo **aDBFolderInfo) override; \
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) override; \
  NS_IMETHOD GetFolder(nsIMsgFolder **aFolder) override; \
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) override; \
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) override; \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval) override; \
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr **_retval) override; \
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr **_retval) override; \
  NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr **_retval) override; \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) override; \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr **_retval) override; \
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) override; \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) override; \
  NS_IMETHOD SyncCounts(void) override; \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval) override; \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) override; \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) override; \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) override; \
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) override; \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) override; \
  NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) override; \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) override; \
  NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) override; \
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) override; \
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) override; \
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) override; \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) override; \
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings **aMsgRetentionSettings) override; \
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) override; \
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) override; \
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings **aMsgDownloadSettings) override; \
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) override; \
  NS_IMETHOD HasNew(bool *_retval) override; \
  NS_IMETHOD ClearNewList(bool notify) override; \
  NS_IMETHOD AddToNewList(nsMsgKey key) override; \
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) override; \
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) override; \
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation **_retval) override; \
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) override; \
  NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> * offlineOpIds) override; \
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> * offlineDeletes) override; \
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) override; \
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) override; \
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) override; \
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) override; \
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) override; \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) override; \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) override; \
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) override; \
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) override; \
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) override; \
  NS_IMETHOD CreateCollationKey(const nsAString& sourceString, uint32_t *aCount, uint8_t **aKey) override; \
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) override; \
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) override; \
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) override; \
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) override; \
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) override; \
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) override; \
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) override; \
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) override; \
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) override; \
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_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_NSIMSGDATABASE \
  nsresult Close(bool aForceCommit); \
  nsresult Commit(nsMsgDBCommit commitType); \
  nsresult ForceClosed(void); \
  nsresult ClearCachedHdrs(void); \
  nsresult ResetHdrCacheSize(uint32_t size); \
  nsresult GetDBFolderInfo(nsIDBFolderInfo **aDBFolderInfo); \
  nsresult GetDatabaseSize(int64_t *aDatabaseSize); \
  nsresult GetFolder(nsIMsgFolder **aFolder); \
  nsresult GetLastUseTime(PRTime *aLastUseTime); \
  nsresult SetLastUseTime(PRTime aLastUseTime); \
  nsresult GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval); \
  nsresult GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr **_retval); \
  nsresult GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr **_retval); \
  nsresult ContainsKey(nsMsgKey key, bool *_retval); \
  nsresult CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr **_retval); \
  nsresult AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify); \
  nsresult CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr **_retval); \
  nsresult ListAllKeys(nsIMsgKeyArray *array); \
  nsresult EnumerateMessages(nsISimpleEnumerator **_retval); \
  nsresult ReverseEnumerateMessages(nsISimpleEnumerator **_retval); \
  nsresult EnumerateThreads(nsISimpleEnumerator **_retval); \
  nsresult GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator **_retval); \
  nsresult NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval); \
  nsresult SyncCounts(void); \
  nsresult GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval); \
  nsresult MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator); \
  nsresult MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator); \
  nsresult MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator); \
  nsresult MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator); \
  nsresult MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator); \
  nsresult IsMDNNeeded(nsMsgKey key, bool *_retval); \
  nsresult MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator); \
  nsresult IsMDNSent(nsMsgKey key, bool *_retval); \
  nsresult MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator); \
  nsresult MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator); \
  nsresult MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator); \
  nsresult MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator); \
  nsresult MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys); \
  nsresult MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator); \
  nsresult MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator); \
  nsresult MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator); \
  nsresult IsRead(nsMsgKey key, bool *_retval); \
  nsresult IsIgnored(nsMsgKey key, bool *_retval); \
  nsresult IsWatched(nsMsgKey key, bool *_retval); \
  nsresult IsMarked(nsMsgKey key, bool *_retval); \
  nsresult HasAttachments(nsMsgKey key, bool *_retval); \
  nsresult MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys); \
  nsresult DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator); \
  nsresult DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit); \
  nsresult DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify); \
  nsresult RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr); \
  nsresult UndoDelete(nsIMsgDBHdr *msgHdr); \
  nsresult MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator); \
  nsresult MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator); \
  nsresult SetLabel(nsMsgKey key, nsMsgLabelValue label); \
  nsresult SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue); \
  nsresult SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue); \
  nsresult SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue); \
  nsresult MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator); \
  nsresult GetFirstNew(nsMsgKey *aFirstNew); \
  nsresult GetMsgRetentionSettings(nsIMsgRetentionSettings **aMsgRetentionSettings); \
  nsresult SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings); \
  nsresult ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder); \
  nsresult GetMsgDownloadSettings(nsIMsgDownloadSettings **aMsgDownloadSettings); \
  nsresult SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings); \
  nsresult HasNew(bool *_retval); \
  nsresult ClearNewList(bool notify); \
  nsresult AddToNewList(nsMsgKey key); \
  nsresult GetSummaryValid(bool *aSummaryValid); \
  nsresult SetSummaryValid(bool aSummaryValid); \
  nsresult GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation **_retval); \
  nsresult RemoveOfflineOp(nsIMsgOfflineImapOperation *op); \
  nsresult EnumerateOfflineOps(nsISimpleEnumerator **_retval); \
  nsresult ListAllOfflineOpIds(nsTArray<nsMsgKey> * offlineOpIds); \
  nsresult ListAllOfflineDeletes(nsTArray<nsMsgKey> * offlineDeletes); \
  nsresult ListAllOfflineMsgs(nsIMsgKeyArray *aKeys); \
  nsresult SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal); \
  nsresult SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal); \
  nsresult SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal); \
  nsresult UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr); \
  nsresult GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum); \
  nsresult GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum); \
  nsresult GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey); \
  nsresult SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey); \
  nsresult GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey); \
  nsresult CreateCollationKey(const nsAString& sourceString, uint32_t *aCount, uint8_t **aKey); \
  nsresult CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval); \
  nsresult GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags); \
  nsresult GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType); \
  nsresult GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder); \
  nsresult GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize); \
  nsresult SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize); \
  nsresult GetNewList(uint32_t *count, nsMsgKey **newKeys); \
  nsresult GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator **_retval); \
  nsresult RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits); \
  nsresult UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd); \
  nsresult HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDATABASE(_to) \
  NS_IMETHOD Close(bool aForceCommit) override { return _to Close(aForceCommit); } \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) override { return _to Commit(commitType); } \
  NS_IMETHOD ForceClosed(void) override { return _to ForceClosed(); } \
  NS_IMETHOD ClearCachedHdrs(void) override { return _to ClearCachedHdrs(); } \
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) override { return _to ResetHdrCacheSize(size); } \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo **aDBFolderInfo) override { return _to GetDBFolderInfo(aDBFolderInfo); } \
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) override { return _to GetDatabaseSize(aDatabaseSize); } \
  NS_IMETHOD GetFolder(nsIMsgFolder **aFolder) override { return _to GetFolder(aFolder); } \
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) override { return _to GetLastUseTime(aLastUseTime); } \
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) override { return _to SetLastUseTime(aLastUseTime); } \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval) override { return _to GetMsgHdrForKey(key, _retval); } \
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr **_retval) override { return _to GetMsgHdrForMessageID(messageID, _retval); } \
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr **_retval) override { return _to GetMsgHdrForGMMsgID(aGmailMessageID, _retval); } \
  NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) override { return _to ContainsKey(key, _retval); } \
  NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr **_retval) override { return _to CreateNewHdr(aKey, _retval); } \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) override { return _to AddNewHdrToDB(newHdr, notify); } \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr **_retval) override { return _to CopyHdrFromExistingHdr(key, existingHdr, addHdrToDB, _retval); } \
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) override { return _to ListAllKeys(array); } \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval) override { return _to EnumerateMessages(_retval); } \
  NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator **_retval) override { return _to ReverseEnumerateMessages(_retval); } \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval) override { return _to EnumerateThreads(_retval); } \
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator **_retval) override { return _to GetFilterEnumerator(searchTerms, reverse, _retval); } \
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) override { return _to NextMatchingHdrs(enumerator, numHdrsToLookAt, maxResults, matchingHdrs, numMatches, _retval); } \
  NS_IMETHOD SyncCounts(void) override { return _to SyncCounts(); } \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval) override { return _to GetThreadContainingMsgHdr(msgHdr, _retval); } \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) override { return _to MarkHdrRead(msgHdr, bRead, instigator); } \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) override { return _to MarkHdrReplied(msgHdr, bReplied, instigator); } \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) override { return _to MarkHdrMarked(msgHdr, mark, instigator); } \
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) override { return _to MarkHdrNotNew(aMsgHdr, aInstigator); } \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return _to MarkMDNNeeded(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) override { return _to IsMDNNeeded(key, _retval); } \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return _to MarkMDNSent(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) override { return _to IsMDNSent(key, _retval); } \
  NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) override { return _to MarkRead(key, bRead, instigator); } \
  NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) override { return _to MarkReplied(key, bReplied, instigator); } \
  NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) override { return _to MarkForwarded(key, bForwarded, instigator); } \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) override { return _to MarkHasAttachments(key, bHasAttachments, instigator); } \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) override { return _to MarkThreadRead(thread, instigator, aCount, aKeys); } \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) override { return _to MarkThreadIgnored(thread, threadKey, bIgnored, instigator); } \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) override { return _to MarkThreadWatched(thread, threadKey, bWatched, instigator); } \
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) override { return _to MarkHeaderKilled(msg, bIgnored, instigator); } \
  NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) override { return _to IsRead(key, _retval); } \
  NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) override { return _to IsIgnored(key, _retval); } \
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) override { return _to IsWatched(key, _retval); } \
  NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) override { return _to IsMarked(key, _retval); } \
  NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) override { return _to HasAttachments(key, _retval); } \
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) override { return _to MarkAllRead(aCount, aKeys); } \
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) override { return _to DeleteMessages(aNumKeys, nsMsgKeys, instigator); } \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) override { return _to DeleteMessage(key, instigator, commit); } \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) override { return _to DeleteHeader(msgHdr, instigator, commit, notify); } \
  NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) override { return _to RemoveHeaderMdbRow(msgHdr); } \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) override { return _to UndoDelete(msgHdr); } \
  NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) override { return _to MarkMarked(key, mark, instigator); } \
  NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) override { return _to MarkOffline(key, offline, instigator); } \
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) override { return _to SetLabel(key, label); } \
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) override { return _to SetStringProperty(aKey, aProperty, aValue); } \
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) override { return _to SetStringPropertyByHdr(msgHdr, aProperty, aValue); } \
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) override { return _to SetUint32PropertyByHdr(aMsgHdr, aProperty, aValue); } \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) override { return _to MarkImapDeleted(key, deleted, instigator); } \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) override { return _to GetFirstNew(aFirstNew); } \
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings **aMsgRetentionSettings) override { return _to GetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) override { return _to SetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) override { return _to ApplyRetentionSettings(aMsgRetentionSettings, aDeleteViaFolder); } \
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings **aMsgDownloadSettings) override { return _to GetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) override { return _to SetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD HasNew(bool *_retval) override { return _to HasNew(_retval); } \
  NS_IMETHOD ClearNewList(bool notify) override { return _to ClearNewList(notify); } \
  NS_IMETHOD AddToNewList(nsMsgKey key) override { return _to AddToNewList(key); } \
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) override { return _to GetSummaryValid(aSummaryValid); } \
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) override { return _to SetSummaryValid(aSummaryValid); } \
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation **_retval) override { return _to GetOfflineOpForKey(messageKey, create, _retval); } \
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) override { return _to RemoveOfflineOp(op); } \
  NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator **_retval) override { return _to EnumerateOfflineOps(_retval); } \
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> * offlineOpIds) override { return _to ListAllOfflineOpIds(offlineOpIds); } \
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> * offlineDeletes) override { return _to ListAllOfflineDeletes(offlineDeletes); } \
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) override { return _to ListAllOfflineMsgs(aKeys); } \
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) override { return _to SetAttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) override { return _to SetUint32AttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) override { return _to SetUint64AttributeOnPendingHdr(aPendingHdr, aProperty, aPropertyVal); } \
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) override { return _to UpdatePendingAttributes(aNewHdr); } \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) override { return _to GetLowWaterArticleNum(aLowWaterArticleNum); } \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) override { return _to GetHighWaterArticleNum(aHighWaterArticleNum); } \
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) override { return _to GetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) override { return _to SetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) override { return _to GetNextFakeOfflineMsgKey(aNextFakeOfflineMsgKey); } \
  NS_IMETHOD CreateCollationKey(const nsAString& sourceString, uint32_t *aCount, uint8_t **aKey) override { return _to CreateCollationKey(sourceString, aCount, aKey); } \
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) override { return _to CompareCollationKeys(aLen1, key1, aLen2, key2, _retval); } \
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) override { return _to GetDefaultViewFlags(aDefaultViewFlags); } \
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) override { return _to GetDefaultSortType(aDefaultSortType); } \
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) override { return _to GetDefaultSortOrder(aDefaultSortOrder); } \
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) override { return _to GetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) override { return _to SetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) override { return _to GetNewList(count, newKeys); } \
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator **_retval) override { return _to GetCachedHits(aSearchFolderUri, _retval); } \
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) override { return _to RefreshCache(aSearchFolderUri, aNumKeys, aNewHits, aNumBadHits, aStaleHits); } \
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) override { return _to UpdateHdrInCache(aSearchFolderUri, aHdr, aAdd); } \
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) override { return _to HdrIsInCache(aSearchFolderUri, aHdr, _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_NSIMSGDATABASE(_to) \
  NS_IMETHOD Close(bool aForceCommit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(aForceCommit); } \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Commit(commitType); } \
  NS_IMETHOD ForceClosed(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceClosed(); } \
  NS_IMETHOD ClearCachedHdrs(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearCachedHdrs(); } \
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetHdrCacheSize(size); } \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo **aDBFolderInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDBFolderInfo(aDBFolderInfo); } \
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatabaseSize(aDatabaseSize); } \
  NS_IMETHOD GetFolder(nsIMsgFolder **aFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolder(aFolder); } \
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastUseTime(aLastUseTime); } \
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLastUseTime(aLastUseTime); } \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrForKey(key, _retval); } \
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrForMessageID(messageID, _retval); } \
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrForGMMsgID(aGmailMessageID, _retval); } \
  NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsKey(key, _retval); } \
  NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewHdr(aKey, _retval); } \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddNewHdrToDB(newHdr, notify); } \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyHdrFromExistingHdr(key, existingHdr, addHdrToDB, _retval); } \
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllKeys(array); } \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateMessages(_retval); } \
  NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReverseEnumerateMessages(_retval); } \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateThreads(_retval); } \
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilterEnumerator(searchTerms, reverse, _retval); } \
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NextMatchingHdrs(enumerator, numHdrsToLookAt, maxResults, matchingHdrs, numMatches, _retval); } \
  NS_IMETHOD SyncCounts(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SyncCounts(); } \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetThreadContainingMsgHdr(msgHdr, _retval); } \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrRead(msgHdr, bRead, instigator); } \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrReplied(msgHdr, bReplied, instigator); } \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrMarked(msgHdr, mark, instigator); } \
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrNotNew(aMsgHdr, aInstigator); } \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkMDNNeeded(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsMDNNeeded(key, _retval); } \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkMDNSent(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsMDNSent(key, _retval); } \
  NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkRead(key, bRead, instigator); } \
  NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkReplied(key, bReplied, instigator); } \
  NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkForwarded(key, bForwarded, instigator); } \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHasAttachments(key, bHasAttachments, instigator); } \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkThreadRead(thread, instigator, aCount, aKeys); } \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkThreadIgnored(thread, threadKey, bIgnored, instigator); } \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkThreadWatched(thread, threadKey, bWatched, instigator); } \
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHeaderKilled(msg, bIgnored, instigator); } \
  NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsRead(key, _retval); } \
  NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsIgnored(key, _retval); } \
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWatched(key, _retval); } \
  NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsMarked(key, _retval); } \
  NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttachments(key, _retval); } \
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkAllRead(aCount, aKeys); } \
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteMessages(aNumKeys, nsMsgKeys, instigator); } \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteMessage(key, instigator, commit); } \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteHeader(msgHdr, instigator, commit, notify); } \
  NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveHeaderMdbRow(msgHdr); } \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UndoDelete(msgHdr); } \
  NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkMarked(key, mark, instigator); } \
  NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkOffline(key, offline, instigator); } \
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLabel(key, label); } \
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringProperty(aKey, aProperty, aValue); } \
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringPropertyByHdr(msgHdr, aProperty, aValue); } \
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUint32PropertyByHdr(aMsgHdr, aProperty, aValue); } \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkImapDeleted(key, deleted, instigator); } \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstNew(aFirstNew); } \
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings **aMsgRetentionSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ApplyRetentionSettings(aMsgRetentionSettings, aDeleteViaFolder); } \
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings **aMsgDownloadSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD HasNew(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasNew(_retval); } \
  NS_IMETHOD ClearNewList(bool notify) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearNewList(notify); } \
  NS_IMETHOD AddToNewList(nsMsgKey key) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddToNewList(key); } \
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSummaryValid(aSummaryValid); } \
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSummaryValid(aSummaryValid); } \
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOfflineOpForKey(messageKey, create, _retval); } \
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveOfflineOp(op); } \
  NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateOfflineOps(_retval); } \
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> * offlineOpIds) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllOfflineOpIds(offlineOpIds); } \
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> * offlineDeletes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllOfflineDeletes(offlineDeletes); } \
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllOfflineMsgs(aKeys); } \
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUint32AttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUint64AttributeOnPendingHdr(aPendingHdr, aProperty, aPropertyVal); } \
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdatePendingAttributes(aNewHdr); } \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLowWaterArticleNum(aLowWaterArticleNum); } \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHighWaterArticleNum(aHighWaterArticleNum); } \
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextFakeOfflineMsgKey(aNextFakeOfflineMsgKey); } \
  NS_IMETHOD CreateCollationKey(const nsAString& sourceString, uint32_t *aCount, uint8_t **aKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCollationKey(sourceString, aCount, aKey); } \
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareCollationKeys(aLen1, key1, aLen2, key2, _retval); } \
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultViewFlags(aDefaultViewFlags); } \
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultSortType(aDefaultSortType); } \
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultSortOrder(aDefaultSortOrder); } \
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewList(count, newKeys); } \
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCachedHits(aSearchFolderUri, _retval); } \
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RefreshCache(aSearchFolderUri, aNumKeys, aNewHits, aNumBadHits, aStaleHits); } \
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateHdrInCache(aSearchFolderUri, aHdr, aAdd); } \
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HdrIsInCache(aSearchFolderUri, aHdr, _retval); } 


#endif /* __gen_nsIMsgDatabase_h__ */