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

#ifndef __gen_nsIUDPSocketChild_h__
#define __gen_nsIUDPSocketChild_h__


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

#ifndef __gen_nsINetAddr_h__
#include "nsINetAddr.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIUDPSocketInternal; /* forward declaration */

class nsIInputStream; /* forward declaration */

namespace mozilla {
namespace net {
union NetAddr;
}
}

/* starting interface:    nsIUDPSocketChild */
#define NS_IUDPSOCKETCHILD_IID_STR "36ec5264-6a58-4cf2-ad9a-185292e0d1d1"

#define NS_IUDPSOCKETCHILD_IID \
  {0x36ec5264, 0x6a58, 0x4cf2, \
    { 0xad, 0x9a, 0x18, 0x52, 0x92, 0xe0, 0xd1, 0xd1 }}

class NS_NO_VTABLE nsIUDPSocketChild : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUDPSOCKETCHILD_IID)

  /* readonly attribute unsigned short localPort; */
  NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) = 0;

  /* readonly attribute AUTF8String localAddress; */
  NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) = 0;

  /* attribute AUTF8String filterName; */
  NS_IMETHOD GetFilterName(nsACString & aFilterName) = 0;
  NS_IMETHOD SetFilterName(const nsACString & aFilterName) = 0;

  /* void bind (in nsIUDPSocketInternal socket, in AUTF8String host, in unsigned short port, in bool addressReuse, in bool loopback); */
  NS_IMETHOD Bind(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port, bool addressReuse, bool loopback) = 0;

  /* void send (in AUTF8String host, in unsigned short port, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
  NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) = 0;

  /* void sendWithAddr (in nsINetAddr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
  NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) = 0;

  /* [noscript] void sendWithAddress ([const] in NetAddrPtr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
  NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) = 0;

  /* void sendBinaryStream (in AUTF8String host, in unsigned short port, in nsIInputStream stream); */
  NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) = 0;

  /* void close (); */
  NS_IMETHOD Close(void) = 0;

  /* void joinMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
  NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) = 0;

  /* void leaveMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
  NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIUDPSocketChild, NS_IUDPSOCKETCHILD_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIUDPSOCKETCHILD \
  NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) MOZ_OVERRIDE; \
  NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) MOZ_OVERRIDE; \
  NS_IMETHOD GetFilterName(nsACString & aFilterName) MOZ_OVERRIDE; \
  NS_IMETHOD SetFilterName(const nsACString & aFilterName) MOZ_OVERRIDE; \
  NS_IMETHOD Bind(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port, bool addressReuse, bool loopback) MOZ_OVERRIDE; \
  NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE; \
  NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE; \
  NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE; \
  NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) MOZ_OVERRIDE; \
  NS_IMETHOD Close(void) MOZ_OVERRIDE; \
  NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) MOZ_OVERRIDE; \
  NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIUDPSOCKETCHILD(_to) \
  NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) MOZ_OVERRIDE { return _to GetLocalPort(aLocalPort); } \
  NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) MOZ_OVERRIDE { return _to GetLocalAddress(aLocalAddress); } \
  NS_IMETHOD GetFilterName(nsACString & aFilterName) MOZ_OVERRIDE { return _to GetFilterName(aFilterName); } \
  NS_IMETHOD SetFilterName(const nsACString & aFilterName) MOZ_OVERRIDE { return _to SetFilterName(aFilterName); } \
  NS_IMETHOD Bind(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port, bool addressReuse, bool loopback) MOZ_OVERRIDE { return _to Bind(socket, host, port, addressReuse, loopback); } \
  NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE { return _to Send(host, port, bytes, byteLength); } \
  NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE { return _to SendWithAddr(addr, bytes, byteLength); } \
  NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE { return _to SendWithAddress(addr, bytes, byteLength); } \
  NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) MOZ_OVERRIDE { return _to SendBinaryStream(host, port, stream); } \
  NS_IMETHOD Close(void) MOZ_OVERRIDE { return _to Close(); } \
  NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) MOZ_OVERRIDE { return _to JoinMulticast(multicastAddress, iface); } \
  NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) MOZ_OVERRIDE { return _to LeaveMulticast(multicastAddress, iface); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIUDPSOCKETCHILD(_to) \
  NS_IMETHOD GetLocalPort(uint16_t *aLocalPort) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalPort(aLocalPort); } \
  NS_IMETHOD GetLocalAddress(nsACString & aLocalAddress) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalAddress(aLocalAddress); } \
  NS_IMETHOD GetFilterName(nsACString & aFilterName) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilterName(aFilterName); } \
  NS_IMETHOD SetFilterName(const nsACString & aFilterName) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilterName(aFilterName); } \
  NS_IMETHOD Bind(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port, bool addressReuse, bool loopback) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Bind(socket, host, port, addressReuse, loopback); } \
  NS_IMETHOD Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Send(host, port, bytes, byteLength); } \
  NS_IMETHOD SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SendWithAddr(addr, bytes, byteLength); } \
  NS_IMETHOD SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SendWithAddress(addr, bytes, byteLength); } \
  NS_IMETHOD SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SendBinaryStream(host, port, stream); } \
  NS_IMETHOD Close(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
  NS_IMETHOD JoinMulticast(const nsACString & multicastAddress, const nsACString & iface) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->JoinMulticast(multicastAddress, iface); } \
  NS_IMETHOD LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->LeaveMulticast(multicastAddress, iface); } 

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

/* Header file */
class nsUDPSocketChild : public nsIUDPSocketChild
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIUDPSOCKETCHILD

  nsUDPSocketChild();

private:
  ~nsUDPSocketChild();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsUDPSocketChild, nsIUDPSocketChild)

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

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

