Skip to content
Browse files

Namespace cleanup: Prefix link with ds_

  • Loading branch information...
1 parent c1a2747 commit 3b03fa7cdd8d5ca407adae9e79a38daee66a7a3a @SimonKagstrom committed Mar 13, 2011
Showing with 18 additions and 18 deletions.
  1. +1 −1 src/bindings/ruby/ext/main.h
  2. +1 −1 src/clients/simple/simple.c
  3. +8 −8 src/lib/despotify.c
  4. +8 −8 src/lib/despotify.h
View
2 src/bindings/ruby/ext/main.h
@@ -21,7 +21,7 @@ typedef struct ds_album_browse ds_album_browse_t;
typedef struct ds_artist ds_artist_t;
typedef struct ds_artist_browse ds_artist_browse_t;
typedef struct ds_playlist ds_playlist_t;
-typedef struct link ds_link_t;
+typedef struct ds_link ds_link_t;
typedef struct ds_search_result ds_search_t;
typedef struct despotify_session ds_session_t;
typedef struct ds_track ds_track_t;
View
2 src/clients/simple/simple.c
@@ -497,7 +497,7 @@ void command_loop(struct despotify_session* ds)
continue;
}
- struct link* link = despotify_link_from_uri(uri);
+ struct ds_link* link = despotify_link_from_uri(uri);
struct ds_album_browse* al;
struct ds_artist_browse* ar;
struct ds_playlist* pls;
View
16 src/lib/despotify.c
@@ -1467,9 +1467,9 @@ void despotify_uri2id(char* uri, char* id)
}
-struct link* despotify_link_from_uri(char *uri)
+struct ds_link* despotify_link_from_uri(char *uri)
{
- struct link* link = calloc(1, sizeof(struct link));
+ struct ds_link* link = calloc(1, sizeof(struct ds_link));
link->type = LINK_TYPE_INVALID;
link->uri = uri;
@@ -1524,7 +1524,7 @@ struct link* despotify_link_from_uri(char *uri)
return link;
}
-struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, struct link* link)
+struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, struct ds_link* link)
{
char buf[33];
@@ -1533,7 +1533,7 @@ struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, s
return despotify_get_album(ds, buf);
}
-struct ds_artist_browse* despotify_link_get_artist(struct despotify_session* ds, struct link* link)
+struct ds_artist_browse* despotify_link_get_artist(struct despotify_session* ds, struct ds_link* link)
{
char buf[33];
@@ -1542,12 +1542,12 @@ struct ds_artist_browse* despotify_link_get_artist(struct despotify_session* ds,
return despotify_get_artist(ds, buf);
}
-struct ds_search_result* despotify_link_get_search(struct despotify_session* ds, struct link* link)
+struct ds_search_result* despotify_link_get_search(struct despotify_session* ds, struct ds_link* link)
{
return despotify_search(ds, link->arg, MAX_SEARCH_RESULTS);
}
-struct ds_playlist* despotify_link_get_playlist(struct despotify_session* ds, struct link* link)
+struct ds_playlist* despotify_link_get_playlist(struct despotify_session* ds, struct ds_link* link)
{
char buf[35];
@@ -1568,7 +1568,7 @@ struct ds_playlist* despotify_link_get_playlist(struct despotify_session* ds, st
return playlist;
}
-struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct link* link)
+struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct ds_link* link)
{
char buf[33];
@@ -1577,7 +1577,7 @@ struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct l
return despotify_get_track(ds, buf);
}
-void despotify_free_link(struct link* link)
+void despotify_free_link(struct ds_link* link)
{
free(link);
}
View
16 src/lib/despotify.h
@@ -127,7 +127,7 @@ enum ds_link_type {
LINK_TYPE_TRACK
};
-struct link
+struct ds_link
{
char* uri;
char* arg;
@@ -314,15 +314,15 @@ struct ds_track* despotify_get_current_track(struct despotify_session* ds);
int despotify_get_pcm(struct despotify_session*, struct pcm_data*);
/* URI utils */
-struct link* despotify_link_from_uri(char* uri);
+struct ds_link* despotify_link_from_uri(char* uri);
-struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, struct link* link);
-struct ds_artist_browse* despotify_link_get_artist(struct despotify_session* ds, struct link* link);
-struct ds_playlist* despotify_link_get_playlist(struct despotify_session* ds, struct link* link);
-struct ds_search_result* despotify_link_get_search(struct despotify_session* ds, struct link* link);
-struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct link* link);
+struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, struct ds_link* link);
+struct ds_artist_browse* despotify_link_get_artist(struct despotify_session* ds, struct ds_link* link);
+struct ds_playlist* despotify_link_get_playlist(struct despotify_session* ds, struct ds_link* link);
+struct ds_search_result* despotify_link_get_search(struct despotify_session* ds, struct ds_link* link);
+struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct ds_link* link);
-void despotify_free_link(struct link* link);
+void despotify_free_link(struct ds_link* link);
char* despotify_album_to_uri(struct ds_album_browse* album, char* dest);
char* despotify_artist_to_uri(struct ds_artist_browse* album, char* dest);

0 comments on commit 3b03fa7

Please sign in to comment.
Something went wrong with that request. Please try again.