blob: 33e1d6460ae906b356897c4edb8ac6b9e904ec3a [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
11#ifndef P2P_BASE_ICECREDENTIALSITERATOR_H_
12#define P2P_BASE_ICECREDENTIALSITERATOR_H_
13
14#include <vector>
15
16#include "p2p/base/transportdescription.h"
17
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
37#endif // P2P_BASE_ICECREDENTIALSITERATOR_H_