/*
 * 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 "5fe70a74-304e-11d3-9be1-00a0c900d445"

#define NS_MSGSEARCHSCOPE_IID \
  {0x5fe70a74, 0x304e, 0x11d3, \
    { 0x9b, 0xe1, 0x00, 0xa0, 0xc9, 0x00, 0xd4, 0x45 }}

class NS_NO_VTABLE nsMsgSearchScope {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_MSGSEARCHSCOPE_IID)

  enum { offlineMail = 0 };

  enum { onlineMail = 1 };

  enum { onlineMailFilter = 2 };

  enum { localNews = 3 };

  enum { news = 4 };

  enum { newsEx = 5 };

  enum { LDAP = 6 };

  enum { LocalAB = 7 };

  enum { allSearchableGroups = 8 };

};

/* 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_();
  virtual ~_MYCLASS_();
  /* additional members */
};

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

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* 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 "68c8710a-304e-11d3-97bf-00a0c900d445"

#define NS_MSGSEARCHATTRIB_IID \
  {0x68c8710a, 0x304e, 0x11d3, \
    { 0x97, 0xbf, 0x00, 0xa0, 0xc9, 0x00, 0xd4, 0x45 }}

class NS_NO_VTABLE nsMsgSearchAttrib {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_MSGSEARCHATTRIB_IID)

  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 { Location = 9 };

  enum { MessageKey = 10 };

  enum { AgeInDays = 11 };

  enum { FolderInfo = 12 };

  enum { Size = 13 };

  enum { AnyText = 14 };

  enum { Keywords = 15 };

  enum { Name = 16 };

  enum { Email = 17 };

  enum { PhoneNumber = 18 };

  enum { City = 19 };

  enum { Street = 20 };

  enum { Nickname = 21 };

  enum { WorkPhone = 22 };

  enum { HomePhone = 23 };

  enum { Fax = 24 };

  enum { Pager = 25 };

  enum { Mobile = 26 };

  enum { ScreenName = 27 };

  enum { Title = 28 };

  enum { Organization = 29 };

  enum { Department = 30 };

  enum { AdditionalEmail = 31 };

  enum { OtherHeader = 49 };

  enum { kNumMsgSearchAttributes = 100 };

};

/* 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_();
  virtual ~_MYCLASS_();
  /* additional members */
};

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

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* 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 "82cc4518-304e-11d3-831d-00a0c900d445"

#define NS_MSGSEARCHOP_IID \
  {0x82cc4518, 0x304e, 0x11d3, \
    { 0x83, 0x1d, 0x00, 0xa0, 0xc9, 0x00, 0xd4, 0x45 }}

class NS_NO_VTABLE nsMsgSearchOp {
 public: 

  NS_DEFINE_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 { kNumMsgSearchOperators = 16 };

};

/* 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_();
  virtual ~_MYCLASS_();
  /* additional members */
};

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

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* 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 nsMsgSearchWidget {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_MSGSEARCHWIDGET_IID)

  enum { Text = 0 };

  enum { Date = 1 };

  enum { Menu = 2 };

  enum { Int = 3 };

  enum { None = 4 };

};

/* 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_();
  virtual ~_MYCLASS_();
  /* additional members */
};

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

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* 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 nsMsgSearchType {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_MSGSEARCHTYPE_IID)

  enum { None = 0 };

  enum { RootDSE = 1 };

  enum { Normal = 2 };

  enum { LdapVLV = 3 };

  enum { NameCompletion = 4 };

};

/* 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_();
  virtual ~_MYCLASS_();
  /* additional members */
};

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

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* 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 nsMsgSearchBooleanOp {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_MSGSEARCHBOOLEANOP_IID)

  enum { BooleanOR = 0 };

  enum { BooleanAND = 1 };

};

/* 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_();
  virtual ~_MYCLASS_();
  /* additional members */
};

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

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* 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;
		PRUint32 age; /* in days */
		nsIMsgFolder *folder;
    } 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))

#endif /* __gen_nsMsgSearchCore_h__ */
