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

#ifndef __gen_nsITelephonyService_h__
#define __gen_nsITelephonyService_h__


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

#include "js/Value.h"

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

/* starting interface:    nsITelephonyListener */
#define NS_ITELEPHONYLISTENER_IID_STR "464d4cf8-454a-4cdb-9329-bfe7ede97103"

#define NS_ITELEPHONYLISTENER_IID \
  {0x464d4cf8, 0x454a, 0x4cdb, \
    { 0x93, 0x29, 0xbf, 0xe7, 0xed, 0xe9, 0x71, 0x03 }}

class NS_NO_VTABLE nsITelephonyListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITELEPHONYLISTENER_IID)

  /* void callStateChanged (in unsigned long clientId, in unsigned long callIndex, in unsigned short callState, in AString number, in unsigned short numberPresentation, in AString name, in unsigned short namePresentation, in boolean isOutgoing, in boolean isEmergency, in boolean isConference, in boolean isSwitchable, in boolean isMergeable); */
  NS_IMETHOD CallStateChanged(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) = 0;

  /* void conferenceCallStateChanged (in unsigned short callState); */
  NS_IMETHOD ConferenceCallStateChanged(uint16_t callState) = 0;

  /* void enumerateCallStateComplete (); */
  NS_IMETHOD EnumerateCallStateComplete(void) = 0;

  /* void enumerateCallState (in unsigned long clientId, in unsigned long callIndex, in unsigned short callState, in AString number, in unsigned short numberPresentation, in AString name, in unsigned short namePresentation, in boolean isOutgoing, in boolean isEmergency, in boolean isConference, in boolean isSwitchable, in boolean isMergeable); */
  NS_IMETHOD EnumerateCallState(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) = 0;

  /* void supplementaryServiceNotification (in unsigned long clientId, in long callIndex, in unsigned short notification); */
  NS_IMETHOD SupplementaryServiceNotification(uint32_t clientId, int32_t callIndex, uint16_t notification) = 0;

  /* void notifyError (in unsigned long clientId, in long callIndex, in AString error); */
  NS_IMETHOD NotifyError(uint32_t clientId, int32_t callIndex, const nsAString & error) = 0;

  /* void notifyCdmaCallWaiting (in unsigned long clientId, in AString number, in unsigned short numberPresentation, in AString name, in unsigned short namePresentation); */
  NS_IMETHOD NotifyCdmaCallWaiting(uint32_t clientId, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation) = 0;

  /* void notifyConferenceError (in AString name, in AString message); */
  NS_IMETHOD NotifyConferenceError(const nsAString & name, const nsAString & message) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITelephonyListener, NS_ITELEPHONYLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITELEPHONYLISTENER \
  NS_IMETHOD CallStateChanged(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) MOZ_OVERRIDE; \
  NS_IMETHOD ConferenceCallStateChanged(uint16_t callState) MOZ_OVERRIDE; \
  NS_IMETHOD EnumerateCallStateComplete(void) MOZ_OVERRIDE; \
  NS_IMETHOD EnumerateCallState(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) MOZ_OVERRIDE; \
  NS_IMETHOD SupplementaryServiceNotification(uint32_t clientId, int32_t callIndex, uint16_t notification) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyError(uint32_t clientId, int32_t callIndex, const nsAString & error) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyCdmaCallWaiting(uint32_t clientId, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyConferenceError(const nsAString & name, const nsAString & message) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITELEPHONYLISTENER(_to) \
  NS_IMETHOD CallStateChanged(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) MOZ_OVERRIDE { return _to CallStateChanged(clientId, callIndex, callState, number, numberPresentation, name, namePresentation, isOutgoing, isEmergency, isConference, isSwitchable, isMergeable); } \
  NS_IMETHOD ConferenceCallStateChanged(uint16_t callState) MOZ_OVERRIDE { return _to ConferenceCallStateChanged(callState); } \
  NS_IMETHOD EnumerateCallStateComplete(void) MOZ_OVERRIDE { return _to EnumerateCallStateComplete(); } \
  NS_IMETHOD EnumerateCallState(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) MOZ_OVERRIDE { return _to EnumerateCallState(clientId, callIndex, callState, number, numberPresentation, name, namePresentation, isOutgoing, isEmergency, isConference, isSwitchable, isMergeable); } \
  NS_IMETHOD SupplementaryServiceNotification(uint32_t clientId, int32_t callIndex, uint16_t notification) MOZ_OVERRIDE { return _to SupplementaryServiceNotification(clientId, callIndex, notification); } \
  NS_IMETHOD NotifyError(uint32_t clientId, int32_t callIndex, const nsAString & error) MOZ_OVERRIDE { return _to NotifyError(clientId, callIndex, error); } \
  NS_IMETHOD NotifyCdmaCallWaiting(uint32_t clientId, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation) MOZ_OVERRIDE { return _to NotifyCdmaCallWaiting(clientId, number, numberPresentation, name, namePresentation); } \
  NS_IMETHOD NotifyConferenceError(const nsAString & name, const nsAString & message) MOZ_OVERRIDE { return _to NotifyConferenceError(name, message); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITELEPHONYLISTENER(_to) \
  NS_IMETHOD CallStateChanged(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CallStateChanged(clientId, callIndex, callState, number, numberPresentation, name, namePresentation, isOutgoing, isEmergency, isConference, isSwitchable, isMergeable); } \
  NS_IMETHOD ConferenceCallStateChanged(uint16_t callState) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->ConferenceCallStateChanged(callState); } \
  NS_IMETHOD EnumerateCallStateComplete(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCallStateComplete(); } \
  NS_IMETHOD EnumerateCallState(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCallState(clientId, callIndex, callState, number, numberPresentation, name, namePresentation, isOutgoing, isEmergency, isConference, isSwitchable, isMergeable); } \
  NS_IMETHOD SupplementaryServiceNotification(uint32_t clientId, int32_t callIndex, uint16_t notification) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SupplementaryServiceNotification(clientId, callIndex, notification); } \
  NS_IMETHOD NotifyError(uint32_t clientId, int32_t callIndex, const nsAString & error) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyError(clientId, callIndex, error); } \
  NS_IMETHOD NotifyCdmaCallWaiting(uint32_t clientId, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyCdmaCallWaiting(clientId, number, numberPresentation, name, namePresentation); } \
  NS_IMETHOD NotifyConferenceError(const nsAString & name, const nsAString & message) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyConferenceError(name, message); } 

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

