annotate src/daap/xmms2-daap/daap_cmd.h @ 2191:329267b09658

get rid of talking with GDK directly
author Eugene Zagidullin <e.asphyx@gmail.com>
date Wed, 28 Nov 2007 02:50:15 +0300
parents 776dd8fc2b38
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1407
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
1 /** @file daap_cmd.h
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
2 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
3 * Copyright (C) 2006-2007 XMMS2 Team
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
4 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
6 * modify it under the terms of the GNU General Public License
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
7 * as published by the Free Software Foundation; either version 2
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
8 * of the License, or (at your option) any later version.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
9 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
13 * GNU General Public License for more details.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
14 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
15
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
16 #ifndef DAAP_CMD_H
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
17 #define DAAP_CMD_H
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
18
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
19 #include "cc_handlers.h"
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
20
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
21 /**
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
22 * Log into a DAAP server.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
23 * Issue the command necessary for logging in.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
24 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
25 * @param host host IP of server
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
26 * @param port port that the server uses on host
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
27 * @param request_id the request id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
28 * @return a session id for use in further commands
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
29 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
30 guint
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
31 daap_command_login (gchar *host, gint port, guint request_id);
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
32
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
33 /**
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
34 * Update the DAAP server status.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
35 * Issue the command necessary for updating the connection to a DAAP server.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
36 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
37 * @param host host IP of server
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
38 * @param port port that the server uses on host
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
39 * @param session_id the id of the current session
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
40 * @param request_id the request id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
41 * @return a revision id for use in further commands
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
42 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
43 guint
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
44 daap_command_update (gchar *host, gint port, guint session_id, guint request_id);
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
45
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
46 /**
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
47 * Log out of a DAAP server.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
48 * Issue the command necessary for logging out.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
49 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
50 * @param host host IP of server
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
51 * @param port port that the server uses on host
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
52 * @param session_id the id of the current session
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
53 * @param request_id the request id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
54 * @return TRUE on success, FALSE otherwise
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
55 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
56 gboolean
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
57 daap_command_logout (gchar *host, gint port, guint session_id, guint request_id);
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
58
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
59 /**
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
60 * Get a list of databases.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
61 * Issue the command for fetching a list of song databases on the server.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
62 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
63 * @param host host IP of server
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
64 * @param port port that the server uses on host
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
65 * @param session_id the id of the current session
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
66 * @param revision_id the id of the current revision
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
67 * @param request_id the request id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
68 * @return a list of database ids
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
69 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
70 GSList *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
71 daap_command_db_list (gchar *host, gint port, guint session_id,
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
72 guint revision_id, guint request_id);
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
73
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
74 /**
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
75 * Get a list of songs in a database.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
76 * Issue the command for fetching a list of songs in a database on the server.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
77 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
78 * @param host host IP of server
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
79 * @param port port that the server uses on host
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
80 * @param session_id the id of the current session
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
81 * @param revision_id the id of the current revision
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
82 * @param request_id the request id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
83 * @param db_id the database id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
84 * @return a list of songs in the database
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
85 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
86 GSList *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
87 daap_command_song_list (gchar *host, gint port, guint session_id,
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
88 guint revision_id, guint request_id, gint db_id);
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
89
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
90 /**
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
91 * Begin streaming a song.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
92 * Issue the command for streaming a song on the server.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
93 * NOTE: This command only _begins_ the stream; unlike the other command
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
94 * functions, this one does not close the socket/channel, this must be done
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
95 * manually after reading the data.
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
96 *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
97 * @param host host IP of server
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
98 * @param port port that the server uses on host
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
99 * @param session_id the id of the current session
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
100 * @param revision_id the id of the current revision
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
101 * @param request_id the request id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
102 * @param dbid the database id
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
103 * @param song a string containing the id and file type of the song to stream
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
104 * @param filesize a pointer to an integer that stores the content length
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
105 * @return: a GIOChannel corresponding to streaming song data
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
106 */
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
107 GIOChannel *
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
108 daap_command_init_stream (gchar *host, gint port, guint session_id,
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
109 guint revision_id, guint request_id,
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
110 gint dbid, gchar *song, guint *filesize);
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
111
776dd8fc2b38 DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff changeset
112 #endif