summaryrefslogtreecommitdiffstats
path: root/xbmc/filesystem/IFileTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/filesystem/IFileTypes.h')
-rw-r--r--xbmc/filesystem/IFileTypes.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/xbmc/filesystem/IFileTypes.h b/xbmc/filesystem/IFileTypes.h
new file mode 100644
index 0000000..d2d77eb
--- /dev/null
+++ b/xbmc/filesystem/IFileTypes.h
@@ -0,0 +1,82 @@
1/*
2 * Copyright (C) 2005-2013 Team XBMC
3 * http://xbmc.org
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#pragma once
22
23#include <stdint.h>
24
25namespace XFILE
26{
27
28/* indicate that caller can handle truncated reads, where function returns before entire buffer has been filled */
29 static const unsigned int READ_TRUNCATED = 0x01;
30
31/* indicate that that caller support read in the minimum defined chunk size, this disables internal cache then */
32 static const unsigned int READ_CHUNKED = 0x02;
33
34/* use cache to access this file */
35 static const unsigned int READ_CACHED = 0x04;
36
37/* open without caching. regardless to file type. */
38 static const unsigned int READ_NO_CACHE = 0x08;
39
40/* calcuate bitrate for file while reading */
41 static const unsigned int READ_BITRATE = 0x10;
42
43/* indicate to the caller we will seek between multiple streams in the file frequently */
44 static const unsigned int READ_MULTI_STREAM = 0x20;
45
46/* indicate to the caller file is audio and/or video (and e.g. may grow) */
47 static const unsigned int READ_AUDIO_VIDEO = 0x40;
48
49/* indicate that caller will do write operations before reading */
50 static const unsigned int READ_AFTER_WRITE = 0x80;
51
52struct SNativeIoControl
53{
54 unsigned long int request;
55 void* param;
56};
57
58struct SCacheStatus
59{
60 uint64_t forward; /**< number of bytes cached forward of current position */
61 unsigned maxrate; /**< maximum number of bytes per second cache is allowed to fill */
62 unsigned currate; /**< average read rate from source file since last position change */
63 bool full; /**< is the cache full */
64};
65
66typedef enum {
67 IOCTRL_NATIVE = 1, /**< SNativeIoControl structure, containing what should be passed to native ioctrl */
68 IOCTRL_SEEK_POSSIBLE = 2, /**< return 0 if known not to work, 1 if it should work */
69 IOCTRL_CACHE_STATUS = 3, /**< SCacheStatus structure */
70 IOCTRL_CACHE_SETRATE = 4, /**< unsigned int with speed limit for caching in bytes per second */
71 IOCTRL_SET_CACHE = 8, /** <CFileCache */
72} EIoControl;
73
74enum CURLOPTIONTYPE
75{
76 CURL_OPTION_OPTION, /**< Set a general option */
77 CURL_OPTION_PROTOCOL, /**< Set a protocol option */
78 CURL_OPTION_CREDENTIALS,/**< Set User and password */
79 CURL_OPTION_HEADER /**< Add a Header */
80};
81
82}