/* Header file */
class nsTelephonyListener : public nsITelephonyListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITELEPHONYLISTENER

  nsTelephonyListener();

private:
  ~nsTelephonyListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTelephonyListener, nsITelephonyListener)

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

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

/* void callStateChanged (in unsigned long clientId, in unsigned long callIndex, in unsigned short callState, in AString number, in unsigned short numberPresentation, in AString name, in unsigned short namePresentation, in boolean isOutgoing, in boolean isEmergency, in boolean isConference, in boolean isSwitchable, in boolean isMergeable); */
NS_IMETHODIMP nsTelephonyListener::CallStateChanged(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void conferenceCallStateChanged (in unsigned short callState); */
NS_IMETHODIMP nsTelephonyListener::ConferenceCallStateChanged(uint16_t callState)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void enumerateCallStateComplete (); */
NS_IMETHODIMP nsTelephonyListener::EnumerateCallStateComplete()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void enumerateCallState (in unsigned long clientId, in unsigned long callIndex, in unsigned short callState, in AString number, in unsigned short numberPresentation, in AString name, in unsigned short namePresentation, in boolean isOutgoing, in boolean isEmergency, in boolean isConference, in boolean isSwitchable, in boolean isMergeable); */
NS_IMETHODIMP nsTelephonyListener::EnumerateCallState(uint32_t clientId, uint32_t callIndex, uint16_t callState, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation, bool isOutgoing, bool isEmergency, bool isConference, bool isSwitchable, bool isMergeable)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void supplementaryServiceNotification (in unsigned long clientId, in long callIndex, in unsigned short notification); */
NS_IMETHODIMP nsTelephonyListener::SupplementaryServiceNotification(uint32_t clientId, int32_t callIndex, uint16_t notification)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyError (in unsigned long clientId, in long callIndex, in AString error); */
NS_IMETHODIMP nsTelephonyListener::NotifyError(uint32_t clientId, int32_t callIndex, const nsAString & error)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyCdmaCallWaiting (in unsigned long clientId, in AString number, in unsigned short numberPresentation, in AString name, in unsigned short namePresentation); */
NS_IMETHODIMP nsTelephonyListener::NotifyCdmaCallWaiting(uint32_t clientId, const nsAString & number, uint16_t numberPresentation, const nsAString & name, uint16_t namePresentation)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyConferenceError (in AString name, in AString message); */
NS_IMETHODIMP nsTelephonyListener::NotifyConferenceError(const nsAString & name, const nsAString & message)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsITelephonyCallback */
#define NS_ITELEPHONYCALLBACK_IID_STR "67533db3-cd38-475c-a774-8d0bbf9169fb"

#define NS_ITELEPHONYCALLBACK_IID \
  {0x67533db3, 0xcd38, 0x475c, \
    { 0xa7, 0x74, 0x8d, 0x0b, 0xbf, 0x91, 0x69, 0xfb }}

class NS_NO_VTABLE nsITelephonyCallback : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITELEPHONYCALLBACK_IID)

  /* void notifyDialMMI (in AString serviceCode); */
  NS_IMETHOD NotifyDialMMI(const nsAString & serviceCode) = 0;

  /* void notifyDialError (in AString error); */
  NS_IMETHOD NotifyDialError(const nsAString & error) = 0;

  /* void notifyDialCallSuccess (in unsigned long callIndex, in AString number); */
  NS_IMETHOD NotifyDialCallSuccess(uint32_t callIndex, const nsAString & number) = 0;

  /* void notifyDialMMISuccess (in jsval result); */
  NS_IMETHOD NotifyDialMMISuccess(JS::HandleValue result) = 0;

  /* void notifyDialMMIError (in AString error); */
  NS_IMETHOD NotifyDialMMIError(const nsAString & error) = 0;

  /* void notifyDialMMIErrorWithInfo (in AString error, in unsigned short info); */
  NS_IMETHOD NotifyDialMMIErrorWithInfo(const nsAString & error, uint16_t info) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITelephonyCallback, NS_ITELEPHONYCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITELEPHONYCALLBACK \
  NS_IMETHOD NotifyDialMMI(const nsAString & serviceCode) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyDialError(const nsAString & error) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyDialCallSuccess(uint32_t callIndex, const nsAString & number) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyDialMMISuccess(JS::HandleValue result) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyDialMMIError(const nsAString & error) MOZ_OVERRIDE; \
  NS_IMETHOD NotifyDialMMIErrorWithInfo(const nsAString & error, uint16_t info) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITELEPHONYCALLBACK(_to) \
  NS_IMETHOD NotifyDialMMI(const nsAString & serviceCode) MOZ_OVERRIDE { return _to NotifyDialMMI(serviceCode); } \
  NS_IMETHOD NotifyDialError(const nsAString & error) MOZ_OVERRIDE { return _to NotifyDialError(error); } \
  NS_IMETHOD NotifyDialCallSuccess(uint32_t callIndex, const nsAString & number) MOZ_OVERRIDE { return _to NotifyDialCallSuccess(callIndex, number); } \
  NS_IMETHOD NotifyDialMMISuccess(JS::HandleValue result) MOZ_OVERRIDE { return _to NotifyDialMMISuccess(result); } \
  NS_IMETHOD NotifyDialMMIError(const nsAString & error) MOZ_OVERRIDE { return _to NotifyDialMMIError(error); } \
  NS_IMETHOD NotifyDialMMIErrorWithInfo(const nsAString & error, uint16_t info) MOZ_OVERRIDE { return _to NotifyDialMMIErrorWithInfo(error, info); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITELEPHONYCALLBACK(_to) \
  NS_IMETHOD NotifyDialMMI(const nsAString & serviceCode) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDialMMI(serviceCode); } \
  NS_IMETHOD NotifyDialError(const nsAString & error) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDialError(error); } \
  NS_IMETHOD NotifyDialCallSuccess(uint32_t callIndex, const nsAString & number) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDialCallSuccess(callIndex, number); } \
  NS_IMETHOD NotifyDialMMISuccess(JS::HandleValue result) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDialMMISuccess(result); } \
  NS_IMETHOD NotifyDialMMIError(const nsAString & error) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDialMMIError(error); } \
  NS_IMETHOD NotifyDialMMIErrorWithInfo(const nsAString & error, uint16_t info) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDialMMIErrorWithInfo(error, info); } 

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

