blob: b84f99461d3475c08485f861564b0d0f64618552
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: rm_io_default.c,v 1.1.1.1.2.1 2005/05/04 18:21:24 hubbe Exp $ |
3 | * |
4 | * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM |
5 | * Portions Copyright (c) 1995-2005 RealNetworks, Inc. |
6 | * All Rights Reserved. |
7 | * |
8 | * The contents of this file, and the files included with this file, |
9 | * are subject to the current version of the Real Format Source Code |
10 | * Porting and Optimization License, available at |
11 | * https://helixcommunity.org/2005/license/realformatsource (unless |
12 | * RealNetworks otherwise expressly agrees in writing that you are |
13 | * subject to a different license). You may also obtain the license |
14 | * terms directly from RealNetworks. You may not use this file except |
15 | * in compliance with the Real Format Source Code Porting and |
16 | * Optimization License. There are no redistribution rights for the |
17 | * source code of this file. Please see the Real Format Source Code |
18 | * Porting and Optimization License for the rights, obligations and |
19 | * limitations governing use of the contents of the file. |
20 | * |
21 | * RealNetworks is the developer of the Original Code and owns the |
22 | * copyrights in the portions it created. |
23 | * |
24 | * This file, and the files included with this file, is distributed and |
25 | * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, |
26 | * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL |
27 | * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT |
29 | * OR NON-INFRINGEMENT. |
30 | * |
31 | * Technology Compatibility Kit Test Suite(s) Location: |
32 | * https://rarvcode-tck.helixcommunity.org |
33 | * |
34 | * Contributor(s): |
35 | * |
36 | * ***** END LICENSE BLOCK ***** */ |
37 | |
38 | //#include "includes.h" |
39 | //#include "avtimer.h" |
40 | //#include "aw_windows.h" |
41 | //#include "datasrc.h" |
42 | |
43 | #include "helix_types.h" |
44 | #include "rm_io_default.h" |
45 | #include "rm_parse.h" |
46 | |
47 | UINT32 rm_io_default_read(void* pUserRead, BYTE* pBuf, UINT32 ulBytesToRead) |
48 | { |
49 | UINT32 ulRet = 0; |
50 | #if 0 |
51 | if (pBuf && ulBytesToRead) { |
52 | /* For default, the void* is a FILE* */ |
53 | INT32 fp = (INT32) pUserRead; |
54 | /* Read the number of bytes requested */ |
55 | ulRet = (UINT32) read(fp, pBuf, ulBytesToRead); |
56 | } |
57 | #endif |
58 | return ulRet; |
59 | } |
60 | |
61 | void rm_io_default_seek(void* pUserRead, UINT32 ulOffset, UINT32 ulOrigin) |
62 | { |
63 | #if 0 |
64 | { |
65 | /* For default, the void* is a FILE* */ |
66 | INT32 fp = (INT32) pUserRead; |
67 | /* Do the seek */ |
68 | lseek(fp, ulOffset, ulOrigin); |
69 | } |
70 | #endif |
71 | } |
72 | |
73 | UINT32 rm_io_datasrc_read(void* pUserRead, BYTE* pBuf, UINT32 ulBytesToRead) |
74 | { |
75 | UINT32 ulRet = 0; |
76 | #if 0 |
77 | DataSrc_t *ds = (DataSrc_t*)pUserRead; |
78 | |
79 | if (ds && pBuf && ulBytesToRead) { |
80 | ulRet = DataSrcRead(ds, pBuf, ulBytesToRead); |
81 | } |
82 | #endif |
83 | return ulRet; |
84 | } |
85 | |
86 | void rm_io_datasrc_seek(void* pUserRead, UINT32 ulOffset, UINT32 ulOrigin) |
87 | { |
88 | #if 0 |
89 | DataSrc_t *ds = (DataSrc_t*)pUserRead; |
90 | |
91 | if (ds) { |
92 | if (ulOrigin == HX_SEEK_ORIGIN_CUR) { |
93 | DataSrcSeek(ds, ulOffset, SEEK_CUR); |
94 | } else if (ulOrigin == HX_SEEK_ORIGIN_SET) { |
95 | DataSrcSeek(ds, ulOffset, SEEK_SET); |
96 | } else if (ulOrigin == HX_SEEK_ORIGIN_END) { |
97 | DataSrcSeek(ds, ulOffset, SEEK_END); |
98 | } |
99 | } |
100 | #endif |
101 | } |
102 |