/* readonly attribute unsigned short localPort; */
NS_IMETHODIMP nsUDPSocketChild::GetLocalPort(uint16_t *aLocalPort)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AUTF8String localAddress; */
NS_IMETHODIMP nsUDPSocketChild::GetLocalAddress(nsACString & aLocalAddress)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute AUTF8String filterName; */
NS_IMETHODIMP nsUDPSocketChild::GetFilterName(nsACString & aFilterName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsUDPSocketChild::SetFilterName(const nsACString & aFilterName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void bind (in nsIUDPSocketInternal socket, in AUTF8String host, in unsigned short port, in bool addressReuse, in bool loopback); */
NS_IMETHODIMP nsUDPSocketChild::Bind(nsIUDPSocketInternal *socket, const nsACString & host, uint16_t port, bool addressReuse, bool loopback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void send (in AUTF8String host, in unsigned short port, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
NS_IMETHODIMP nsUDPSocketChild::Send(const nsACString & host, uint16_t port, const uint8_t *bytes, uint32_t byteLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void sendWithAddr (in nsINetAddr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
NS_IMETHODIMP nsUDPSocketChild::SendWithAddr(nsINetAddr *addr, const uint8_t *bytes, uint32_t byteLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void sendWithAddress ([const] in NetAddrPtr addr, [array, size_is (byteLength), const] in uint8_t bytes, in unsigned long byteLength); */
NS_IMETHODIMP nsUDPSocketChild::SendWithAddress(const mozilla::net::NetAddr *addr, const uint8_t *bytes, uint32_t byteLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void sendBinaryStream (in AUTF8String host, in unsigned short port, in nsIInputStream stream); */
NS_IMETHODIMP nsUDPSocketChild::SendBinaryStream(const nsACString & host, uint16_t port, nsIInputStream *stream)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void close (); */
NS_IMETHODIMP nsUDPSocketChild::Close()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void joinMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
NS_IMETHODIMP nsUDPSocketChild::JoinMulticast(const nsACString & multicastAddress, const nsACString & iface)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void leaveMulticast (in AUTF8String multicastAddress, in AUTF8String iface); */
NS_IMETHODIMP nsUDPSocketChild::LeaveMulticast(const nsACString & multicastAddress, const nsACString & iface)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIUDPSocketInternal */
#define NS_IUDPSOCKETINTERNAL_IID_STR "44cd9ad5-d574-4169-baf9-e1af0648a143"

#define NS_IUDPSOCKETINTERNAL_IID \
  {0x44cd9ad5, 0xd574, 0x4169, \
    { 0xba, 0xf9, 0xe1, 0xaf, 0x06, 0x48, 0xa1, 0x43 }}

class NS_NO_VTABLE nsIUDPSocketInternal : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUDPSOCKETINTERNAL_IID)

  /* void callListenerOpened (); */
  NS_IMETHOD CallListenerOpened(void) = 0;

  /* void callListenerClosed (); */
  NS_IMETHOD CallListenerClosed(void) = 0;

  /* void callListenerReceivedData (in AUTF8String host, in unsigned short port, [array, size_is (dataLength), const] in uint8_t data, in unsigned long dataLength); */
  NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) = 0;

  /* void callListenerError (in AUTF8String message, in AUTF8String filename, in uint32_t lineNumber); */
  NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIUDPSocketInternal, NS_IUDPSOCKETINTERNAL_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIUDPSOCKETINTERNAL \
  NS_IMETHOD CallListenerOpened(void) MOZ_OVERRIDE; \
  NS_IMETHOD CallListenerClosed(void) MOZ_OVERRIDE; \
  NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) MOZ_OVERRIDE; \
  NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIUDPSOCKETINTERNAL(_to) \
  NS_IMETHOD CallListenerOpened(void) MOZ_OVERRIDE { return _to CallListenerOpened(); } \
  NS_IMETHOD CallListenerClosed(void) MOZ_OVERRIDE { return _to CallListenerClosed(); } \
  NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) MOZ_OVERRIDE { return _to CallListenerReceivedData(host, port, data, dataLength); } \
  NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) MOZ_OVERRIDE { return _to CallListenerError(message, filename, lineNumber); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIUDPSOCKETINTERNAL(_to) \
  NS_IMETHOD CallListenerOpened(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerOpened(); } \
  NS_IMETHOD CallListenerClosed(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerClosed(); } \
  NS_IMETHOD CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerReceivedData(host, port, data, dataLength); } \
  NS_IMETHOD CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerError(message, filename, lineNumber); } 

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

/* Header file */
class nsUDPSocketInternal : public nsIUDPSocketInternal
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIUDPSOCKETINTERNAL

  nsUDPSocketInternal();

private:
  ~nsUDPSocketInternal();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsUDPSocketInternal, nsIUDPSocketInternal)

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

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

/* void callListenerOpened (); */
NS_IMETHODIMP nsUDPSocketInternal::CallListenerOpened()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void callListenerClosed (); */
NS_IMETHODIMP nsUDPSocketInternal::CallListenerClosed()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void callListenerReceivedData (in AUTF8String host, in unsigned short port, [array, size_is (dataLength), const] in uint8_t data, in unsigned long dataLength); */
NS_IMETHODIMP nsUDPSocketInternal::CallListenerReceivedData(const nsACString & host, uint16_t port, const uint8_t *data, uint32_t dataLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void callListenerError (in AUTF8String message, in AUTF8String filename, in uint32_t lineNumber); */
NS_IMETHODIMP nsUDPSocketInternal::CallListenerError(const nsACString & message, const nsACString & filename, uint32_t lineNumber)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIUDPSocketChild_h__ */
