/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/cen-w32-xr/build/xpcom/base/nsITelemetry.idl
 */

#ifndef __gen_nsITelemetry_h__
#define __gen_nsITelemetry_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

/* starting interface:    nsITelemetry */
#define NS_ITELEMETRY_IID_STR "5c9afdb5-0532-47f3-be31-79e13a6db642"

#define NS_ITELEMETRY_IID \
  {0x5c9afdb5, 0x0532, 0x47f3, \
    { 0xbe, 0x31, 0x79, 0xe1, 0x3a, 0x6d, 0xb6, 0x42 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsITelemetry : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITELEMETRY_IID)

  /* [implicit_jscontext] readonly attribute jsval histogramSnapshots; */
  NS_SCRIPTABLE NS_IMETHOD GetHistogramSnapshots(JSContext *cx, jsval *aHistogramSnapshots) = 0;

  /** 
   * Create and return a histogram where bucket sizes increase exponentially. Parameters:
   * @param name Unique histogram name
   * @param min - Minimal bucket size
   * @param max - Maximum bucket size
   * @param bucket_count - number of buckets in the histogram.
   * The returned object has the following functions:
   *   add(int) - Adds an int value to the appropriate bucket
   *   snapshot() - Returns a snapshot of the histogram with the same data fields as in histogramSnapshots()
   */
  /* [implicit_jscontext] jsval newExponentialHistogram (in ACString name, in PRInt32 min, in PRInt32 max, in PRUint32 bucket_count); */
  NS_SCRIPTABLE NS_IMETHOD NewExponentialHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM) = 0;

  /* [implicit_jscontext] jsval newLinearHistogram (in ACString name, in PRInt32 min, in PRInt32 max, in PRUint32 bucket_count); */
  NS_SCRIPTABLE NS_IMETHOD NewLinearHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITelemetry, NS_ITELEMETRY_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITELEMETRY \
  NS_SCRIPTABLE NS_IMETHOD GetHistogramSnapshots(JSContext *cx, jsval *aHistogramSnapshots); \
  NS_SCRIPTABLE NS_IMETHOD NewExponentialHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD NewLinearHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITELEMETRY(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetHistogramSnapshots(JSContext *cx, jsval *aHistogramSnapshots) { return _to GetHistogramSnapshots(cx, aHistogramSnapshots); } \
  NS_SCRIPTABLE NS_IMETHOD NewExponentialHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM) { return _to NewExponentialHistogram(name, min, max, bucket_count, cx, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD NewLinearHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM) { return _to NewLinearHistogram(name, min, max, bucket_count, cx, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITELEMETRY(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetHistogramSnapshots(JSContext *cx, jsval *aHistogramSnapshots) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHistogramSnapshots(cx, aHistogramSnapshots); } \
  NS_SCRIPTABLE NS_IMETHOD NewExponentialHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewExponentialHistogram(name, min, max, bucket_count, cx, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD NewLinearHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewLinearHistogram(name, min, max, bucket_count, cx, _retval); } 

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

/* Header file */
class nsTelemetry : public nsITelemetry
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITELEMETRY

  nsTelemetry();

private:
  ~nsTelemetry();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTelemetry, nsITelemetry)

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

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

/* [implicit_jscontext] readonly attribute jsval histogramSnapshots; */
NS_IMETHODIMP nsTelemetry::GetHistogramSnapshots(JSContext *cx, jsval *aHistogramSnapshots)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [implicit_jscontext] jsval newExponentialHistogram (in ACString name, in PRInt32 min, in PRInt32 max, in PRUint32 bucket_count); */
NS_IMETHODIMP nsTelemetry::NewExponentialHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [implicit_jscontext] jsval newLinearHistogram (in ACString name, in PRInt32 min, in PRInt32 max, in PRUint32 bucket_count); */
NS_IMETHODIMP nsTelemetry::NewLinearHistogram(const nsACString & name, PRInt32 min, PRInt32 max, PRUint32 bucket_count, JSContext *cx, jsval *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsITelemetry_h__ */
