blob: fa331cc6eb610b4fbc37520f26d615a6c1972275 [file] [log] [blame]
Jonas Oreland1cd39fa2018-10-11 07:47:12 +02001/*
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
Steve Anton10542f22019-01-11 09:11:00 -080011#ifndef P2P_BASE_ICE_CREDENTIALS_ITERATOR_H_
12#define P2P_BASE_ICE_CREDENTIALS_ITERATOR_H_
Jonas Oreland1cd39fa2018-10-11 07:47:12 +020013
14#include <vector>
15
Steve Anton10542f22019-01-11 09:11:00 -080016#include "p2p/base/transport_description.h"
Jonas Oreland1cd39fa2018-10-11 07:47:12 +020017
18namespace cricket {
19
20class IceCredentialsIterator {
21 public:
22 explicit IceCredentialsIterator(const std::vector<IceParameters>&);
23 virtual ~IceCredentialsIterator();
24
25 // Get next pooled ice credentials.
26 // Returns a new random credential if the pool is empty.
27 IceParameters GetIceCredentials();
28
29 static IceParameters CreateRandomIceCredentials();
30
31 private:
32 std::vector<IceParameters> pooled_ice_credentials_;
33};
34
35} // namespace cricket
36
Steve Anton10542f22019-01-11 09:11:00 -080037#endif // P2P_BASE_ICE_CREDENTIALS_ITERATOR_H_