/* Header file */
class nsTelephonyCallback : public nsITelephonyCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITELEPHONYCALLBACK

  nsTelephonyCallback();

private:
  ~nsTelephonyCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTelephonyCallback, nsITelephonyCallback)

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

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

/* void notifyDialMMI (in AString serviceCode); */
NS_IMETHODIMP nsTelephonyCallback::NotifyDialMMI(const nsAString & serviceCode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyDialError (in AString error); */
NS_IMETHODIMP nsTelephonyCallback::NotifyDialError(const nsAString & error)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyDialCallSuccess (in unsigned long callIndex, in AString number); */
NS_IMETHODIMP nsTelephonyCallback::NotifyDialCallSuccess(uint32_t callIndex, const nsAString & number)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyDialMMISuccess (in jsval result); */
NS_IMETHODIMP nsTelephonyCallback::NotifyDialMMISuccess(JS::HandleValue result)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyDialMMIError (in AString error); */
NS_IMETHODIMP nsTelephonyCallback::NotifyDialMMIError(const nsAString & error)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyDialMMIErrorWithInfo (in AString error, in unsigned short info); */
NS_IMETHODIMP nsTelephonyCallback::NotifyDialMMIErrorWithInfo(const nsAString & error, uint16_t info)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define TELEPHONY_SERVICE_CID \
  { 0x9cf8aa52, 0x7c1c, 0x4cde, { 0x97, 0x4e, 0xed, 0x2a, 0xa0, 0xe7, 0x35, 0xfa } }
#define TELEPHONY_SERVICE_CONTRACTID \
  "@mozilla.org/telephony/telephonyservice;1"

/* starting interface:    nsITelephonyService */
#define NS_ITELEPHONYSERVICE_IID_STR "4ff3ecb7-b024-4752-9dd6-c3623c6e6b8a"

#define NS_ITELEPHONYSERVICE_IID \
  {0x4ff3ecb7, 0xb024, 0x4752, \
    { 0x9d, 0xd6, 0xc3, 0x62, 0x3c, 0x6e, 0x6b, 0x8a }}

class NS_NO_VTABLE nsITelephonyService : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITELEPHONYSERVICE_IID)

  enum {
    CALL_STATE_UNKNOWN = 0U,
    CALL_STATE_DIALING = 1U,
    CALL_STATE_ALERTING = 2U,
    CALL_STATE_CONNECTING = 3U,
    CALL_STATE_CONNECTED = 4U,
    CALL_STATE_HOLDING = 5U,
    CALL_STATE_HELD = 6U,
    CALL_STATE_RESUMING = 7U,
    CALL_STATE_DISCONNECTING = 8U,
    CALL_STATE_DISCONNECTED = 9U,
    CALL_STATE_INCOMING = 10U,
    NOTIFICATION_REMOTE_HELD = 0U,
    NOTIFICATION_REMOTE_RESUMED = 1U,
    CALL_PRESENTATION_ALLOWED = 0U,
    CALL_PRESENTATION_RESTRICTED = 1U,
    CALL_PRESENTATION_UNKNOWN = 2U,
    CALL_PRESENTATION_PAYPHONE = 3U
  };

  /* readonly attribute unsigned long defaultServiceId; */
  NS_IMETHOD GetDefaultServiceId(uint32_t *aDefaultServiceId) = 0;

  /* void registerListener (in nsITelephonyListener listener); */
  NS_IMETHOD RegisterListener(nsITelephonyListener *listener) = 0;

  /* void unregisterListener (in nsITelephonyListener listener); */
  NS_IMETHOD UnregisterListener(nsITelephonyListener *listener) = 0;

  /* void enumerateCalls (in nsITelephonyListener listener); */
  NS_IMETHOD EnumerateCalls(nsITelephonyListener *listener) = 0;

  /* void dial (in unsigned long clientId, in DOMString number, in boolean isEmergency, in nsITelephonyCallback callback); */
  NS_IMETHOD Dial(uint32_t clientId, const nsAString & number, bool isEmergency, nsITelephonyCallback *callback) = 0;

  /* void hangUp (in unsigned long clientId, in unsigned long callIndex); */
  NS_IMETHOD HangUp(uint32_t clientId, uint32_t callIndex) = 0;

  /* void startTone (in unsigned long clientId, in DOMString dtmfChar); */
  NS_IMETHOD StartTone(uint32_t clientId, const nsAString & dtmfChar) = 0;

  /* void stopTone (in unsigned long clientId); */
  NS_IMETHOD StopTone(uint32_t clientId) = 0;

  /* void answerCall (in unsigned long clientId, in unsigned long callIndex); */
  NS_IMETHOD AnswerCall(uint32_t clientId, uint32_t callIndex) = 0;

  /* void rejectCall (in unsigned long clientId, in unsigned long callIndex); */
  NS_IMETHOD RejectCall(uint32_t clientId, uint32_t callIndex) = 0;

  /* void holdCall (in unsigned long clientId, in unsigned long callIndex); */
  NS_IMETHOD HoldCall(uint32_t clientId, uint32_t callIndex) = 0;

  /* void resumeCall (in unsigned long clientId, in unsigned long callIndex); */
  NS_IMETHOD ResumeCall(uint32_t clientId, uint32_t callIndex) = 0;

  /* void conferenceCall (in unsigned long clientId); */
  NS_IMETHOD ConferenceCall(uint32_t clientId) = 0;

  /* void separateCall (in unsigned long clientId, in unsigned long callIndex); */
  NS_IMETHOD SeparateCall(uint32_t clientId, uint32_t callIndex) = 0;

  /* void holdConference (in unsigned long clientId); */
  NS_IMETHOD HoldConference(uint32_t clientId) = 0;

  /* void resumeConference (in unsigned long clientId); */
  NS_IMETHOD ResumeConference(uint32_t clientId) = 0;

  /* attribute bool microphoneMuted; */
  NS_IMETHOD GetMicrophoneMuted(bool *aMicrophoneMuted) = 0;
  NS_IMETHOD SetMicrophoneMuted(bool aMicrophoneMuted) = 0;

  /* attribute bool speakerEnabled; */
  NS_IMETHOD GetSpeakerEnabled(bool *aSpeakerEnabled) = 0;
  NS_IMETHOD SetSpeakerEnabled(bool aSpeakerEnabled) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITelephonyService, NS_ITELEPHONYSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITELEPHONYSERVICE \
  NS_IMETHOD GetDefaultServiceId(uint32_t *aDefaultServiceId) MOZ_OVERRIDE; \
  NS_IMETHOD RegisterListener(nsITelephonyListener *listener) MOZ_OVERRIDE; \
  NS_IMETHOD UnregisterListener(nsITelephonyListener *listener) MOZ_OVERRIDE; \
  NS_IMETHOD EnumerateCalls(nsITelephonyListener *listener) MOZ_OVERRIDE; \
  NS_IMETHOD Dial(uint32_t clientId, const nsAString & number, bool isEmergency, nsITelephonyCallback *callback) MOZ_OVERRIDE; \
  NS_IMETHOD HangUp(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE; \
  NS_IMETHOD StartTone(uint32_t clientId, const nsAString & dtmfChar) MOZ_OVERRIDE; \
  NS_IMETHOD StopTone(uint32_t clientId) MOZ_OVERRIDE; \
  NS_IMETHOD AnswerCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE; \
  NS_IMETHOD RejectCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE; \
  NS_IMETHOD HoldCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE; \
  NS_IMETHOD ResumeCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE; \
  NS_IMETHOD ConferenceCall(uint32_t clientId) MOZ_OVERRIDE; \
  NS_IMETHOD SeparateCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE; \
  NS_IMETHOD HoldConference(uint32_t clientId) MOZ_OVERRIDE; \
  NS_IMETHOD ResumeConference(uint32_t clientId) MOZ_OVERRIDE; \
  NS_IMETHOD GetMicrophoneMuted(bool *aMicrophoneMuted) MOZ_OVERRIDE; \
  NS_IMETHOD SetMicrophoneMuted(bool aMicrophoneMuted) MOZ_OVERRIDE; \
  NS_IMETHOD GetSpeakerEnabled(bool *aSpeakerEnabled) MOZ_OVERRIDE; \
  NS_IMETHOD SetSpeakerEnabled(bool aSpeakerEnabled) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITELEPHONYSERVICE(_to) \
  NS_IMETHOD GetDefaultServiceId(uint32_t *aDefaultServiceId) MOZ_OVERRIDE { return _to GetDefaultServiceId(aDefaultServiceId); } \
  NS_IMETHOD RegisterListener(nsITelephonyListener *listener) MOZ_OVERRIDE { return _to RegisterListener(listener); } \
  NS_IMETHOD UnregisterListener(nsITelephonyListener *listener) MOZ_OVERRIDE { return _to UnregisterListener(listener); } \
  NS_IMETHOD EnumerateCalls(nsITelephonyListener *listener) MOZ_OVERRIDE { return _to EnumerateCalls(listener); } \
  NS_IMETHOD Dial(uint32_t clientId, const nsAString & number, bool isEmergency, nsITelephonyCallback *callback) MOZ_OVERRIDE { return _to Dial(clientId, number, isEmergency, callback); } \
  NS_IMETHOD HangUp(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return _to HangUp(clientId, callIndex); } \
  NS_IMETHOD StartTone(uint32_t clientId, const nsAString & dtmfChar) MOZ_OVERRIDE { return _to StartTone(clientId, dtmfChar); } \
  NS_IMETHOD StopTone(uint32_t clientId) MOZ_OVERRIDE { return _to StopTone(clientId); } \
  NS_IMETHOD AnswerCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return _to AnswerCall(clientId, callIndex); } \
  NS_IMETHOD RejectCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return _to RejectCall(clientId, callIndex); } \
  NS_IMETHOD HoldCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return _to HoldCall(clientId, callIndex); } \
  NS_IMETHOD ResumeCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return _to ResumeCall(clientId, callIndex); } \
  NS_IMETHOD ConferenceCall(uint32_t clientId) MOZ_OVERRIDE { return _to ConferenceCall(clientId); } \
  NS_IMETHOD SeparateCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return _to SeparateCall(clientId, callIndex); } \
  NS_IMETHOD HoldConference(uint32_t clientId) MOZ_OVERRIDE { return _to HoldConference(clientId); } \
  NS_IMETHOD ResumeConference(uint32_t clientId) MOZ_OVERRIDE { return _to ResumeConference(clientId); } \
  NS_IMETHOD GetMicrophoneMuted(bool *aMicrophoneMuted) MOZ_OVERRIDE { return _to GetMicrophoneMuted(aMicrophoneMuted); } \
  NS_IMETHOD SetMicrophoneMuted(bool aMicrophoneMuted) MOZ_OVERRIDE { return _to SetMicrophoneMuted(aMicrophoneMuted); } \
  NS_IMETHOD GetSpeakerEnabled(bool *aSpeakerEnabled) MOZ_OVERRIDE { return _to GetSpeakerEnabled(aSpeakerEnabled); } \
  NS_IMETHOD SetSpeakerEnabled(bool aSpeakerEnabled) MOZ_OVERRIDE { return _to SetSpeakerEnabled(aSpeakerEnabled); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITELEPHONYSERVICE(_to) \
  NS_IMETHOD GetDefaultServiceId(uint32_t *aDefaultServiceId) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultServiceId(aDefaultServiceId); } \
  NS_IMETHOD RegisterListener(nsITelephonyListener *listener) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterListener(listener); } \
  NS_IMETHOD UnregisterListener(nsITelephonyListener *listener) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterListener(listener); } \
  NS_IMETHOD EnumerateCalls(nsITelephonyListener *listener) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCalls(listener); } \
  NS_IMETHOD Dial(uint32_t clientId, const nsAString & number, bool isEmergency, nsITelephonyCallback *callback) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Dial(clientId, number, isEmergency, callback); } \
  NS_IMETHOD HangUp(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->HangUp(clientId, callIndex); } \
  NS_IMETHOD StartTone(uint32_t clientId, const nsAString & dtmfChar) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->StartTone(clientId, dtmfChar); } \
  NS_IMETHOD StopTone(uint32_t clientId) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->StopTone(clientId); } \
  NS_IMETHOD AnswerCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->AnswerCall(clientId, callIndex); } \
  NS_IMETHOD RejectCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->RejectCall(clientId, callIndex); } \
  NS_IMETHOD HoldCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->HoldCall(clientId, callIndex); } \
  NS_IMETHOD ResumeCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->ResumeCall(clientId, callIndex); } \
  NS_IMETHOD ConferenceCall(uint32_t clientId) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->ConferenceCall(clientId); } \
  NS_IMETHOD SeparateCall(uint32_t clientId, uint32_t callIndex) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SeparateCall(clientId, callIndex); } \
  NS_IMETHOD HoldConference(uint32_t clientId) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->HoldConference(clientId); } \
  NS_IMETHOD ResumeConference(uint32_t clientId) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->ResumeConference(clientId); } \
  NS_IMETHOD GetMicrophoneMuted(bool *aMicrophoneMuted) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMicrophoneMuted(aMicrophoneMuted); } \
  NS_IMETHOD SetMicrophoneMuted(bool aMicrophoneMuted) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMicrophoneMuted(aMicrophoneMuted); } \
  NS_IMETHOD GetSpeakerEnabled(bool *aSpeakerEnabled) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpeakerEnabled(aSpeakerEnabled); } \
  NS_IMETHOD SetSpeakerEnabled(bool aSpeakerEnabled) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSpeakerEnabled(aSpeakerEnabled); } 

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

