Mercurial > audlegacy-plugins
comparison src/daap/daap.c @ 1407:776dd8fc2b38
DAAP plugin (work in progress)
author | Cristi Magherusan <majeru@atheme-project.org> |
---|---|
date | Sun, 05 Aug 2007 00:26:21 +0300 |
parents | |
children | 7b3290336f3b |
comparison
equal
deleted
inserted
replaced
1400:fe0a9cf95642 | 1407:776dd8fc2b38 |
---|---|
1 /* Audacious DAAP transport plugin | |
2 * Copyright (c) 2007 Cristi Magherusan <majeru@gentoo.ro> | |
3 * | |
4 * With inspiration and code from David Hammerton's tunesbrowser | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program 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 | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Softmcware | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 */ | |
20 | |
21 #include <audacious/vfs.h> | |
22 #include <audacious/plugin.h> | |
23 /* | |
24 #include <audacious/configdb.h> | |
25 #include <libmowgli/mowgli.h> | |
26 #include <curl/curl.h> | |
27 */ | |
28 #include <glib.h> | |
29 #include <daap/client.h> | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 DAAP_SClientHost *libopendaap_host; | |
37 | |
38 | |
39 VFSFile * daap_vfs_fopen_impl(const gchar * path, const gchar * mode) | |
40 { | |
41 VFSFile *file; | |
42 file = g_new0(VFSFile, 1); | |
43 /* connectiong daap*/ | |
44 | |
45 | |
46 return file; | |
47 } | |
48 | |
49 gint daap_vfs_fclose_impl(VFSFile * file) | |
50 { | |
51 return 0; | |
52 } | |
53 size_t daap_vfs_fread_impl(gpointer ptr, size_t size, size_t nmemb, VFSFile * file) | |
54 { | |
55 return 0; | |
56 } | |
57 | |
58 size_t daap_vfs_fwrite_impl(gconstpointer ptr, size_t size, size_t nmemb, VFSFile * file) | |
59 { | |
60 return -1; | |
61 } | |
62 | |
63 gint daap_vfs_getc_impl(VFSFile * stream) | |
64 { | |
65 return 0; | |
66 } | |
67 | |
68 gint daap_vfs_ungetc_impl(gint c, VFSFile * stream) | |
69 { | |
70 return 0; | |
71 } | |
72 gint daap_vfs_fseek_impl(VFSFile * file, glong offset, gint whence) | |
73 { | |
74 return -1; | |
75 } | |
76 | |
77 void daap_vfs_rewind_impl(VFSFile * file) | |
78 { | |
79 return; | |
80 } | |
81 | |
82 glong daap_vfs_ftell_impl(VFSFile * file) | |
83 { | |
84 return 0; | |
85 } | |
86 | |
87 gboolean daap_vfs_feof_impl(VFSFile * file) | |
88 { | |
89 return 1; | |
90 } | |
91 | |
92 gint daap_vfs_truncate_impl(VFSFile * file, glong size) | |
93 { | |
94 return -1; | |
95 } | |
96 off_t daap_vfs_fsize_impl(VFSFile * file) | |
97 { | |
98 return 0; | |
99 } | |
100 gchar *daap_vfs_metadata_impl(VFSFile * file, const gchar * field) | |
101 { | |
102 return NULL; | |
103 } | |
104 | |
105 VFSConstructor daap_const = { | |
106 "daap://", | |
107 daap_vfs_fopen_impl, | |
108 daap_vfs_fclose_impl, | |
109 daap_vfs_fread_impl, | |
110 daap_vfs_fwrite_impl, | |
111 daap_vfs_getc_impl, | |
112 daap_vfs_ungetc_impl, | |
113 daap_vfs_fseek_impl, | |
114 daap_vfs_rewind_impl, | |
115 daap_vfs_ftell_impl, | |
116 daap_vfs_feof_impl, | |
117 daap_vfs_truncate_impl, | |
118 daap_vfs_fsize_impl, | |
119 daap_vfs_metadata_impl | |
120 }; | |
121 | |
122 static void init(void) | |
123 { | |
124 vfs_register_transport(&daap_const); | |
125 } | |
126 static void cleanup(void) | |
127 { | |
128 } | |
129 DECLARE_PLUGIN(daap, init, cleanup, NULL, NULL, NULL, NULL, NULL, NULL) |