/src/mozilla-central/media/mtransport/nricestunaddr.h
Line | Count | Source (jump to first uncovered line) |
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 | | |
5 | | #ifndef nricestunaddr_h__ |
6 | | #define nricestunaddr_h__ |
7 | | |
8 | | #include "nsError.h" // for nsresult |
9 | | |
10 | | typedef struct nr_local_addr_ nr_local_addr; |
11 | | |
12 | | namespace mozilla { |
13 | | |
14 | | class NrIceStunAddr { |
15 | | public: |
16 | | NrIceStunAddr(); // needed for IPC deserialization |
17 | | explicit NrIceStunAddr(const nr_local_addr* addr); |
18 | | NrIceStunAddr(const NrIceStunAddr& rhs); |
19 | | |
20 | | ~NrIceStunAddr(); |
21 | | |
22 | 0 | const nr_local_addr& localAddr() const { return *localAddr_; } |
23 | | |
24 | | // serialization/deserialization helper functions for use |
25 | | // in media/mtransport/ipc/NrIceStunAddrMessagUtils.h |
26 | | size_t SerializationBufferSize() const; |
27 | | nsresult Serialize(char* buffer, size_t buffer_size) const; |
28 | | nsresult Deserialize(const char* buffer, size_t buffer_size); |
29 | | |
30 | | private: |
31 | | nr_local_addr* localAddr_; |
32 | | |
33 | | }; |
34 | | |
35 | | } // namespace mozilla |
36 | | |
37 | | #endif // nricestunaddr_h__ |