yp.h 1.05 KB
Newer Older
1
/* -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2 3 4 5
#ifndef __YP_H__
#define __YP_H__

#include <stdio.h>
6

7 8 9 10 11 12 13 14 15
#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

16 17
struct source_tag;

18 19 20
#define YP_ADD_ALL -1
typedef struct ypdata_tag
{
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    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;
36 37 38
} ypdata_t;

void *yp_touch_thread(void *arg);
39
int yp_add(struct source_tag *source, int which);
40
int yp_touch();
41
int yp_remove(struct source_tag *psource);
Ed "oddsock" Zaleski's avatar
Ed "oddsock" Zaleski committed
42 43
ypdata_t *yp_create_ypdata();
void yp_destroy_ypdata(ypdata_t *ypdata);
44 45 46
void add_yp_info(struct source_tag *source, char *stat_name, void *info, 
     int type);
void yp_initialize();
47 48 49 50

#endif