/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx64-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 "29464d3d-f838-4afb-a737-319fe0c6cc04"

#define NS_ITELEMETRY_IID \
  {0x29464d3d, 0xf838, 0x4afb, \
    { 0xa7, 0x37, 0x31, 0x9f, 0xe0, 0xc6, 0xcc, 0x04 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsITelemetry : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITELEMETRY_IID)

  /**
   * Histogram types:
   * HISTOGRAM_EXPONENTIAL - buckets increase exponentially
   * HISTOGRAM_LINEAR - buckets increase linearly
   */
  enum { HISTOGRAM_EXPONENTIAL = 0U };

  enum { HISTOGRAM_LINEAR = 1U };

  /* [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.
   * @param type - HISTOGRAM_EXPONENTIAL or HISTOGRAM_LINEAR
   * 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 newHistogram (in ACString name, in PRUint32 min, in PRUint32 max, in PRUint32 bucket_count, in unsigned long histogram_type); */
  NS_SCRIPTABLE NS_IMETHOD NewHistogram(const nsACString & name, PRUint32 min, PRUint32 max, PRUint32 bucket_count, PRUint32 histogram_type, 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 NewHistogram(const nsACString & name, PRUint32 min, PRUint32 max, PRUint32 bucket_count, PRUint32 histogram_type, 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 NewHistogram(const nsACString & name, PRUint32 min, PRUint32 max, PRUint32 bucket_count, PRUint32 histogram_type, JSContext *cx, jsval *_retval NS_OUTPARAM) { return _to NewHistogram(name, min, max, bucket_count, histogram_type, 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 NewHistogram(const nsACString & name, PRUint32 min, PRUint32 max, PRUint32 bucket_count, PRUint32 histogram_type, JSContext *cx, jsval *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewHistogram(name, min, max, bucket_count, histogram_type, 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 newHistogram (in ACString name, in PRUint32 min, in PRUint32 max, in PRUint32 bucket_count, in unsigned long histogram_type); */
NS_IMETHODIMP nsTelemetry::NewHistogram(const nsACString & name, PRUint32 min, PRUint32 max, PRUint32 bucket_count, PRUint32 histogram_type, JSContext *cx, jsval *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsITelemetry_h__ */
