source: roaraudio/include/libroar/roarslp.h @ 5381:430b1d26e12d

Last change on this file since 5381:430b1d26e12d was 5381:430b1d26e12d, checked in by phi, 12 years ago

updated copyright years

File size: 2.9 KB
Line 
1//roarslp.h:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2012
5 *
6 *  This file is part of libroar a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  libroar is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
23 *
24 *  NOTE for everyone want's to change something and send patches:
25 *  read README and HACKING! There a addition information on
26 *  the license of this document you need to read before you send
27 *  any patches.
28 *
29 *  NOTE for uses of non-GPL (LGPL,...) software using libesd, libartsc
30 *  or libpulse*:
31 *  The libs libroaresd, libroararts and libroarpulse link this lib
32 *  and are therefore GPL. Because of this it may be illigal to use
33 *  them with any software that uses libesd, libartsc or libpulse*.
34 */
35
36#ifndef _LIBROARSLP_H_
37#define _LIBROARSLP_H_
38
39#include "libroar.h"
40
41#define ROAR_SLP_MAX_MATCHES       8
42#define ROAR_SLP_MAX_URL_LEN       256
43#define ROAR_SLP_URL_TYPE_ROAR     "service:mixer.fellig:roar"
44#define ROAR_SLP_URL_TYPE_ROAR_LEN 25
45#define ROAR_SLP_URL_TYPE_ESD      "service:mixer.fellig:esd"
46#define ROAR_SLP_URL_TYPE_ESD_LEN  24
47#define ROAR_SLP_URL_TYPE          ROAR_SLP_URL_TYPE_ROAR
48#define ROAR_SLP_URL_TYPE_LEN      ROAR_SLP_URL_TYPE_ROAR_LEN
49
50#ifndef ROAR_HAVE_LIBSLP
51#define SLPHandle  void *
52#define SLPError   int
53#define SLPBoolean int
54#define SLP_FALSE  0
55#define SLP_TRUE   1
56#endif
57
58struct roar_slp_search {
59 char dummy[8];
60};
61
62struct roar_slp_match {
63 char   url[ROAR_SLP_MAX_URL_LEN];
64 time_t tod; // Time Of Dead (found+TTL)
65};
66
67struct roar_slp_cookie {
68 SLPError                 callbackerr;
69 struct roar_slp_search * search;
70 struct roar_slp_match    match[ROAR_SLP_MAX_MATCHES];
71 int                      matchcount;
72};
73
74SLPBoolean roar_slp_url_callback(SLPHandle        hslp,
75                                 const char     * srvurl,
76                                 unsigned short   lifetime,
77                                 SLPError         errcode,
78                                 void           * cookie);
79
80int roar_slp_search          (struct roar_slp_cookie * cookie, char * type);
81int roar_slp_cookie_init     (struct roar_slp_cookie * cookie, struct roar_slp_search * search);
82
83char * roar_slp_find_roard   (int nocache);
84int    roar_slp_find_roard_r (char * addr, size_t len, int nocache);
85
86#endif
87
88//ll
Note: See TracBrowser for help on using the repository browser.