Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Namespace cleanup: Prefix search_result with ds_

  • Loading branch information...
commit 2c85a81a1b5a9bef03a675e4e0b00e6a5aa518f6 1 parent ef808b4
@SimonKagstrom authored
View
2  src/bindings/ruby/ext/main.h
@@ -22,7 +22,7 @@ typedef struct artist ds_artist_t;
typedef struct artist_browse ds_artist_browse_t;
typedef struct ds_playlist ds_playlist_t;
typedef struct link ds_link_t;
-typedef struct search_result ds_search_t;
+typedef struct ds_search_result ds_search_t;
typedef struct despotify_session ds_session_t;
typedef struct ds_track ds_track_t;
typedef struct user_info ds_user_info_t;
View
2  src/clients/despotify/session.c
@@ -207,7 +207,7 @@ void sess_search(const char *query)
}
log_append("Searching for: <%s>", query);
- struct search_result *sr = despotify_search(g_session.dsfy, (char*)query, 100);
+ struct ds_search_result *sr = despotify_search(g_session.dsfy, (char*)query, 100);
if (!sr) {
log_append(despotify_get_error(g_session.dsfy));
View
2  src/clients/despotify/session.h
@@ -15,7 +15,7 @@ typedef enum sess_state {
} sess_state_t;
typedef struct sess_search {
- struct search_result *res;
+ struct ds_search_result *res;
struct sess_search *next;
} sess_search_t;
View
2  src/clients/despotify/ui_tracklist.c
@@ -17,7 +17,7 @@ static int g_pos = 0;
static int g_availy = 10;
// Current search result.
-static struct search_result *g_res = 0;
+static struct ds_search_result *g_res = 0;
void tracklist_init(ui_t *ui)
{
View
2  src/clients/maemify/maemify.c
@@ -62,7 +62,7 @@ struct _AppData {
struct ds_playlist* rootlist;
struct ds_playlist* searchlist;
struct ds_playlist* lastlist;
- struct search_result *search;
+ struct ds_search_result *search;
struct album_browse* playalbum;
GtkWidget *list;
View
6 src/clients/simple/simple.c
@@ -205,7 +205,7 @@ void print_playlist(struct ds_playlist* pls)
print_tracks(pls->tracks);
}
-void print_search(struct search_result *search)
+void print_search(struct ds_search_result *search)
{
if (search->suggestion[0])
wrapper_wprintf(L"\nDid you mean \"%s\"?\n", search->suggestion);
@@ -279,7 +279,7 @@ void command_loop(struct despotify_session* ds)
struct ds_playlist* rootlist = NULL;
struct ds_playlist* searchlist = NULL;
struct ds_playlist* lastlist = NULL;
- struct search_result *search = NULL;
+ struct ds_search_result *search = NULL;
struct album_browse* playalbum = NULL;
print_help();
@@ -501,7 +501,7 @@ void command_loop(struct despotify_session* ds)
struct album_browse* al;
struct artist_browse* ar;
struct ds_playlist* pls;
- struct search_result* s;
+ struct ds_search_result* s;
struct ds_track* t;
switch(link->type) {
View
16 src/lib/despotify.c
@@ -679,10 +679,10 @@ bool despotify_wait_timeout(struct despotify_session* ds){
*
*/
-struct search_result* despotify_search(struct despotify_session* ds,
+struct ds_search_result* despotify_search(struct despotify_session* ds,
char* searchtext, int maxresults)
{
- struct search_result* search = NULL;
+ struct ds_search_result* search = NULL;
ds->response = buf_new();
ds->playlist = calloc(1, sizeof(struct ds_playlist));
@@ -712,7 +712,7 @@ struct search_result* despotify_search(struct despotify_session* ds,
struct buf* b = despotify_inflate(ds->response->ptr, ds->response->len);
if (b) {
- search = calloc(1, sizeof(struct search_result));
+ search = calloc(1, sizeof(struct ds_search_result));
DSFYstrncpy(search->query, searchtext, sizeof search->query);
search->playlist = ds->playlist;
search->tracks = ds->playlist->tracks;
@@ -731,8 +731,8 @@ struct search_result* despotify_search(struct despotify_session* ds,
return search;
}
-struct search_result* despotify_search_more(struct despotify_session *ds,
- struct search_result *search,
+struct ds_search_result* despotify_search_more(struct despotify_session *ds,
+ struct ds_search_result *search,
int offset, int maxresults)
{
if (!search || !search->tracks)
@@ -777,7 +777,7 @@ struct search_result* despotify_search_more(struct despotify_session *ds,
return search;
}
-void despotify_free_search(struct search_result *search) {
+void despotify_free_search(struct ds_search_result *search) {
despotify_free_playlist(search->playlist);
xml_free_album(search->albums);
xml_free_artist(search->artists);
@@ -1542,7 +1542,7 @@ struct artist_browse* despotify_link_get_artist(struct despotify_session* ds, st
return despotify_get_artist(ds, buf);
}
-struct 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 link* link)
{
return despotify_search(ds, link->arg, MAX_SEARCH_RESULTS);
}
@@ -1618,7 +1618,7 @@ char* despotify_playlist_to_uri(struct ds_playlist* playlist, char* dest)
}
-char* despotify_search_to_uri(struct search_result* search, char* dest)
+char* despotify_search_to_uri(struct ds_search_result* search, char* dest)
{
sprintf(dest, "spotify:search:%s", search->query);
View
14 src/lib/despotify.h
@@ -36,7 +36,7 @@ struct ds_track
in an album or playlist struct */
};
-struct search_result
+struct ds_search_result
{
unsigned char query[STRING_LENGTH];
unsigned char suggestion[STRING_LENGTH];
@@ -282,12 +282,12 @@ void despotify_free_track(struct ds_track* t);
* user despotify_get_user_info(struct despotify_session *ds); */
/* Search */
-struct search_result* despotify_search(struct despotify_session *ds,
+struct ds_search_result* despotify_search(struct despotify_session *ds,
char *searchtext, int maxresults);
-struct search_result* despotify_search_more(struct despotify_session *ds,
- struct search_result* search,
+struct ds_search_result* despotify_search_more(struct despotify_session *ds,
+ struct ds_search_result* search,
int offset, int maxresults);
-void despotify_free_search(struct search_result *search);
+void despotify_free_search(struct ds_search_result *search);
/* Playlist handling. */
@@ -319,7 +319,7 @@ struct link* despotify_link_from_uri(char* uri);
struct 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_playlist* despotify_link_get_playlist(struct despotify_session* ds, struct link* link);
-struct 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 link* link);
struct ds_track* despotify_link_get_track(struct despotify_session* ds, struct link* link);
void despotify_free_link(struct link* link);
@@ -327,7 +327,7 @@ void despotify_free_link(struct link* link);
char* despotify_album_to_uri(struct album_browse* album, char* dest);
char* despotify_artist_to_uri(struct artist_browse* album, char* dest);
char* despotify_playlist_to_uri(struct ds_playlist* album, char* dest);
-char* despotify_search_to_uri(struct search_result* 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);
void despotify_id2uri(char* id, char* uri);
View
2  src/lib/xml.c
@@ -384,7 +384,7 @@ int xml_parse_tracklist(struct ds_track* firsttrack,
}
-int xml_parse_search(struct search_result* search,
+int xml_parse_search(struct ds_search_result* search,
struct ds_track* firsttrack,
unsigned char* xml,
int len,
View
2  src/lib/xml.h
@@ -17,7 +17,7 @@ bool xml_parse_confirm(struct ds_playlist* pl,
unsigned char* xml,
int len);
-int xml_parse_search(struct search_result* search,
+int xml_parse_search(struct ds_search_result* search,
struct ds_track* firsttrack,
unsigned char* xml,
int len,
Please sign in to comment.
Something went wrong with that request. Please try again.