annotate src/mms/mms.c @ 2057:cf4fa45ffd80

playlist API vtabling
author William Pitcock <nenolod@atheme.org>
date Sat, 13 Oct 2007 23:09:40 -0500
parents fa9f85cebade
children 3134a0987162
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
1 /* Audacious
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
2 * Copyright (c) 2007 William Pitcock
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
3 *
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
7 * (at your option) any later version.
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
8 *
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
13 *
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
17 */
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
18
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
19 #include <glib.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
20
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
21 #include <audacious/plugin.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
22 #include <stdio.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
23
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
24 #include <unistd.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
25 #include <sys/stat.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
26 #include <sys/types.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
27
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
28 #include <string.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
29 #include <errno.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
30
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
31 #include <libmms/mms.h>
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
32
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
33 /*
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
34 * TODO:
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
35 * - mmsh:// support
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
36 */
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
37
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
38 typedef struct {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
39 mms_t *mms;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
40 GSList *charstack;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
41 } MMSHandle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
42
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
43 VFSFile *
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
44 mms_aud_vfs_fopen_impl(const gchar * path,
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
45 const gchar * mode)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
46 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
47 VFSFile *file;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
48 MMSHandle *handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
49
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
50 if (!path || !mode)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
51 return NULL;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
52
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
53 file = g_new(VFSFile, 1);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
54 handle = g_new0(MMSHandle, 1);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
55
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
56 file->handle = handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
57
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
58 if (file->handle == NULL) {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
59 g_free(file);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
60 file = NULL;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
61 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
62
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
63 handle->mms = mms_connect(NULL, NULL, path, 128 * 1024);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
64
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
65 if (handle->mms == NULL) {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
66 g_free(handle);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
67 g_free(file);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
68 file = NULL;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
69 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
70
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
71 return file;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
72 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
73
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
74 gint
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
75 mms_aud_vfs_fclose_impl(VFSFile * file)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
76 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
77 gint ret = 0;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
78
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
79 if (file == NULL)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
80 return -1;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
81
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
82 if (file->handle)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
83 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
84 MMSHandle *handle = (MMSHandle *) file->handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
85
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
86 mms_close(handle->mms);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
87 g_free(handle);
1228
01efa0e5b554 file->handle should be cleared on close, otherwise it can lead to double free.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 1190
diff changeset
88 file->handle = NULL;
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
89 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
90
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
91 return ret;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
92 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
93
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
94 size_t
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
95 mms_aud_vfs_fread_impl(gpointer ptr,
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
96 size_t size,
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
97 size_t nmemb,
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
98 VFSFile * file)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
99 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
100 MMSHandle *handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
101 gint ret;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
102
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
103 if (file == NULL)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
104 return 0;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
105
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
106 handle = (MMSHandle *) file->handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
107
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
108 ret = mms_read(NULL, handle->mms, ptr, size * nmemb);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
109
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
110 if (ret < 0)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
111 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
112 g_message("** mms **: errno(%d): %s", errno, strerror(errno));
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
113 ret = EOF;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
114 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
115
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
116 return ret;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
117 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
118
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
119 size_t
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
120 mms_aud_vfs_fwrite_impl(gconstpointer ptr,
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
121 size_t size,
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
122 size_t nmemb,
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
123 VFSFile * file)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
124 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
125 return -1;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
126 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
127
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
128 gint
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
129 mms_aud_vfs_getc_impl(VFSFile *stream)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
130 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
131 MMSHandle *handle = (MMSHandle *) stream->handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
132 guchar c;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
133
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
134 if (handle->charstack != NULL)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
135 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
136 c = GPOINTER_TO_UINT(handle->charstack->data);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
137 handle->charstack = g_slist_remove_link(handle->charstack, handle->charstack);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
138 return c;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
139 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
140 else
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
141 {
1190
ed2d7787779e more warning elimination.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 1148
diff changeset
142 mms_read(NULL, handle->mms, (char *)&c, 1);
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
143 return c;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
144 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
145
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
146 return EOF;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
147 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
148
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
149 gint
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
150 mms_aud_vfs_ungetc_impl(gint c, VFSFile *stream)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
151 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
152 MMSHandle *handle = (MMSHandle *) stream->handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
153
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
154 handle->charstack = g_slist_append(handle->charstack, GUINT_TO_POINTER(c));
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
155
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
156 if (handle->charstack != NULL)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
157 return c;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
158
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
159 return EOF;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
160 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
161
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
162 gint
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
163 mms_aud_vfs_fseek_impl(VFSFile * file,
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
164 glong offset,
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
165 gint whence)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
166 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
167 return -1;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
168 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
169
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
170 void
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
171 mms_aud_vfs_rewind_impl(VFSFile * file)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
172 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
173 return;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
174 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
175
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
176 glong
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
177 mms_aud_vfs_ftell_impl(VFSFile * file)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
178 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
179 MMSHandle *handle = (MMSHandle *) file->handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
180
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
181 return mms_get_current_pos(handle->mms);
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
182 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
183
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
184 gboolean
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
185 mms_aud_vfs_feof_impl(VFSFile * file)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
186 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
187 MMSHandle *handle = (MMSHandle *) file->handle;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
188
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
189 return (gboolean) (mms_get_current_pos(handle->mms) ==
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
190 mms_get_length(handle->mms));
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
191 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
192
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
193 gint
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
194 mms_aud_vfs_truncate_impl(VFSFile * file, glong size)
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
195 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
196 return -1;
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
197 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
198
965
ertzing
parents: 503
diff changeset
199 off_t
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
200 mms_aud_vfs_fsize_impl(VFSFile * file)
965
ertzing
parents: 503
diff changeset
201 {
ertzing
parents: 503
diff changeset
202 return -1;
ertzing
parents: 503
diff changeset
203 }
ertzing
parents: 503
diff changeset
204
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
205 VFSConstructor mms_const = {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
206 "mms://",
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
207 mms_aud_vfs_fopen_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
208 mms_aud_vfs_fclose_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
209 mms_aud_vfs_fread_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
210 mms_aud_vfs_fwrite_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
211 mms_aud_vfs_getc_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
212 mms_aud_vfs_ungetc_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
213 mms_aud_vfs_fseek_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
214 mms_aud_vfs_rewind_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
215 mms_aud_vfs_ftell_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
216 mms_aud_vfs_feof_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
217 mms_aud_vfs_truncate_impl,
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
218 mms_aud_vfs_fsize_impl
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
219 };
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
220
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
221 static void init(void)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
222 {
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
223 aud_vfs_register_transport(&mms_const);
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
224 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
225
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
226 static void cleanup(void)
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
227 {
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
228 #if 0
1978
fa9f85cebade s/vfs_/aud_vfs_/g
William Pitcock <nenolod@atheme.org>
parents: 1961
diff changeset
229 aud_vfs_unregister_transport(&mms_const);
503
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
230 #endif
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
231 }
fe2c60ca8c98 [svn] - mms transport
nenolod
parents:
diff changeset
232
1395
761e17b23e0c added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 1228
diff changeset
233 DECLARE_PLUGIN(mms, init, cleanup, NULL, NULL, NULL, NULL, NULL, NULL);