/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsMsgSearchCore.idl
 */

#ifndef __gen_nsMsgSearchCore_h__
#define __gen_nsMsgSearchCore_h__


#ifndef __gen_MailNewsTypes2_h__
#include "MailNewsTypes2.h"
#endif

#ifndef __gen_nsIMsgFolder_h__
#include "nsIMsgFolder.h"
#endif

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

#include "nsIMsgHeaderParser.h"
class nsIMsgDatabase; /* forward declaration */

class nsIMsgDBHdr; /* forward declaration */


/* starting interface:    nsMsgSearchScope */
#define NS_MSGSEARCHSCOPE_IID_STR "6e893e59-af98-4f62-a326-0f00f32147cd"

#define NS_MSGSEARCHSCOPE_IID \
  {0x6e893e59, 0xaf98, 0x4f62, \
    { 0xa3, 0x26, 0x0f, 0x00, 0xf3, 0x21, 0x47, 0xcd }}

class NS_NO_VTABLE NS_SCRIPTABLE nsMsgSearchScope {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGSEARCHSCOPE_IID)

  enum { offlineMail = 0 };

  enum { offlineMailFilter = 1 };

  enum { onlineMail = 2 };

  enum { onlineMailFilter = 3 };

  enum { localNews = 4 };

  enum { news = 5 };

  enum { newsEx = 6 };

  enum { LDAP = 7 };

  enum { LocalAB = 8 };

  enum { allSearchableGroups = 9 };

  enum { newsFilter = 10 };

  enum { LocalABAnd = 11 };

  enum { LDAPAnd = 12 };

  enum { onlineManual = 13 };

  enum { localNewsJunk = 14 };

  enum { localNewsBody = 15 };

  enum { localNewsJunkBody = 16 };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgSearchScope, NS_MSGSEARCHSCOPE_IID)

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

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGSEARCHSCOPE(_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_NSMSGSEARCHSCOPE(_to) \

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsMsgSearchScope
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGSEARCHSCOPE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgSearchScope)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* End of implementation class template. */
#endif

typedef PRInt32  nsMsgSearchAttribValue;


/* starting interface:    nsMsgSearchAttrib */
#define NS_MSGSEARCHATTRIB_IID_STR "a83ca7e8-4591-4111-8fb8-fd76ac73c866"

#define NS_MSGSEARCHATTRIB_IID \
  {0xa83ca7e8, 0x4591, 0x4111, \
    { 0x8f, 0xb8, 0xfd, 0x76, 0xac, 0x73, 0xc8, 0x66 }}

/**
 * Definitions of search attribute types. The numerical order
 * from here will also be used to determine the order that the
 * attributes display in the filter editor.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsMsgSearchAttrib {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGSEARCHATTRIB_IID)

  enum { Custom = -2 };

  enum { Default = -1 };

  enum { Subject = 0 };

  enum { Sender = 1 };

  enum { Body = 2 };

  enum { Date = 3 };

  enum { Priority = 4 };

  enum { MsgStatus = 5 };

  enum { To = 6 };

  enum { CC = 7 };

  enum { ToOrCC = 8 };

  enum { AllAddresses = 9 };

  enum { Location = 10 };

  enum { MessageKey = 11 };

  enum { AgeInDays = 12 };

  enum { FolderInfo = 13 };

  enum { Size = 14 };

  enum { AnyText = 15 };

  enum { Keywords = 16 };

  enum { Name = 17 };

  enum { DisplayName = 18 };

  enum { Nickname = 19 };

  enum { ScreenName = 20 };

  enum { Email = 21 };

  enum { AdditionalEmail = 22 };

  enum { PhoneNumber = 23 };

  enum { WorkPhone = 24 };

  enum { HomePhone = 25 };

  enum { Fax = 26 };

  enum { Pager = 27 };

  enum { Mobile = 28 };

  enum { City = 29 };

  enum { Street = 30 };

  enum { Title = 31 };

  enum { Organization = 32 };

  enum { Department = 33 };

  enum { HasAttachmentStatus = 44 };

  enum { JunkStatus = 45 };

  enum { JunkPercent = 46 };

  enum { JunkScoreOrigin = 47 };

  enum { Label = 48 };

  enum { HdrProperty = 49 };

  enum { FolderFlag = 50 };

  enum { Uint32HdrProperty = 51 };

  /** OtherHeader MUST ALWAYS BE LAST attribute since 
       * we can have an arbitrary # of these. The number can be changed,
       * however, because we never persist AttribValues as integers.
      */
  enum { OtherHeader = 52 };

  enum { kNumMsgSearchAttributes = 100 };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgSearchAttrib, NS_MSGSEARCHATTRIB_IID)

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

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGSEARCHATTRIB(_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_NSMSGSEARCHATTRIB(_to) \

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsMsgSearchAttrib
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGSEARCHATTRIB

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgSearchAttrib)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* End of implementation class template. */
#endif

typedef PRInt32  nsMsgSearchOpValue;


/* starting interface:    nsMsgSearchOp */
#define NS_MSGSEARCHOP_IID_STR "9160b196-6fcb-4eba-aaaf-6c806c4ee420"

