Browse code

avio: Add an URLProtocol flag for indicating that a protocol uses network

This definition is in two files, since the definitions will move
to the private header at the next bump.

Signed-off-by: Martin Storsjö <martin@martin.st>

Martin Storsjö authored on 2011/12/30 18:38:05
Showing 12 changed files
... ...
@@ -146,6 +146,7 @@ typedef struct URLContext {
146 146
 } URLContext;
147 147
 
148 148
 #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
149
+#define URL_PROTOCOL_FLAG_NETWORK       2 /*< The protocol uses network */
149 150
 
150 151
 /**
151 152
  * @deprecated This struct is to be made private. Use the higher-level
... ...
@@ -121,4 +121,5 @@ URLProtocol ff_gopher_protocol = {
121 121
     .url_write      = gopher_write,
122 122
     .url_close      = gopher_close,
123 123
     .priv_data_size = sizeof(GopherContext),
124
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
124 125
 };
... ...
@@ -565,6 +565,7 @@ URLProtocol ff_http_protocol = {
565 565
     .url_get_file_handle = http_get_file_handle,
566 566
     .priv_data_size      = sizeof(HTTPContext),
567 567
     .priv_data_class     = &http_context_class,
568
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
568 569
 };
569 570
 #endif
570 571
 #if CONFIG_HTTPS_PROTOCOL
... ...
@@ -578,6 +579,7 @@ URLProtocol ff_https_protocol = {
578 578
     .url_get_file_handle = http_get_file_handle,
579 579
     .priv_data_size      = sizeof(HTTPContext),
580 580
     .priv_data_class     = &https_context_class,
581
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
581 582
 };
582 583
 #endif
583 584
 
... ...
@@ -693,5 +695,6 @@ URLProtocol ff_httpproxy_protocol = {
693 693
     .url_close           = http_proxy_close,
694 694
     .url_get_file_handle = http_get_file_handle,
695 695
     .priv_data_size      = sizeof(HTTPContext),
696
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
696 697
 };
697 698
 #endif
... ...
@@ -162,6 +162,7 @@ URLProtocol ff_rtmp_protocol = {
162 162
     .url_read_seek       = rtmp_read_seek,
163 163
     .url_get_file_handle = rtmp_get_file_handle,
164 164
     .priv_data_size      = sizeof(RTMP),
165
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
165 166
 };
166 167
 
167 168
 URLProtocol ff_rtmpt_protocol = {
... ...
@@ -174,6 +175,7 @@ URLProtocol ff_rtmpt_protocol = {
174 174
     .url_read_seek       = rtmp_read_seek,
175 175
     .url_get_file_handle = rtmp_get_file_handle,
176 176
     .priv_data_size      = sizeof(RTMP),
177
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
177 178
 };
178 179
 
179 180
 URLProtocol ff_rtmpe_protocol = {
... ...
@@ -186,6 +188,7 @@ URLProtocol ff_rtmpe_protocol = {
186 186
     .url_read_seek       = rtmp_read_seek,
187 187
     .url_get_file_handle = rtmp_get_file_handle,
188 188
     .priv_data_size      = sizeof(RTMP),
189
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
189 190
 };
190 191
 
191 192
 URLProtocol ff_rtmpte_protocol = {
... ...
@@ -198,6 +201,7 @@ URLProtocol ff_rtmpte_protocol = {
198 198
     .url_read_seek       = rtmp_read_seek,
199 199
     .url_get_file_handle = rtmp_get_file_handle,
200 200
     .priv_data_size      = sizeof(RTMP),
201
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
201 202
 };
202 203
 
203 204
 URLProtocol ff_rtmps_protocol = {
... ...
@@ -210,4 +214,5 @@ URLProtocol ff_rtmps_protocol = {
210 210
     .url_read_seek       = rtmp_read_seek,
211 211
     .url_get_file_handle = rtmp_get_file_handle,
212 212
     .priv_data_size      = sizeof(RTMP),
213
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
213 214
 };
... ...
@@ -364,4 +364,5 @@ URLProtocol ff_mmsh_protocol = {
364 364
     .url_read       = mmsh_read,
365 365
     .url_close      = mmsh_close,
366 366
     .priv_data_size = sizeof(MMSHContext),
367
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
367 368
 };
... ...
@@ -625,4 +625,5 @@ URLProtocol ff_mmst_protocol = {
625 625
     .url_read       = mms_read,
626 626
     .url_close      = mms_close,
627 627
     .priv_data_size = sizeof(MMSTContext),
628
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
628 629
 };
... ...
@@ -1000,4 +1000,5 @@ URLProtocol ff_rtmp_protocol = {
1000 1000
     .url_write      = rtmp_write,
1001 1001
     .url_close      = rtmp_close,
1002 1002
     .priv_data_size = sizeof(RTMPContext),
1003
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
1003 1004
 };
... ...
@@ -330,4 +330,5 @@ URLProtocol ff_rtp_protocol = {
330 330
     .url_close           = rtp_close,
331 331
     .url_get_file_handle = rtp_get_file_handle,
332 332
     .priv_data_size      = sizeof(RTPContext),
333
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
333 334
 };
... ...
@@ -204,4 +204,5 @@ URLProtocol ff_tcp_protocol = {
204 204
     .url_close           = tcp_close,
205 205
     .url_get_file_handle = tcp_get_file_handle,
206 206
     .priv_data_size      = sizeof(TCPContext),
207
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
207 208
 };
... ...
@@ -248,4 +248,5 @@ URLProtocol ff_tls_protocol = {
248 248
     .url_write      = tls_write,
249 249
     .url_close      = tls_close,
250 250
     .priv_data_size = sizeof(TLSContext),
251
+    .flags          = URL_PROTOCOL_FLAG_NETWORK,
251 252
 };
... ...
@@ -491,4 +491,5 @@ URLProtocol ff_udp_protocol = {
491 491
     .url_close           = udp_close,
492 492
     .url_get_file_handle = udp_get_file_handle,
493 493
     .priv_data_size      = sizeof(UDPContext),
494
+    .flags               = URL_PROTOCOL_FLAG_NETWORK,
494 495
 };
... ...
@@ -33,6 +33,7 @@
33 33
 
34 34
 #if !FF_API_OLD_AVIO
35 35
 #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */
36
+#define URL_PROTOCOL_FLAG_NETWORK       2 /*< The protocol uses network */
36 37
 
37 38
 extern int (*url_interrupt_cb)(void);
38 39