1LIBOPENDAAP(3)             Library Functions Manual             LIBOPENDAAP(3)
2
3
4

NAME

6       libopendaap - library for accessing DAAP shares
7

SYNOPSIS

9       #include <daap/client.h>
10
11       typedef  void  (*DAAP_fnClientStatus)(DAAP_SClient *, DAAP_Status, int,
12       void*);
13
14       typedef int (*DAAP_fnClientEnumerateHosts)(DAAP_SClient *, DAAP_SClien‐
15       tHost *host, void *);
16
17       DAAP_SClient  *DAAP_Client_Create(DAAP_fnClientStatus pfnCallback, void
18       *pvCallbackContext);
19
20       int  DAAP_Client_SetDebug(DAAP_SClient  *pCThis,  const   char   *const
21       debug);
22
23       unsigned int DAAP_Client_AddRef(DAAP_SClient *pCThis);
24
25       unsigned int DAAP_Client_Release(DAAP_SClient *pCThis);
26
27       unsigned     int    DAAP_Client_EnumerateHosts(DAAP_SClient    *pCThis,
28       DAAP_fnClientEnumerateHosts pfnCallback, void *context);
29
30       unsigned int DAAP_ClientHost_AddRef(DAAP_SClientHost *pCHThis);
31
32       unsigned int DAAP_ClientHost_Release(DAAP_SClientHost *pCHThis);
33
34       unsigned  int  DAAP_ClientHost_GetSharename(DAAP_SClientHost  *pCHThis,
35       char *buf, int bufsize);
36
37       unsigned int DAAP_ClientHost_Connect(DAAP_SClientHost *pCHThis);
38
39       unsigned int DAAP_ClientHost_Disconnect(DAAP_SClientHost *pCHThis);
40
41       unsigned  int  DAAP_ClientHost_GetDatabases(DAAP_SClientHost  *pCHThis,
42       DAAP_ClientHost_Database *buffer, int *n, int bufsize);
43
44       int  DAAP_ClientHost_GetDatabaseItems(DAAP_SClientHost  *pCHThis,   int
45       databaseid, DAAP_ClientHost_DatabaseItem *buffer, int *n, int bufsize);
46
47       int DAAP_ClientHost_GetAudioFile(DAAP_SClientHost *pCHThis, int databa‐
48       seid, int songid, const char *songformat, DAAP_ClientHost_Song *song);
49
50       int      DAAP_ClientHost_FreeAudioFile(DAAP_SClientHost       *pCHThis,
51       DAAP_ClientHost_Song *song);
52
53       int  DAAP_ClientHost_AsyncGetAudioFile(DAAP_SClientHost  *pCHThis,  int
54       databaseid, int songid, const char *songformat, int fd);
55
56       int DAAP_ClientHost_AsyncStop(DAAP_SClientHost *pCHThis);
57
58       int DAAP_ClientHost_AsyncWaitUpdate(DAAP_SClientHost *pCHThis);
59
60       int DAAP_ClientHost_AsyncStopUpdate(DAAP_SClientHost *pCHThis);
61
62

DESCRIPTION

64       libopendaap currently  exposes  two  classes,  Client  and  ClientHost.
65       DAAP_Client  can be used to manage a set of available DAAP clients.  On
66       Creation, DAAP_Client will create several threads using  the  available
67       system  threads libraries. It will watch the network using Apple's mDNS
68       protocol for new DAAP shares to  become  available,  and  report  their
69       existance    to    the    installed    DAAP_fnClientStatus    callback.
70       DAAP_Client_EnumerateHosts can then be used to enumerate the  available
71       hosts.   DAAP_ClientHost_AddRef  must be used if a pointer to a host is
72       to be held.
73
74       Furhter manipulation of the hosts is then possible with the DAAP_Clien‐
75       tHost  interface.  For  futhre information about the available methods,
76       please consult the documentation in the header file.
77
78

ENUMERATION TYPES

80       typedef enum {
81           DAAP_STATUS_error        = -2,
82           DAAP_STATUS_dying        = -1,
83           DAAP_STATUS_idle         =  0,
84           DAAP_STATUS_connecting,
85           DAAP_STATUS_negotiating,
86           DAAP_STATUS_updating,
87           DAAP_STATUS_downloading,
88           DAAP_STATUS_hostschanged } DAAP_Status;
89
90       The DAAP_Status enumeration type contains a  list  of  possible  status
91       callback commands.
92
93

OTHER INFO

95       For  more  information  regarding  libopendaap  please visit the tunes‐
96       browser homepage: http://craz.net/programs/itunes/libopendaap.html
97
98       Further information about the libopendaap API  is  available  from  the
99       libopendaap header file.
100
101

AUTHOR

103       libopendaap was written by David Hammerton <craz@crazney.net>
104
105       This   manual   page  was  written  by  Simon  Freiberg  <fryboy@optus‐
106       net.com.au>, for the Debian project (but may be used by others).
107
108
109
110                               December 29, 2004                LIBOPENDAAP(3)
Impressum