OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/p2p/base/constants.h" | 11 #include "webrtc/p2p/base/constants.h" |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 namespace cricket { | 15 namespace cricket { |
16 | 16 |
17 const char CN_AUDIO[] = "audio"; | 17 const char CN_AUDIO[] = "audio"; |
18 const char CN_VIDEO[] = "video"; | 18 const char CN_VIDEO[] = "video"; |
19 const char CN_DATA[] = "data"; | 19 const char CN_DATA[] = "data"; |
20 const char CN_OTHER[] = "main"; | 20 const char CN_OTHER[] = "main"; |
21 | 21 |
22 const char GROUP_TYPE_BUNDLE[] = "BUNDLE"; | 22 const char GROUP_TYPE_BUNDLE[] = "BUNDLE"; |
23 | 23 |
| 24 const char NS_JINGLE_ICE_UDP[] = "urn:xmpp:jingle:transports:ice-udp:1"; |
| 25 const char NS_GINGLE_P2P[] = "http://www.google.com/transport/p2p"; |
| 26 const char NS_GINGLE_RAW[] = "http://www.google.com/transport/raw-udp"; |
| 27 |
| 28 const char ICE_OPTION_GICE[] = "google-ice"; |
| 29 |
24 // Minimum ufrag length is 4 characters as per RFC5245. We chose 16 because | 30 // Minimum ufrag length is 4 characters as per RFC5245. We chose 16 because |
25 // some internal systems expect username to be 16 bytes. | 31 // some internal systems expect username to be 16 bytes. |
26 const int ICE_UFRAG_LENGTH = 16; | 32 const int ICE_UFRAG_LENGTH = 16; |
27 // Minimum password length of 22 characters as per RFC5245. We chose 24 because | 33 // Minimum password length of 22 characters as per RFC5245. We chose 24 because |
28 // some internal systems expect password to be multiple of 4. | 34 // some internal systems expect password to be multiple of 4. |
29 const int ICE_PWD_LENGTH = 24; | 35 const int ICE_PWD_LENGTH = 24; |
30 const size_t ICE_UFRAG_MIN_LENGTH = 4; | 36 const size_t ICE_UFRAG_MIN_LENGTH = 4; |
31 const size_t ICE_PWD_MIN_LENGTH = 22; | 37 const size_t ICE_PWD_MIN_LENGTH = 22; |
32 const size_t ICE_UFRAG_MAX_LENGTH = 255; | 38 const size_t ICE_UFRAG_MAX_LENGTH = 255; |
33 const size_t ICE_PWD_MAX_LENGTH = 256; | 39 const size_t ICE_PWD_MAX_LENGTH = 256; |
| 40 const size_t GICE_UFRAG_MAX_LENGTH = 16; |
34 | 41 |
35 // TODO: This is media-specific, so might belong | 42 // TODO: This is media-specific, so might belong |
36 // somewhere like media/base/constants.h | 43 // somewhere like media/base/constants.h |
37 const int ICE_CANDIDATE_COMPONENT_RTP = 1; | 44 const int ICE_CANDIDATE_COMPONENT_RTP = 1; |
38 const int ICE_CANDIDATE_COMPONENT_RTCP = 2; | 45 const int ICE_CANDIDATE_COMPONENT_RTCP = 2; |
39 const int ICE_CANDIDATE_COMPONENT_DEFAULT = 1; | 46 const int ICE_CANDIDATE_COMPONENT_DEFAULT = 1; |
40 | 47 |
41 const char NS_JINGLE_RTP[] = "urn:xmpp:jingle:apps:rtp:1"; | 48 const char NS_JINGLE_RTP[] = "urn:xmpp:jingle:apps:rtp:1"; |
42 const char NS_JINGLE_DRAFT_SCTP[] = "google:jingle:sctp"; | 49 const char NS_JINGLE_DRAFT_SCTP[] = "google:jingle:sctp"; |
43 | 50 |
| 51 const char GICE_CHANNEL_NAME_RTP[] = "rtp"; |
| 52 const char GICE_CHANNEL_NAME_RTCP[] = "rtcp"; |
| 53 const char GICE_CHANNEL_NAME_VIDEO_RTP[] = "video_rtp"; |
| 54 const char GICE_CHANNEL_NAME_VIDEO_RTCP[] = "video_rtcp"; |
| 55 const char GICE_CHANNEL_NAME_DATA_RTP[] = "data_rtp"; |
| 56 const char GICE_CHANNEL_NAME_DATA_RTCP[] = "data_rtcp"; |
| 57 |
| 58 |
44 // From RFC 4145, SDP setup attribute values. | 59 // From RFC 4145, SDP setup attribute values. |
45 const char CONNECTIONROLE_ACTIVE_STR[] = "active"; | 60 const char CONNECTIONROLE_ACTIVE_STR[] = "active"; |
46 const char CONNECTIONROLE_PASSIVE_STR[] = "passive"; | 61 const char CONNECTIONROLE_PASSIVE_STR[] = "passive"; |
47 const char CONNECTIONROLE_ACTPASS_STR[] = "actpass"; | 62 const char CONNECTIONROLE_ACTPASS_STR[] = "actpass"; |
48 const char CONNECTIONROLE_HOLDCONN_STR[] = "holdconn"; | 63 const char CONNECTIONROLE_HOLDCONN_STR[] = "holdconn"; |
49 | 64 |
50 } // namespace cricket | 65 } // namespace cricket |
OLD | NEW |