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

#ifndef __gen_calIWcapRequest_h__
#define __gen_calIWcapRequest_h__


#ifndef __gen_nsIVariant_h__
#include "nsIVariant.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    calIWcapRequest */
#define CALIWCAPREQUEST_IID_STR "6586b48d-3ff6-4b82-b9f6-5b561d416e36"

#define CALIWCAPREQUEST_IID \
  {0x6586b48d, 0x3ff6, 0x4b82, \
    { 0xb9, 0xf6, 0x5b, 0x56, 0x1d, 0x41, 0x6e, 0x36 }}

class NS_NO_VTABLE calIWcapRequest : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIWCAPREQUEST_IID)

  /**
     * For easy testing for equality.
     */
  /* readonly attribute unsigned long id; */
  NS_IMETHOD GetId(PRUint32 *aId) = 0;

  /**
     * Determines whether the request is pending, i.e. has not been completed.
     */
  /* readonly attribute boolean isPending; */
  NS_IMETHOD GetIsPending(PRBool *aIsPending) = 0;

  /**
     * Determines whether the request has succeeded, i.e. it has successfully
     * been completed.
     * XXX todo: remove this and favor
     * !request.isPending && Components.isSuccessCode(request.status) ?
     */
  /* readonly attribute boolean succeeded; */
  NS_IMETHOD GetSucceeded(PRBool *aSucceeded) = 0;

  /**
     * Status of the request, e.g. NS_OK while pending or after successful
     * completion, or NS_ERROR_FAILED when failed.
     */
  /* readonly attribute nsIVariant status; */
  NS_IMETHOD GetStatus(nsIVariant * *aStatus) = 0;

  /**
     * Cancels a pending request and changes status.
     */
  /* void cancel (in nsIVariant status); */
  NS_IMETHOD Cancel(nsIVariant *status) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIWCAPREQUEST \
  NS_IMETHOD GetId(PRUint32 *aId); \
  NS_IMETHOD GetIsPending(PRBool *aIsPending); \
  NS_IMETHOD GetSucceeded(PRBool *aSucceeded); \
  NS_IMETHOD GetStatus(nsIVariant * *aStatus); \
  NS_IMETHOD Cancel(nsIVariant *status); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIWCAPREQUEST(_to) \
  NS_IMETHOD GetId(PRUint32 *aId) { return _to GetId(aId); } \
  NS_IMETHOD GetIsPending(PRBool *aIsPending) { return _to GetIsPending(aIsPending); } \
  NS_IMETHOD GetSucceeded(PRBool *aSucceeded) { return _to GetSucceeded(aSucceeded); } \
  NS_IMETHOD GetStatus(nsIVariant * *aStatus) { return _to GetStatus(aStatus); } \
  NS_IMETHOD Cancel(nsIVariant *status) { return _to Cancel(status); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIWCAPREQUEST(_to) \
  NS_IMETHOD GetId(PRUint32 *aId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
  NS_IMETHOD GetIsPending(PRBool *aIsPending) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsPending(aIsPending); } \
  NS_IMETHOD GetSucceeded(PRBool *aSucceeded) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSucceeded(aSucceeded); } \
  NS_IMETHOD GetStatus(nsIVariant * *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \
  NS_IMETHOD Cancel(nsIVariant *status) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(status); } 

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

/* Header file */
class _MYCLASS_ : public calIWcapRequest
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIWCAPREQUEST

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute unsigned long id; */
NS_IMETHODIMP _MYCLASS_::GetId(PRUint32 *aId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean isPending; */
NS_IMETHODIMP _MYCLASS_::GetIsPending(PRBool *aIsPending)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean succeeded; */
NS_IMETHODIMP _MYCLASS_::GetSucceeded(PRBool *aSucceeded)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIVariant status; */
NS_IMETHODIMP _MYCLASS_::GetStatus(nsIVariant * *aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void cancel (in nsIVariant status); */
NS_IMETHODIMP _MYCLASS_::Cancel(nsIVariant *status)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calIWcapRequestResultListener */
#define CALIWCAPREQUESTRESULTLISTENER_IID_STR "d0bc007f-d0b5-4352-a32a-8f7a9f55a713"

#define CALIWCAPREQUESTRESULTLISTENER_IID \
  {0xd0bc007f, 0xd0b5, 0x4352, \
    { 0xa3, 0x2a, 0x8f, 0x7a, 0x9f, 0x55, 0xa7, 0x13 }}

class NS_NO_VTABLE calIWcapRequestResultListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIWCAPREQUESTRESULTLISTENER_IID)

  /**
     * Callback receiving results.
     *
     * @param request object to track operation
     * @param result request result or null in case of an error
     */
  /* void onRequestResult (in calIWcapRequest request, in nsIVariant result); */
  NS_IMETHOD OnRequestResult(calIWcapRequest *request, nsIVariant *result) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIWCAPREQUESTRESULTLISTENER \
  NS_IMETHOD OnRequestResult(calIWcapRequest *request, nsIVariant *result); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIWCAPREQUESTRESULTLISTENER(_to) \
  NS_IMETHOD OnRequestResult(calIWcapRequest *request, nsIVariant *result) { return _to OnRequestResult(request, result); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIWCAPREQUESTRESULTLISTENER(_to) \
  NS_IMETHOD OnRequestResult(calIWcapRequest *request, nsIVariant *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRequestResult(request, result); } 

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

/* Header file */
class _MYCLASS_ : public calIWcapRequestResultListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIWCAPREQUESTRESULTLISTENER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void onRequestResult (in calIWcapRequest request, in nsIVariant result); */
NS_IMETHODIMP _MYCLASS_::OnRequestResult(calIWcapRequest *request, nsIVariant *result)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIWcapRequest_h__ */
