1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
4 #ifndef stun_socket_filter_h__
5 #define stun_socket_filter_h__
6 
7 #include "nsISocketFilter.h"
8 
9 #define NS_STUN_UDP_SOCKET_FILTER_HANDLER_CID \
10   {0x3e43ee93,                                \
11    0x829e,                                    \
12    0x4ea6,                                    \
13    {0xa3, 0x4e, 0x62, 0xd9, 0xe4, 0xc9, 0xf9, 0x93}};
14 
15 class nsStunUDPSocketFilterHandler : public nsISocketFilterHandler {
16  public:
17   // Threadsafe because we create off-main-thread, but destroy on MainThread
18   // via FreeFactoryEntries()
19   NS_DECL_THREADSAFE_ISUPPORTS
20   NS_DECL_NSISOCKETFILTERHANDLER
21  private:
22   virtual ~nsStunUDPSocketFilterHandler() = default;
23 };
24 
25 #define NS_STUN_TCP_SOCKET_FILTER_HANDLER_CID \
26   {0x9fea635a,                                \
27    0x2fc2,                                    \
28    0x4d08,                                    \
29    {0x97, 0x21, 0xd2, 0x38, 0xd3, 0xf5, 0x2f, 0x92}};
30 
31 class nsStunTCPSocketFilterHandler : public nsISocketFilterHandler {
32  public:
33   // Threadsafe because we create off-main-thread, but destroy on MainThread
34   // via FreeFactoryEntries()
35   NS_DECL_THREADSAFE_ISUPPORTS
36   NS_DECL_NSISOCKETFILTERHANDLER
37  private:
38   virtual ~nsStunTCPSocketFilterHandler() = default;
39 };
40 
41 #endif  // stun_socket_filter_h__
42