Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Namespace cleanup: Prefix artist_browse with ds_

  • Loading branch information...
commit 2daabd298bac593b10ea811213a1a6799fb954ef 1 parent d85176b
@SimonKagstrom authored
View
2  src/bindings/ruby/ext/main.h
@@ -19,7 +19,7 @@ VALUE eDespotifyError;
typedef struct ds_album ds_album_t;
typedef struct ds_album_browse ds_album_browse_t;
typedef struct ds_artist ds_artist_t;
-typedef struct artist_browse ds_artist_browse_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_search_result ds_search_t;
View
8 src/clients/simple/simple.c
@@ -187,7 +187,7 @@ void print_album(struct ds_album_browse* a)
print_tracks(a->tracks);
}
-void print_artist(struct artist_browse* a)
+void print_artist(struct ds_artist_browse* a)
{
wrapper_wprintf(L"\nName: %s\n"
"Genres: %s\n"
@@ -411,7 +411,7 @@ void command_loop(struct despotify_session* ds)
t = t->next;
for (struct ds_artist* aptr = t->artist; aptr; aptr = aptr->next) {
- struct artist_browse* a = despotify_get_artist(ds, aptr->id);
+ struct ds_artist_browse* a = despotify_get_artist(ds, aptr->id);
print_artist(a);
despotify_free_artist_browse(a);
}
@@ -499,7 +499,7 @@ void command_loop(struct despotify_session* ds)
struct link* link = despotify_link_from_uri(uri);
struct ds_album_browse* al;
- struct artist_browse* ar;
+ struct ds_artist_browse* ar;
struct ds_playlist* pls;
struct ds_search_result* s;
struct ds_track* t;
@@ -572,7 +572,7 @@ void command_loop(struct despotify_session* ds)
struct ds_track* t = lastlist->tracks;
for (int i=1; i<num; i++)
t = t->next;
- struct artist_browse* a = despotify_get_artist(ds, t->artist->id);
+ struct ds_artist_browse* a = despotify_get_artist(ds, t->artist->id);
if (a && a->portrait_id[0]) {
int len;
void* portrait = despotify_get_image(ds, a->portrait_id, &len);
View
10 src/lib/despotify.c
@@ -1190,10 +1190,10 @@ bool despotify_set_playlist_collaboration(struct despotify_session *ds,
*
*/
-struct artist_browse* despotify_get_artist(struct despotify_session* ds,
+struct ds_artist_browse* despotify_get_artist(struct despotify_session* ds,
char* artist_id)
{
- ds->artist_browse = calloc(1, sizeof(struct artist_browse));
+ ds->artist_browse = calloc(1, sizeof(struct ds_artist_browse));
/* check cache */
if (ds->use_cache && cache_contains(artist_id)) {
@@ -1244,7 +1244,7 @@ struct artist_browse* despotify_get_artist(struct despotify_session* ds,
return ds->artist_browse;
}
-void despotify_free_artist_browse(struct artist_browse* a)
+void despotify_free_artist_browse(struct ds_artist_browse* a)
{
xml_free_artist_browse(a);
}
@@ -1533,7 +1533,7 @@ struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, s
return despotify_get_album(ds, buf);
}
-struct 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 link* link)
{
char buf[33];
@@ -1592,7 +1592,7 @@ char* despotify_album_to_uri(struct ds_album_browse* album, char* dest)
return dest;
}
-char* despotify_artist_to_uri(struct artist_browse* artist, char* dest)
+char* despotify_artist_to_uri(struct ds_artist_browse* artist, char* dest)
{
char uri[23];
View
12 src/lib/despotify.h
@@ -94,7 +94,7 @@ struct ds_artist
struct ds_artist* next;
};
-struct artist_browse
+struct ds_artist_browse
{
char name[STRING_LENGTH];
char id[33];
@@ -182,7 +182,7 @@ struct despotify_session
pthread_t thread;
struct ds_album_browse* album_browse;
- struct artist_browse* artist_browse;
+ struct ds_artist_browse* artist_browse;
struct ds_track* track;
struct ds_playlist* playlist;
struct buf* response;
@@ -265,7 +265,7 @@ void despotify_free(struct despotify_session *ds, bool should_disconnect);
const char *despotify_get_error(struct despotify_session *ds);
/* Browse functions. */
-struct artist_browse* despotify_get_artist(struct despotify_session* ds,
+struct ds_artist_browse* despotify_get_artist(struct despotify_session* ds,
char* artist_id);
struct ds_album_browse* despotify_get_album(struct despotify_session* ds,
char* album_id);
@@ -274,7 +274,7 @@ struct ds_track* despotify_get_track(struct despotify_session* ds, char* track_i
void* despotify_get_image(struct despotify_session* ds,
char* image_id, int* len);
-void despotify_free_artist_browse(struct artist_browse* a);
+void despotify_free_artist_browse(struct ds_artist_browse* a);
void despotify_free_album_browse(struct ds_album_browse* a);
void despotify_free_track(struct ds_track* t);
@@ -317,7 +317,7 @@ int despotify_get_pcm(struct despotify_session*, struct pcm_data*);
struct link* despotify_link_from_uri(char* uri);
struct ds_album_browse* despotify_link_get_album(struct despotify_session* ds, struct link* link);
-struct 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 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);
@@ -325,7 +325,7 @@ struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct l
void despotify_free_link(struct link* link);
char* despotify_album_to_uri(struct ds_album_browse* album, char* dest);
-char* despotify_artist_to_uri(struct artist_browse* album, char* dest);
+char* despotify_artist_to_uri(struct ds_artist_browse* album, char* dest);
char* despotify_playlist_to_uri(struct ds_playlist* album, char* dest);
char* despotify_search_to_uri(struct ds_search_result* album, char* dest);
char* despotify_track_to_uri(struct ds_track* album, char* dest);
View
4 src/lib/xml.c
@@ -435,7 +435,7 @@ int xml_parse_search(struct ds_search_result* search,
}
-bool xml_parse_browse_artist(struct artist_browse* a,
+bool xml_parse_browse_artist(struct ds_artist_browse* a,
unsigned char* xml,
int len,
bool high_bitrate)
@@ -488,7 +488,7 @@ void xml_free_artist(struct ds_artist *artist) {
}
}
-void xml_free_artist_browse(struct artist_browse* artist)
+void xml_free_artist_browse(struct ds_artist_browse* artist)
{
if (artist->text)
free(artist->text);
View
4 src/lib/xml.h
@@ -29,7 +29,7 @@ int xml_parse_tracklist(struct ds_track* firsttrack,
bool ordered,
bool high_bitrate);
-bool xml_parse_browse_artist(struct artist_browse* a,
+bool xml_parse_browse_artist(struct ds_artist_browse* a,
unsigned char* xml,
int len,
bool high_bitrate);
@@ -41,7 +41,7 @@ bool xml_parse_browse_album(struct ds_album_browse* a,
void xml_free_playlist(struct ds_playlist* pl);
void xml_free_track(struct ds_track* head);
void xml_free_artist(struct ds_artist* artist);
-void xml_free_artist_browse(struct artist_browse* artist);
+void xml_free_artist_browse(struct ds_artist_browse* artist);
void xml_free_album(struct ds_album* album);
void xml_free_album_browse(struct ds_album_browse* album);
Please sign in to comment.
Something went wrong with that request. Please try again.