/* Header file */
class nsTelephonyService : public nsITelephonyService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITELEPHONYSERVICE

  nsTelephonyService();

private:
  ~nsTelephonyService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTelephonyService, nsITelephonyService)

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

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

/* readonly attribute unsigned long defaultServiceId; */
NS_IMETHODIMP nsTelephonyService::GetDefaultServiceId(uint32_t *aDefaultServiceId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void registerListener (in nsITelephonyListener listener); */
NS_IMETHODIMP nsTelephonyService::RegisterListener(nsITelephonyListener *listener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void unregisterListener (in nsITelephonyListener listener); */
NS_IMETHODIMP nsTelephonyService::UnregisterListener(nsITelephonyListener *listener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void enumerateCalls (in nsITelephonyListener listener); */
NS_IMETHODIMP nsTelephonyService::EnumerateCalls(nsITelephonyListener *listener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void dial (in unsigned long clientId, in DOMString number, in boolean isEmergency, in nsITelephonyCallback callback); */
NS_IMETHODIMP nsTelephonyService::Dial(uint32_t clientId, const nsAString & number, bool isEmergency, nsITelephonyCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void hangUp (in unsigned long clientId, in unsigned long callIndex); */
NS_IMETHODIMP nsTelephonyService::HangUp(uint32_t clientId, uint32_t callIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void startTone (in unsigned long clientId, in DOMString dtmfChar); */
NS_IMETHODIMP nsTelephonyService::StartTone(uint32_t clientId, const nsAString & dtmfChar)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void stopTone (in unsigned long clientId); */
NS_IMETHODIMP nsTelephonyService::StopTone(uint32_t clientId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void answerCall (in unsigned long clientId, in unsigned long callIndex); */
NS_IMETHODIMP nsTelephonyService::AnswerCall(uint32_t clientId, uint32_t callIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void rejectCall (in unsigned long clientId, in unsigned long callIndex); */
NS_IMETHODIMP nsTelephonyService::RejectCall(uint32_t clientId, uint32_t callIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void holdCall (in unsigned long clientId, in unsigned long callIndex); */
NS_IMETHODIMP nsTelephonyService::HoldCall(uint32_t clientId, uint32_t callIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void resumeCall (in unsigned long clientId, in unsigned long callIndex); */
NS_IMETHODIMP nsTelephonyService::ResumeCall(uint32_t clientId, uint32_t callIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void conferenceCall (in unsigned long clientId); */
NS_IMETHODIMP nsTelephonyService::ConferenceCall(uint32_t clientId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void separateCall (in unsigned long clientId, in unsigned long callIndex); */
NS_IMETHODIMP nsTelephonyService::SeparateCall(uint32_t clientId, uint32_t callIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void holdConference (in unsigned long clientId); */
NS_IMETHODIMP nsTelephonyService::HoldConference(uint32_t clientId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void resumeConference (in unsigned long clientId); */
NS_IMETHODIMP nsTelephonyService::ResumeConference(uint32_t clientId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute bool microphoneMuted; */
NS_IMETHODIMP nsTelephonyService::GetMicrophoneMuted(bool *aMicrophoneMuted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsTelephonyService::SetMicrophoneMuted(bool aMicrophoneMuted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute bool speakerEnabled; */
NS_IMETHODIMP nsTelephonyService::GetSpeakerEnabled(bool *aSpeakerEnabled)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsTelephonyService::SetSpeakerEnabled(bool aSpeakerEnabled)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

template<typename T> struct already_AddRefed;
already_AddRefed<nsITelephonyService>
NS_CreateTelephonyService();

#endif /* __gen_nsITelephonyService_h__ */
