From f066f5f8105a0781ecbf82ff13686290c480e3cf Mon Sep 17 00:00:00 2001 From: Richard Kettlewell Date: Sat, 21 Feb 2009 20:22:11 +0000 Subject: [PATCH] Remove obsolete api-client.[ch] --- server/api-client.c | 68 ----------------------------------------------------- server/api-client.h | 30 ----------------------- 2 files changed, 98 deletions(-) delete mode 100644 server/api-client.c delete mode 100644 server/api-client.h diff --git a/server/api-client.c b/server/api-client.c deleted file mode 100644 index 9321770..0000000 --- a/server/api-client.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of DisOrder. - * Copyright (C) 2004, 2007, 2008 Richard Kettlewell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "common.h" - -#include -#include -#include -#include - -#include "client.h" -#include "mem.h" -#include "log.h" -#include "configuration.h" -#include "disorder.h" -#include "api-client.h" - -static disorder_client *c; - -disorder_client *disorder_get_client(void) { - if(!c) - if(!(c = disorder_new(0))) exit(EXIT_FAILURE); - return c; -} - -int disorder_track_exists(const char *track) { - int result; - - return disorder_exists(c, track, &result) ? 0 : result; -} - -const char *disorder_track_get_data(const char *track, const char *key) { - char *value; - - if(disorder_get(c, track, key, &value)) return 0; - return value; -} - -int disorder_track_set_data(const char *track, - const char *key, - const char *value) { - if(value) - return disorder_set(c, track, key, value); - else - return disorder_unset(c, track, key); -} - -/* -Local Variables: -c-basic-offset:2 -comment-column:40 -End: -*/ diff --git a/server/api-client.h b/server/api-client.h deleted file mode 100644 index 99a9410..0000000 --- a/server/api-client.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of DisOrder. - * Copyright (C) 2004, 2007, 2008 Richard Kettlewell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef API_CLIENT_H -#define API_CLIENT_H - -disorder_client *disorder_get_client(void); - -#endif /* API_CLIENT_H */ - -/* -Local Variables: -c-basic-offset:2 -comment-column:40 -End: -*/ -- 2.11.0