comparison src/scrobbler/plugin.c @ 1066:d1f8b0594f37 trunk

[svn] - convert scrobbler to plugin API v2
author nenolod
date Thu, 24 May 2007 12:12:49 -0700
parents 2649ba83333b
children 761e17b23e0c
comparison
equal deleted inserted replaced
1065:b3b02e58429f 1066:d1f8b0594f37
52 static GThread *pt_handshake; 52 static GThread *pt_handshake;
53 53
54 static GMutex *hs_mutex, *xs_mutex; 54 static GMutex *hs_mutex, *xs_mutex;
55 static GCond *hs_cond, *xs_cond; 55 static GCond *hs_cond, *xs_cond;
56 56
57 static GeneralPlugin xmms_scrobbler = 57 static GeneralPlugin scrobbler_gp =
58 { 58 {
59 NULL, 59 NULL,
60 NULL, 60 NULL,
61 NULL, 61 "Scrobbler Plugin",
62 init, 62 init,
63 about_show, 63 about_show,
64 NULL, 64 NULL,
65 cleanup 65 cleanup
66 }; 66 };
173 pdebug("plugin started", DEBUG); 173 pdebug("plugin started", DEBUG);
174 } 174 }
175 175
176 static void cleanup(void) 176 static void cleanup(void)
177 { 177 {
178 g_free (xmms_scrobbler.description);
179 xmms_scrobbler.description = NULL;
180
181 prefswin_page_destroy(cfgdlg); 178 prefswin_page_destroy(cfgdlg);
182 179
183 if (!sc_going && !ge_going) 180 if (!sc_going && !ge_going)
184 return; 181 return;
185 pdebug("about to lock mutex", DEBUG); 182 pdebug("about to lock mutex", DEBUG);
320 g_thread_exit(NULL); 317 g_thread_exit(NULL);
321 318
322 return NULL; 319 return NULL;
323 } 320 }
324 321
325 GeneralPlugin *get_gplugin_info(void) 322 GeneralPlugin *scrobbler_gplist[] = { &scrobbler_gp, NULL };
326 { 323
327 xmms_scrobbler.description = g_strdup_printf(_("Scrobbler Plugin")); 324 DECLARE_PLUGIN(scrobbler, NULL, NULL, NULL, NULL, NULL, scrobbler_gplist, NULL);
328 return &xmms_scrobbler;
329 }