LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include - nsISocketFilter.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsISocketFilter.idl
       3             :  */
       4             : 
       5             : #ifndef __gen_nsISocketFilter_h__
       6             : #define __gen_nsISocketFilter_h__
       7             : 
       8             : 
       9             : #ifndef __gen_nsISupports_h__
      10             : #include "nsISupports.h"
      11             : #endif
      12             : 
      13             : #ifndef __gen_nsINetAddr_h__
      14             : #include "nsINetAddr.h"
      15             : #endif
      16             : 
      17             : /* For IDL files that don't want to include root IDL files. */
      18             : #ifndef NS_NO_VTABLE
      19             : #define NS_NO_VTABLE
      20             : #endif
      21             : 
      22             : /* starting interface:    nsISocketFilter */
      23             : #define NS_ISOCKETFILTER_IID_STR "afe2c40c-b9b9-4207-b898-e5cde18c6139"
      24             : 
      25             : #define NS_ISOCKETFILTER_IID \
      26             :   {0xafe2c40c, 0xb9b9, 0x4207, \
      27             :     { 0xb8, 0x98, 0xe5, 0xcd, 0xe1, 0x8c, 0x61, 0x39 }}
      28             : 
      29           0 : class NS_NO_VTABLE nsISocketFilter : public nsISupports {
      30             :  public:
      31             : 
      32             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISOCKETFILTER_IID)
      33             : 
      34             :   enum {
      35             :     SF_INCOMING = 0,
      36             :     SF_OUTGOING = 1
      37             :   };
      38             : 
      39             :   /* bool filterPacket ([const] in NetAddrPtr remote_addr, [array, size_is (len), const] in uint8_t data, in unsigned long len, in long direction); */
      40             :   NS_IMETHOD FilterPacket(const mozilla::net::NetAddr *remote_addr, const uint8_t *data, uint32_t len, int32_t direction, bool *_retval) = 0;
      41             : 
      42             : };
      43             : 
      44             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsISocketFilter, NS_ISOCKETFILTER_IID)
      45             : 
      46             : /* Use this macro when declaring classes that implement this interface. */
      47             : #define NS_DECL_NSISOCKETFILTER \
      48             :   NS_IMETHOD FilterPacket(const mozilla::net::NetAddr *remote_addr, const uint8_t *data, uint32_t len, int32_t direction, bool *_retval) override; 
      49             : 
      50             : /* Use this macro when declaring the members of this interface when the
      51             :    class doesn't implement the interface. This is useful for forwarding. */
      52             : #define NS_DECL_NON_VIRTUAL_NSISOCKETFILTER \
      53             :   nsresult FilterPacket(const mozilla::net::NetAddr *remote_addr, const uint8_t *data, uint32_t len, int32_t direction, bool *_retval); 
      54             : 
      55             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      56             : #define NS_FORWARD_NSISOCKETFILTER(_to) \
      57             :   NS_IMETHOD FilterPacket(const mozilla::net::NetAddr *remote_addr, const uint8_t *data, uint32_t len, int32_t direction, bool *_retval) override { return _to FilterPacket(remote_addr, data, len, direction, _retval); } 
      58             : 
      59             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      60             : #define NS_FORWARD_SAFE_NSISOCKETFILTER(_to) \
      61             :   NS_IMETHOD FilterPacket(const mozilla::net::NetAddr *remote_addr, const uint8_t *data, uint32_t len, int32_t direction, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FilterPacket(remote_addr, data, len, direction, _retval); } 
      62             : 
      63             : #if 0
      64             : /* Use the code below as a template for the implementation class for this interface. */
      65             : 
      66             : /* Header file */
      67             : class nsSocketFilter : public nsISocketFilter
      68             : {
      69             : public:
      70             :   NS_DECL_ISUPPORTS
      71             :   NS_DECL_NSISOCKETFILTER
      72             : 
      73             :   nsSocketFilter();
      74             : 
      75             : private:
      76             :   ~nsSocketFilter();
      77             : 
      78             : protected:
      79             :   /* additional members */
      80             : };
      81             : 
      82             : /* Implementation file */
      83             : NS_IMPL_ISUPPORTS(nsSocketFilter, nsISocketFilter)
      84             : 
      85             : nsSocketFilter::nsSocketFilter()
      86             : {
      87             :   /* member initializers and constructor code */
      88             : }
      89             : 
      90             : nsSocketFilter::~nsSocketFilter()
      91             : {
      92             :   /* destructor code */
      93             : }
      94             : 
      95             : /* bool filterPacket ([const] in NetAddrPtr remote_addr, [array, size_is (len), const] in uint8_t data, in unsigned long len, in long direction); */
      96             : NS_IMETHODIMP nsSocketFilter::FilterPacket(const mozilla::net::NetAddr *remote_addr, const uint8_t *data, uint32_t len, int32_t direction, bool *_retval)
      97             : {
      98             :     return NS_ERROR_NOT_IMPLEMENTED;
      99             : }
     100             : 
     101             : /* End of implementation class template. */
     102             : #endif
     103             : 
     104             : 
     105             : /* starting interface:    nsISocketFilterHandler */
     106             : #define NS_ISOCKETFILTERHANDLER_IID_STR "81ee76c6-4753-4125-9c8c-290ed9ba62fb"
     107             : 
     108             : #define NS_ISOCKETFILTERHANDLER_IID \
     109             :   {0x81ee76c6, 0x4753, 0x4125, \
     110             :     { 0x9c, 0x8c, 0x29, 0x0e, 0xd9, 0xba, 0x62, 0xfb }}
     111             : 
     112           0 : class NS_NO_VTABLE nsISocketFilterHandler : public nsISupports {
     113             :  public:
     114             : 
     115             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISOCKETFILTERHANDLER_IID)
     116             : 
     117             :   /* nsISocketFilter newFilter (); */
     118             :   NS_IMETHOD NewFilter(nsISocketFilter * *_retval) = 0;
     119             : 
     120             : };
     121             : 
     122             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsISocketFilterHandler, NS_ISOCKETFILTERHANDLER_IID)
     123             : 
     124             : /* Use this macro when declaring classes that implement this interface. */
     125             : #define NS_DECL_NSISOCKETFILTERHANDLER \
     126             :   NS_IMETHOD NewFilter(nsISocketFilter * *_retval) override; 
     127             : 
     128             : /* Use this macro when declaring the members of this interface when the
     129             :    class doesn't implement the interface. This is useful for forwarding. */
     130             : #define NS_DECL_NON_VIRTUAL_NSISOCKETFILTERHANDLER \
     131             :   nsresult NewFilter(nsISocketFilter * *_retval); 
     132             : 
     133             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     134             : #define NS_FORWARD_NSISOCKETFILTERHANDLER(_to) \
     135             :   NS_IMETHOD NewFilter(nsISocketFilter * *_retval) override { return _to NewFilter(_retval); } 
     136             : 
     137             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     138             : #define NS_FORWARD_SAFE_NSISOCKETFILTERHANDLER(_to) \
     139             :   NS_IMETHOD NewFilter(nsISocketFilter * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NewFilter(_retval); } 
     140             : 
     141             : #if 0
     142             : /* Use the code below as a template for the implementation class for this interface. */
     143             : 
     144             : /* Header file */
     145             : class nsSocketFilterHandler : public nsISocketFilterHandler
     146             : {
     147             : public:
     148             :   NS_DECL_ISUPPORTS
     149             :   NS_DECL_NSISOCKETFILTERHANDLER
     150             : 
     151             :   nsSocketFilterHandler();
     152             : 
     153             : private:
     154             :   ~nsSocketFilterHandler();
     155             : 
     156             : protected:
     157             :   /* additional members */
     158             : };
     159             : 
     160             : /* Implementation file */
     161             : NS_IMPL_ISUPPORTS(nsSocketFilterHandler, nsISocketFilterHandler)
     162             : 
     163             : nsSocketFilterHandler::nsSocketFilterHandler()
     164             : {
     165             :   /* member initializers and constructor code */
     166             : }
     167             : 
     168             : nsSocketFilterHandler::~nsSocketFilterHandler()
     169             : {
     170             :   /* destructor code */
     171             : }
     172             : 
     173             : /* nsISocketFilter newFilter (); */
     174             : NS_IMETHODIMP nsSocketFilterHandler::NewFilter(nsISocketFilter * *_retval)
     175             : {
     176             :     return NS_ERROR_NOT_IMPLEMENTED;
     177             : }
     178             : 
     179             : /* End of implementation class template. */
     180             : #endif
     181             : 
     182             : /**
     183             :  * Filter handlers are registered with XPCOM under the following CONTRACTID prefix:
     184             :  */
     185             : #define NS_NETWORK_UDP_SOCKET_FILTER_HANDLER_PREFIX "@mozilla.org/network/udp-filter-handler;1?name="
     186             : #define NS_NETWORK_TCP_SOCKET_FILTER_HANDLER_PREFIX "@mozilla.org/network/tcp-filter-handler;1?name="
     187             : #define NS_NETWORK_SOCKET_FILTER_HANDLER_STUN_SUFFIX "stun"
     188             : #define NS_STUN_UDP_SOCKET_FILTER_HANDLER_CONTRACTID NS_NETWORK_UDP_SOCKET_FILTER_HANDLER_PREFIX NS_NETWORK_SOCKET_FILTER_HANDLER_STUN_SUFFIX
     189             : #define NS_STUN_TCP_SOCKET_FILTER_HANDLER_CONTRACTID NS_NETWORK_TCP_SOCKET_FILTER_HANDLER_PREFIX NS_NETWORK_SOCKET_FILTER_HANDLER_STUN_SUFFIX
     190             : 
     191             : #endif /* __gen_nsISocketFilter_h__ */

Generated by: LCOV version 1.13