/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/tinderbox/XR-Trunk/WINNT_5.2_Depend/mozilla/toolkit/components/places/public/nsITaggingService.idl
 */

#ifndef __gen_nsITaggingService_h__
#define __gen_nsITaggingService_h__


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

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

class nsIVariant; /* forward declaration */


/* starting interface:    nsITaggingService */
#define NS_ITAGGINGSERVICE_IID_STR "03dd79c2-c834-4747-a204-79d5a29c6bd9"

#define NS_ITAGGINGSERVICE_IID \
  {0x03dd79c2, 0xc834, 0x4747, \
    { 0xa2, 0x04, 0x79, 0xd5, 0xa2, 0x9c, 0x6b, 0xd9 }}

class NS_NO_VTABLE nsITaggingService : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITAGGINGSERVICE_IID)

  /**
   * Tags a URL with the given set of tags. Current tags set for the URL
   * persist. Tags in aTags which are already set for the given URL are
   * ignored.
   *
   * @param aURI
   *        the URL to tag.
   * @param aTags
   *        Array of tags to set for the given URL.
   */
  /* void tagURI (in nsIURI aURI, in nsIVariant aTags); */
  NS_IMETHOD TagURI(nsIURI *aURI, nsIVariant *aTags) = 0;

  /**
   * Removes tags from a URL. Tags from aTags which are not set for the
   * given URL are ignored.
   *
   * @param aURI
   *        the URL to un-tag.
   * @param aTags
   *        Array of tags to unset. pass null to remove all tags from the given
   *        url.
   */
  /* void untagURI (in nsIURI aURI, in nsIVariant aTags); */
  NS_IMETHOD UntagURI(nsIURI *aURI, nsIVariant *aTags) = 0;

  /**
   * Retrieves all URLs tagged with the given tag.
   *
   * @param aTag
   *        tag name
   * @returns Array of uris tagged with aTag.
   */
  /* nsIVariant getURIsForTag (in AString aTag); */
  NS_IMETHOD GetURIsForTag(const nsAString & aTag, nsIVariant **_retval) = 0;

  /**
   * Retrieves all tags set for the given URL.
   *
   * @param aURI
   *        a URL.
   * @returns array of tags (sorted by name).
   */
  /* nsIVariant getTagsForURI (in nsIURI aURI); */
  NS_IMETHOD GetTagsForURI(nsIURI *aURI, nsIVariant **_retval) = 0;

  /**
   * Retrieves all tags used to tag URIs in the data-base (sorted by name).
   */
  /* readonly attribute nsIVariant allTags; */
  NS_IMETHOD GetAllTags(nsIVariant * *aAllTags) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITaggingService, NS_ITAGGINGSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITAGGINGSERVICE \
  NS_IMETHOD TagURI(nsIURI *aURI, nsIVariant *aTags); \
  NS_IMETHOD UntagURI(nsIURI *aURI, nsIVariant *aTags); \
  NS_IMETHOD GetURIsForTag(const nsAString & aTag, nsIVariant **_retval); \
  NS_IMETHOD GetTagsForURI(nsIURI *aURI, nsIVariant **_retval); \
  NS_IMETHOD GetAllTags(nsIVariant * *aAllTags); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITAGGINGSERVICE(_to) \
  NS_IMETHOD TagURI(nsIURI *aURI, nsIVariant *aTags) { return _to TagURI(aURI, aTags); } \
  NS_IMETHOD UntagURI(nsIURI *aURI, nsIVariant *aTags) { return _to UntagURI(aURI, aTags); } \
  NS_IMETHOD GetURIsForTag(const nsAString & aTag, nsIVariant **_retval) { return _to GetURIsForTag(aTag, _retval); } \
  NS_IMETHOD GetTagsForURI(nsIURI *aURI, nsIVariant **_retval) { return _to GetTagsForURI(aURI, _retval); } \
  NS_IMETHOD GetAllTags(nsIVariant * *aAllTags) { return _to GetAllTags(aAllTags); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITAGGINGSERVICE(_to) \
  NS_IMETHOD TagURI(nsIURI *aURI, nsIVariant *aTags) { return !_to ? NS_ERROR_NULL_POINTER : _to->TagURI(aURI, aTags); } \
  NS_IMETHOD UntagURI(nsIURI *aURI, nsIVariant *aTags) { return !_to ? NS_ERROR_NULL_POINTER : _to->UntagURI(aURI, aTags); } \
  NS_IMETHOD GetURIsForTag(const nsAString & aTag, nsIVariant **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURIsForTag(aTag, _retval); } \
  NS_IMETHOD GetTagsForURI(nsIURI *aURI, nsIVariant **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagsForURI(aURI, _retval); } \
  NS_IMETHOD GetAllTags(nsIVariant * *aAllTags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllTags(aAllTags); } 

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

/* Header file */
class nsTaggingService : public nsITaggingService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITAGGINGSERVICE

  nsTaggingService();

private:
  ~nsTaggingService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTaggingService, nsITaggingService)

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

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

/* void tagURI (in nsIURI aURI, in nsIVariant aTags); */
NS_IMETHODIMP nsTaggingService::TagURI(nsIURI *aURI, nsIVariant *aTags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void untagURI (in nsIURI aURI, in nsIVariant aTags); */
NS_IMETHODIMP nsTaggingService::UntagURI(nsIURI *aURI, nsIVariant *aTags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIVariant getURIsForTag (in AString aTag); */
NS_IMETHODIMP nsTaggingService::GetURIsForTag(const nsAString & aTag, nsIVariant **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIVariant getTagsForURI (in nsIURI aURI); */
NS_IMETHODIMP nsTaggingService::GetTagsForURI(nsIURI *aURI, nsIVariant **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIVariant allTags; */
NS_IMETHODIMP nsTaggingService::GetAllTags(nsIVariant * *aAllTags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsITaggingService_h__ */
