Mercurial > audlegacy-plugins
comparison src/daap/xmms2-daap/daap_cmd.h @ 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 |
comparison
equal
deleted
inserted
replaced
1400:fe0a9cf95642 | 1407:776dd8fc2b38 |
---|---|
1 /** @file daap_cmd.h | |
2 * | |
3 * Copyright (C) 2006-2007 XMMS2 Team | |
4 * | |
5 * This program is free software; you can redistribute it and/or | |
6 * modify it under the terms of the GNU General Public License | |
7 * as published by the Free Software Foundation; either version 2 | |
8 * of the License, or (at your option) 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 | |
16 #ifndef DAAP_CMD_H | |
17 #define DAAP_CMD_H | |
18 | |
19 #include "cc_handlers.h" | |
20 | |
21 /** | |
22 * Log into a DAAP server. | |
23 * Issue the command necessary for logging in. | |
24 * | |
25 * @param host host IP of server | |
26 * @param port port that the server uses on host | |
27 * @param request_id the request id | |
28 * @return a session id for use in further commands | |
29 */ | |
30 guint | |
31 daap_command_login (gchar *host, gint port, guint request_id); | |
32 | |
33 /** | |
34 * Update the DAAP server status. | |
35 * Issue the command necessary for updating the connection to a DAAP server. | |
36 * | |
37 * @param host host IP of server | |
38 * @param port port that the server uses on host | |
39 * @param session_id the id of the current session | |
40 * @param request_id the request id | |
41 * @return a revision id for use in further commands | |
42 */ | |
43 guint | |
44 daap_command_update (gchar *host, gint port, guint session_id, guint request_id); | |
45 | |
46 /** | |
47 * Log out of a DAAP server. | |
48 * Issue the command necessary for logging out. | |
49 * | |
50 * @param host host IP of server | |
51 * @param port port that the server uses on host | |
52 * @param session_id the id of the current session | |
53 * @param request_id the request id | |
54 * @return TRUE on success, FALSE otherwise | |
55 */ | |
56 gboolean | |
57 daap_command_logout (gchar *host, gint port, guint session_id, guint request_id); | |
58 | |
59 /** | |
60 * Get a list of databases. | |
61 * Issue the command for fetching a list of song databases on the server. | |
62 * | |
63 * @param host host IP of server | |
64 * @param port port that the server uses on host | |
65 * @param session_id the id of the current session | |
66 * @param revision_id the id of the current revision | |
67 * @param request_id the request id | |
68 * @return a list of database ids | |
69 */ | |
70 GSList * | |
71 daap_command_db_list (gchar *host, gint port, guint session_id, | |
72 guint revision_id, guint request_id); | |
73 | |
74 /** | |
75 * Get a list of songs in a database. | |
76 * Issue the command for fetching a list of songs in a database on the server. | |
77 * | |
78 * @param host host IP of server | |
79 * @param port port that the server uses on host | |
80 * @param session_id the id of the current session | |
81 * @param revision_id the id of the current revision | |
82 * @param request_id the request id | |
83 * @param db_id the database id | |
84 * @return a list of songs in the database | |
85 */ | |
86 GSList * | |
87 daap_command_song_list (gchar *host, gint port, guint session_id, | |
88 guint revision_id, guint request_id, gint db_id); | |
89 | |
90 /** | |
91 * Begin streaming a song. | |
92 * Issue the command for streaming a song on the server. | |
93 * NOTE: This command only _begins_ the stream; unlike the other command | |
94 * functions, this one does not close the socket/channel, this must be done | |
95 * manually after reading the data. | |
96 * | |
97 * @param host host IP of server | |
98 * @param port port that the server uses on host | |
99 * @param session_id the id of the current session | |
100 * @param revision_id the id of the current revision | |
101 * @param request_id the request id | |
102 * @param dbid the database id | |
103 * @param song a string containing the id and file type of the song to stream | |
104 * @param filesize a pointer to an integer that stores the content length | |
105 * @return: a GIOChannel corresponding to streaming song data | |
106 */ | |
107 GIOChannel * | |
108 daap_command_init_stream (gchar *host, gint port, guint session_id, | |
109 guint revision_id, guint request_id, | |
110 gint dbid, gchar *song, guint *filesize); | |
111 | |
112 #endif |