DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

nsITCPSocketCallback

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsITCPSocketCallback.idl
 */

#ifndef __gen_nsITCPSocketCallback_h__
#define __gen_nsITCPSocketCallback_h__


#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

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

/* starting interface:    nsITCPSocketCallback */
#define NS_ITCPSOCKETCALLBACK_IID_STR "ac2c4b69-cb79-4767-b1ce-bcf62945cd39"

#define NS_ITCPSOCKETCALLBACK_IID \
  {0xac2c4b69, 0xcb79, 0x4767, \
    { 0xb1, 0xce, 0xbc, 0xf6, 0x29, 0x45, 0xcd, 0x39 }}

class NS_NO_VTABLE nsITCPSocketCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITCPSOCKETCALLBACK_IID)

  enum {
    BUFFER_SIZE = 65536U
  };

  /* void fireErrorEvent (in AString name, in AString type); */
  NS_IMETHOD FireErrorEvent(const nsAString & name, const nsAString & type) = 0;

  /* void fireDataStringEvent (in DOMString type, in ACString data); */
  NS_IMETHOD FireDataStringEvent(const nsAString & type, const nsACString & data) = 0;

  /* void fireDataArrayEvent (in DOMString type, [const] in nsUint8TArrayRef data); */
  NS_IMETHOD FireDataArrayEvent(const nsAString & type, const InfallibleTArray<uint8_t> & data) = 0;

  /* void fireEvent (in DOMString type); */
  NS_IMETHOD FireEvent(const nsAString & type) = 0;

  /* void updateReadyState (in unsigned long readystate); */
  NS_IMETHOD UpdateReadyState(uint32_t readystate) = 0;

  /* void updateBufferedAmount (in uint32_t bufferedAmount, in uint32_t trackingNumber); */
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITCPSocketCallback, NS_ITCPSOCKETCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITCPSOCKETCALLBACK \
  NS_IMETHOD FireErrorEvent(const nsAString & name, const nsAString & type) override; \
  NS_IMETHOD FireDataStringEvent(const nsAString & type, const nsACString & data) override; \
  NS_IMETHOD FireDataArrayEvent(const nsAString & type, const InfallibleTArray<uint8_t> & data) override; \
  NS_IMETHOD FireEvent(const nsAString & type) override; \
  NS_IMETHOD UpdateReadyState(uint32_t readystate) override; \
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSITCPSOCKETCALLBACK \
  nsresult FireErrorEvent(const nsAString & name, const nsAString & type); \
  nsresult FireDataStringEvent(const nsAString & type, const nsACString & data); \
  nsresult FireDataArrayEvent(const nsAString & type, const InfallibleTArray<uint8_t> & data); \
  nsresult FireEvent(const nsAString & type); \
  nsresult UpdateReadyState(uint32_t readystate); \
  nsresult UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITCPSOCKETCALLBACK(_to) \
  NS_IMETHOD FireErrorEvent(const nsAString & name, const nsAString & type) override { return _to FireErrorEvent(name, type); } \
  NS_IMETHOD FireDataStringEvent(const nsAString & type, const nsACString & data) override { return _to FireDataStringEvent(type, data); } \
  NS_IMETHOD FireDataArrayEvent(const nsAString & type, const InfallibleTArray<uint8_t> & data) override { return _to FireDataArrayEvent(type, data); } \
  NS_IMETHOD FireEvent(const nsAString & type) override { return _to FireEvent(type); } \
  NS_IMETHOD UpdateReadyState(uint32_t readystate) override { return _to UpdateReadyState(readystate); } \
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) override { return _to UpdateBufferedAmount(bufferedAmount, trackingNumber); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITCPSOCKETCALLBACK(_to) \
  NS_IMETHOD FireErrorEvent(const nsAString & name, const nsAString & type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FireErrorEvent(name, type); } \
  NS_IMETHOD FireDataStringEvent(const nsAString & type, const nsACString & data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FireDataStringEvent(type, data); } \
  NS_IMETHOD FireDataArrayEvent(const nsAString & type, const InfallibleTArray<uint8_t> & data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FireDataArrayEvent(type, data); } \
  NS_IMETHOD FireEvent(const nsAString & type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FireEvent(type); } \
  NS_IMETHOD UpdateReadyState(uint32_t readystate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateReadyState(readystate); } \
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateBufferedAmount(bufferedAmount, trackingNumber); } 

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

/* Header file */
class nsTCPSocketCallback : public nsITCPSocketCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITCPSOCKETCALLBACK

  nsTCPSocketCallback();

private:
  ~nsTCPSocketCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTCPSocketCallback, nsITCPSocketCallback)

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

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

/* void fireErrorEvent (in AString name, in AString type); */
NS_IMETHODIMP nsTCPSocketCallback::FireErrorEvent(const nsAString & name, const nsAString & type)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void fireDataStringEvent (in DOMString type, in ACString data); */
NS_IMETHODIMP nsTCPSocketCallback::FireDataStringEvent(const nsAString & type, const nsACString & data)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void fireDataArrayEvent (in DOMString type, [const] in nsUint8TArrayRef data); */
NS_IMETHODIMP nsTCPSocketCallback::FireDataArrayEvent(const nsAString & type, const InfallibleTArray<uint8_t> & data)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void fireEvent (in DOMString type); */
NS_IMETHODIMP nsTCPSocketCallback::FireEvent(const nsAString & type)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updateReadyState (in unsigned long readystate); */
NS_IMETHODIMP nsTCPSocketCallback::UpdateReadyState(uint32_t readystate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updateBufferedAmount (in uint32_t bufferedAmount, in uint32_t trackingNumber); */
NS_IMETHODIMP nsTCPSocketCallback::UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsITCPSocketCallback_h__ */