Zhi Huang | e818b6e | 2018-02-22 23:26:27 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef PC_TRANSPORTSTATS_H_ |
| 12 | #define PC_TRANSPORTSTATS_H_ |
| 13 | |
| 14 | #include <string> |
| 15 | #include <vector> |
| 16 | |
| 17 | #include "p2p/base/dtlstransport.h" |
| 18 | #include "p2p/base/port.h" |
| 19 | |
| 20 | namespace cricket { |
| 21 | |
| 22 | struct TransportChannelStats { |
| 23 | TransportChannelStats(); |
| 24 | TransportChannelStats(const TransportChannelStats&); |
| 25 | ~TransportChannelStats(); |
| 26 | |
| 27 | int component = 0; |
| 28 | CandidateStatsList candidate_stats_list; |
| 29 | ConnectionInfos connection_infos; |
| 30 | int srtp_crypto_suite = rtc::SRTP_INVALID_CRYPTO_SUITE; |
| 31 | int ssl_cipher_suite = rtc::TLS_NULL_WITH_NULL_NULL; |
| 32 | DtlsTransportState dtls_state = DTLS_TRANSPORT_NEW; |
| 33 | }; |
| 34 | |
| 35 | // Information about all the channels of a transport. |
| 36 | // TODO(hta): Consider if a simple vector is as good as a map. |
| 37 | typedef std::vector<TransportChannelStats> TransportChannelStatsList; |
| 38 | |
| 39 | // Information about the stats of a transport. |
| 40 | struct TransportStats { |
| 41 | TransportStats(); |
| 42 | ~TransportStats(); |
| 43 | |
| 44 | std::string transport_name; |
| 45 | TransportChannelStatsList channel_stats; |
| 46 | }; |
| 47 | |
| 48 | } // namespace cricket |
| 49 | |
| 50 | #endif // PC_TRANSPORTSTATS_H_ |