#define NS_MSGSEARCHOP_IID \
  {0x9160b196, 0x6fcb, 0x4eba, \
    { 0xaa, 0xaf, 0x6c, 0x80, 0x6c, 0x4e, 0xe4, 0x20 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsMsgSearchOp {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGSEARCHOP_IID)

  enum { Contains = 0 };

  enum { DoesntContain = 1 };

  enum { Is = 2 };

  enum { Isnt = 3 };

  enum { IsEmpty = 4 };

  enum { IsBefore = 5 };

  enum { IsAfter = 6 };

  enum { IsHigherThan = 7 };

  enum { IsLowerThan = 8 };

  enum { BeginsWith = 9 };

  enum { EndsWith = 10 };

  enum { SoundsLike = 11 };

  enum { LdapDwim = 12 };

  enum { IsGreaterThan = 13 };

  enum { IsLessThan = 14 };

  enum { NameCompletion = 15 };

  enum { IsInAB = 16 };

  enum { IsntInAB = 17 };

  enum { IsntEmpty = 18 };

  enum { Matches = 19 };

  enum { DoesntMatch = 20 };

  enum { kNumMsgSearchOperators = 21 };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgSearchOp, NS_MSGSEARCHOP_IID)

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

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGSEARCHOP(_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_NSMSGSEARCHOP(_to) \

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsMsgSearchOp
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGSEARCHOP

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgSearchOp)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* End of implementation class template. */
#endif

typedef PRInt32  nsMsgSearchWidgetValue;


/* starting interface:    nsMsgSearchWidget */
#define NS_MSGSEARCHWIDGET_IID_STR "903dd2e8-304e-11d3-92e6-00a0c900d445"

#define NS_MSGSEARCHWIDGET_IID \
  {0x903dd2e8, 0x304e, 0x11d3, \
    { 0x92, 0xe6, 0x00, 0xa0, 0xc9, 0x00, 0xd4, 0x45 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsMsgSearchWidget {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGSEARCHWIDGET_IID)

  enum { Text = 0 };

  enum { Date = 1 };

  enum { Menu = 2 };

  enum { Int = 3 };

  enum { None = 4 };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgSearchWidget, NS_MSGSEARCHWIDGET_IID)

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

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGSEARCHWIDGET(_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_NSMSGSEARCHWIDGET(_to) \

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsMsgSearchWidget
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGSEARCHWIDGET

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgSearchWidget)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* End of implementation class template. */
#endif

typedef PRInt32  nsMsgSearchTypeValue;


/* starting interface:    nsMsgSearchType */
#define NS_MSGSEARCHTYPE_IID_STR "964b7f32-304e-11d3-ae13-00a0c900d445"

#define NS_MSGSEARCHTYPE_IID \
  {0x964b7f32, 0x304e, 0x11d3, \
    { 0xae, 0x13, 0x00, 0xa0, 0xc9, 0x00, 0xd4, 0x45 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsMsgSearchType {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGSEARCHTYPE_IID)

  enum { None = 0 };

  enum { RootDSE = 1 };

  enum { Normal = 2 };

  enum { LdapVLV = 3 };

  enum { NameCompletion = 4 };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgSearchType, NS_MSGSEARCHTYPE_IID)

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

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGSEARCHTYPE(_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_NSMSGSEARCHTYPE(_to) \

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsMsgSearchType
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGSEARCHTYPE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgSearchType)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* End of implementation class template. */
#endif

typedef PRInt32  nsMsgSearchBooleanOperator;


/* starting interface:    nsMsgSearchBooleanOp */
#define NS_MSGSEARCHBOOLEANOP_IID_STR "a37f3f4a-304e-11d3-8f94-00a0c900d445"

#define NS_MSGSEARCHBOOLEANOP_IID \
  {0xa37f3f4a, 0x304e, 0x11d3, \
    { 0x8f, 0x94, 0x00, 0xa0, 0xc9, 0x00, 0xd4, 0x45 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsMsgSearchBooleanOp {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGSEARCHBOOLEANOP_IID)

  enum { BooleanOR = 0 };

  enum { BooleanAND = 1 };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgSearchBooleanOp, NS_MSGSEARCHBOOLEANOP_IID)

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

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGSEARCHBOOLEANOP(_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_NSMSGSEARCHBOOLEANOP(_to) \

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsMsgSearchBooleanOp
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGSEARCHBOOLEANOP

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgSearchBooleanOp)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* End of implementation class template. */
#endif

typedef struct nsMsgSearchValue
{
    nsMsgSearchAttribValue attribute;
    union
    {
      nsMsgPriorityValue priority;
      PRTime date;
      PRUint32 msgStatus; /* see MSG_FLAG in msgcom.h */
      PRUint32 size;
      nsMsgKey key;
      PRInt32 age; /* in days */
      nsIMsgFolder *folder;
      nsMsgLabelValue label;
      PRUint32 junkStatus;
      PRUint32 junkPercent;
    } u;
    char *string;
} nsMsgSearchValue;
#define IS_STRING_ATTRIBUTE(_a) \
(!(_a == nsMsgSearchAttrib::Priority || _a == nsMsgSearchAttrib::Date || \
   _a == nsMsgSearchAttrib::MsgStatus || _a == nsMsgSearchAttrib::MessageKey || \
   _a == nsMsgSearchAttrib::Size || _a == nsMsgSearchAttrib::AgeInDays || \
   _a == nsMsgSearchAttrib::FolderInfo || _a == nsMsgSearchAttrib::Location || \
   _a == nsMsgSearchAttrib::Label || _a == nsMsgSearchAttrib::JunkStatus || \
   _a == nsMsgSearchAttrib::FolderFlag || _a == nsMsgSearchAttrib::Uint32HdrProperty || \
   _a == nsMsgSearchAttrib::JunkPercent || _a == nsMsgSearchAttrib::HasAttachmentStatus))

#endif /* __gen_nsMsgSearchCore_h__ */
