1 /*
2  * This file is part of Wireless Display Software for Linux OS
3  *
4  * Copyright (C) 2014 Intel Corporation.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 
23 #ifndef LIBWDS_RTSP_CONSTANTS_H_
24 #define LIBWDS_RTSP_CONSTANTS_H_
25 
26 namespace wds {
27 namespace rtsp {
28 
29 const char SEMICOLON[] = ":";
30 const char SPACE[] = " ";
31 const char NONE[] = "none";
32 const char CRLF[] = "\r\n";
33 const char RTSP_END[] = "RTSP/1.0";
34 
35 enum PropertyType {
36   AVFormatChangeTimingPropertyType,
37   AudioCodecsPropertyType,
38   ClientRTPPortsPropertyType,
39   ConnectorTypePropertyType,
40   ContentProtectionPropertyType,
41   CoupledSinkPropertyType,
42   DisplayEdidPropertyType,
43   GenericPropertyType,
44   I2CPropertyType,
45   IDRRequestPropertyType,
46   PreferredDisplayModePropertyType,
47   PresentationURLPropertyType,
48   RoutePropertyType,
49   StandbyPropertyType,
50   StandbyResumeCapabilityPropertyType,
51   TriggerMethodPropertyType,
52   UIBCCapabilityPropertyType,
53   UIBCSettingPropertyType,
54   Video3DFormatsPropertyType,
55   VideoFormatsPropertyType
56 };
57 
58 namespace PropertyName {
59   const char wfd_audio_codecs[] = "wfd_audio_codecs";
60   const char wfd_video_formats[] = "wfd_video_formats";
61   const char wfd_3d_video_formats[] = "wfd_3d_video_formats";
62   const char wfd_content_protection[] = "wfd_content_protection";
63   const char wfd_display_edid[] = "wfd_display_edid";
64   const char wfd_coupled_sink[] = "wfd_coupled_sink";
65   const char wfd_trigger_method[] = "wfd_trigger_method";
66   const char wfd_presentation_url[] = "wfd_presentation_URL";
67   const char wfd_client_rtp_ports[] = "wfd_client_rtp_ports";
68   const char wfd_route[] = "wfd_route";
69   const char wfd_I2C[] = "wfd_I2C";
70   const char wfd_av_format_change_timing[] = "wfd_av_format_change_timing";
71   const char wfd_preferred_display_mode[] = "wfd_preferred_display_mode";
72   const char wfd_uibc_capability[] = "wfd_uibc_capability";
73   const char wfd_uibc_setting[] = "wfd_uibc_setting";
74   const char wfd_standby_resume_capability[] = "wfd_standby_resume_capability";
75   const char wfd_standby[] = "wfd_standby";
76   const char wfd_connector_type[] = "wfd_connector_type";
77   const char wfd_idr_request[] = "wfd_idr_request";
78 }  // namespace PropertyName
79 
80 enum Method {
81   OPTIONS,
82   SET_PARAMETER,
83   GET_PARAMETER,
84   SETUP,
85   PLAY,
86   TEARDOWN,
87   PAUSE,
88   ORG_WFA_WFD_1_0
89 };
90 
91 namespace MethodName {
92   const char OPTIONS[] = "OPTIONS";
93   const char SET_PARAMETER[] = "SET_PARAMETER";
94   const char GET_PARAMETER[] = "GET_PARAMETER";
95   const char SETUP[] = "SETUP";
96   const char PLAY[] = "PLAY";
97   const char TEARDOWN[] = "TEARDOWN";
98   const char PAUSE[] = "PAUSE";
99   const char ORG_WFA_WFD1_0[] = "org.wfa.wfd1.0";
100 
101   const char* const name[] = { OPTIONS,
102                               SET_PARAMETER,
103                               GET_PARAMETER,
104                               SETUP,
105                               PLAY,
106                               TEARDOWN,
107                               PAUSE,
108                               ORG_WFA_WFD1_0 };
109 }
110 
111 enum RTSPStatusCode {
112   STATUS_OK = 200,
113   STATUS_SeeOther = 303,
114   STATUS_NotAcceptable = 406,
115   STATUS_UnsupportedMediaType = 415,
116   STATUS_NotImplemented = 501
117 };
118 
119 } // namespace rtsp
120 } // namespace wds
121 
122 #endif // LIBWDS_RTSP_CONSTANTS_H_
123