2003-03-27 12:10:14 -05:00
|
|
|
/* -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
2003-02-02 09:24:13 -05:00
|
|
|
#ifndef __YP_H__
|
|
|
|
#define __YP_H__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2003-02-06 08:10:48 -05:00
|
|
|
|
2003-06-26 09:33:55 -04:00
|
|
|
#define YP_SERVER_NAME 1
|
|
|
|
#define YP_SERVER_DESC 2
|
|
|
|
#define YP_SERVER_GENRE 3
|
|
|
|
#define YP_SERVER_URL 4
|
|
|
|
#define YP_BITRATE 5
|
|
|
|
#define YP_AUDIO_INFO 6
|
|
|
|
#define YP_SERVER_TYPE 7
|
|
|
|
#define YP_CURRENT_SONG 8
|
|
|
|
|
2003-02-06 08:10:48 -05:00
|
|
|
struct source_tag;
|
|
|
|
|
2003-02-02 09:24:13 -05:00
|
|
|
#define YP_ADD_ALL -1
|
|
|
|
typedef struct ypdata_tag
|
|
|
|
{
|
2003-03-14 21:10:19 -05:00
|
|
|
char *sid;
|
|
|
|
char *server_name;
|
|
|
|
char *server_desc;
|
|
|
|
char *server_genre;
|
|
|
|
char *cluster_password;
|
|
|
|
char *server_url;
|
|
|
|
char *listen_url;
|
|
|
|
char *bitrate;
|
|
|
|
char *audio_info;
|
|
|
|
char *server_type;
|
|
|
|
char *current_song;
|
|
|
|
char *yp_url;
|
|
|
|
int yp_url_timeout;
|
|
|
|
long yp_last_touch;
|
|
|
|
int yp_touch_interval;
|
2003-02-02 09:24:13 -05:00
|
|
|
} ypdata_t;
|
|
|
|
|
|
|
|
void *yp_touch_thread(void *arg);
|
2003-02-06 08:10:48 -05:00
|
|
|
int yp_add(struct source_tag *source, int which);
|
2003-06-26 09:33:55 -04:00
|
|
|
int yp_touch();
|
2003-02-06 08:10:48 -05:00
|
|
|
int yp_remove(struct source_tag *psource);
|
2003-02-02 11:48:15 -05:00
|
|
|
ypdata_t *yp_create_ypdata();
|
|
|
|
void yp_destroy_ypdata(ypdata_t *ypdata);
|
2003-06-26 09:33:55 -04:00
|
|
|
void add_yp_info(struct source_tag *source, char *stat_name, void *info,
|
|
|
|
int type);
|
2004-01-26 17:42:22 -05:00
|
|
|
#ifdef USE_YP
|
|
|
|
void yp_recheck_config (ice_config_t *config);
|
|
|
|
#else
|
|
|
|
#define yp_recheck_config(x) do{}while(0)
|
|
|
|
#endif
|
2003-06-26 09:33:55 -04:00
|
|
|
void yp_initialize();
|
2003-02-02 09:24:13 -05:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|