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

#ifndef __gen_calIIcsParser_h__
#define __gen_calIIcsParser_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 calIIcalProperty; /* forward declaration */

class calIIcalComponent; /* forward declaration */

class calIItemBase; /* forward declaration */

class nsIInputStream; /* forward declaration */


/* starting interface:    calIIcsParser */
#define CALIICSPARSER_IID_STR "83e9befe-5e9e-49de-8bc2-d882f464f7e7"

#define CALIICSPARSER_IID \
  {0x83e9befe, 0x5e9e, 0x49de, \
    { 0x8b, 0xc2, 0xd8, 0x82, 0xf4, 0x64, 0xf7, 0xe7 }}

/**
 * An interface for parsing an ics string or stream into its items.
 * Note that this is not a service. A new instance must be created for every new
 * string or stream to be parsed.
 */
class NS_NO_VTABLE calIIcsParser : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIICSPARSER_IID)

  /**
   * Parse an ics string into its items, and store top-level properties and
   * components that are not interpreted.
   *
   * @param aICSString
   *    The ICS string to parse
   */
  /* void parseString (in AString aICSString); */
  NS_IMETHOD ParseString(const nsAString & aICSString) = 0;

  /**
   * Parse an input stream.
   *
   * @see parseString
   * @param aICSString
   *    The stream to parse
   */
  /* void parseFromStream (in nsIInputStream aStream); */
  NS_IMETHOD ParseFromStream(nsIInputStream *aStream) = 0;

  /**
   * Get the items that were in the string or stream
   * @param aCount
   *    Will hold the number of items that were parsed
   * @param aItems
   *    The items
   */
  /* void getItems (out PRUint32 aCount, [array, size_is (aCount), retval] out calIItemBase aItems); */
  NS_IMETHOD GetItems(PRUint32 *aCount, calIItemBase ***aItems) = 0;

  /**
   * Get the top-level properties that were not interpreted as anything special
   * @param aCount
   *    Will hold the number of properties that were found
   * @param aProperties
   *    The properties
   */
  /* void getProperties (out PRUint32 aCount, [array, size_is (aCount), retval] out calIIcalProperty aProperties); */
  NS_IMETHOD GetProperties(PRUint32 *aCount, calIIcalProperty ***aProperties) = 0;

  /**
   * Get the top-level components that were not interpreted as anything special
   * @param aCount
   *    Will hold the number of components that were found
   * @param aComponents
   *    The components
   */
  /* void getComponents (out PRUint32 aCount, [array, size_is (aCount), retval] out calIIcalComponent aComponents); */
  NS_IMETHOD GetComponents(PRUint32 *aCount, calIIcalComponent ***aComponents) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIICSPARSER \
  NS_IMETHOD ParseString(const nsAString & aICSString); \
  NS_IMETHOD ParseFromStream(nsIInputStream *aStream); \
  NS_IMETHOD GetItems(PRUint32 *aCount, calIItemBase ***aItems); \
  NS_IMETHOD GetProperties(PRUint32 *aCount, calIIcalProperty ***aProperties); \
  NS_IMETHOD GetComponents(PRUint32 *aCount, calIIcalComponent ***aComponents); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIICSPARSER(_to) \
  NS_IMETHOD ParseString(const nsAString & aICSString) { return _to ParseString(aICSString); } \
  NS_IMETHOD ParseFromStream(nsIInputStream *aStream) { return _to ParseFromStream(aStream); } \
  NS_IMETHOD GetItems(PRUint32 *aCount, calIItemBase ***aItems) { return _to GetItems(aCount, aItems); } \
  NS_IMETHOD GetProperties(PRUint32 *aCount, calIIcalProperty ***aProperties) { return _to GetProperties(aCount, aProperties); } \
  NS_IMETHOD GetComponents(PRUint32 *aCount, calIIcalComponent ***aComponents) { return _to GetComponents(aCount, aComponents); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIICSPARSER(_to) \
  NS_IMETHOD ParseString(const nsAString & aICSString) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseString(aICSString); } \
  NS_IMETHOD ParseFromStream(nsIInputStream *aStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseFromStream(aStream); } \
  NS_IMETHOD GetItems(PRUint32 *aCount, calIItemBase ***aItems) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItems(aCount, aItems); } \
  NS_IMETHOD GetProperties(PRUint32 *aCount, calIIcalProperty ***aProperties) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProperties(aCount, aProperties); } \
  NS_IMETHOD GetComponents(PRUint32 *aCount, calIIcalComponent ***aComponents) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComponents(aCount, aComponents); } 

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

/* Header file */
class _MYCLASS_ : public calIIcsParser
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIICSPARSER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void parseString (in AString aICSString); */
NS_IMETHODIMP _MYCLASS_::ParseString(const nsAString & aICSString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void parseFromStream (in nsIInputStream aStream); */
NS_IMETHODIMP _MYCLASS_::ParseFromStream(nsIInputStream *aStream)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getItems (out PRUint32 aCount, [array, size_is (aCount), retval] out calIItemBase aItems); */
NS_IMETHODIMP _MYCLASS_::GetItems(PRUint32 *aCount, calIItemBase ***aItems)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getProperties (out PRUint32 aCount, [array, size_is (aCount), retval] out calIIcalProperty aProperties); */
NS_IMETHODIMP _MYCLASS_::GetProperties(PRUint32 *aCount, calIIcalProperty ***aProperties)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getComponents (out PRUint32 aCount, [array, size_is (aCount), retval] out calIIcalComponent aComponents); */
NS_IMETHODIMP _MYCLASS_::GetComponents(PRUint32 *aCount, calIIcalComponent ***aComponents)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIIcsParser_h__ */
