rb-audioscrobbler-entry.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (C) 2007 Christophe Fergeau <teuf@gnome.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * The Rhythmbox authors hereby grant permission for non-GPL compatible
  10. * GStreamer plugins to be used and distributed together with GStreamer
  11. * and Rhythmbox. This permission is above and beyond the permissions granted
  12. * by the GPL license by which Rhythmbox is covered. If you modify this code
  13. * you may extend this exception to your version of the code, but you are not
  14. * obligated to do so. If you do not wish to do so, delete this exception
  15. * statement from your version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  25. *
  26. */
  27. #ifndef __RB_AUDIOSCROBBLER_ENTRY_H
  28. #define __RB_AUDIOSCROBBLER_ENTRY_H
  29. G_BEGIN_DECLS
  30. #include "rhythmdb.h"
  31. #define EXTRA_URI_ENCODE_CHARS "&+"
  32. typedef struct
  33. {
  34. gchar *artist;
  35. gchar *album;
  36. gchar *title;
  37. guint length;
  38. gchar *mbid;
  39. time_t play_time;
  40. } AudioscrobblerEntry;
  41. typedef struct
  42. {
  43. gchar *artist;
  44. gchar *album;
  45. gchar *title;
  46. guint length;
  47. gchar *mbid;
  48. gchar *timestamp;
  49. } AudioscrobblerEncodedEntry;
  50. void rb_audioscrobbler_entry_init (AudioscrobblerEntry *entry);
  51. void rb_audioscrobbler_entry_free (AudioscrobblerEntry *entry);
  52. void rb_audioscrobbler_encoded_entry_free (AudioscrobblerEncodedEntry *entry);
  53. AudioscrobblerEncodedEntry * rb_audioscrobbler_entry_encode (AudioscrobblerEntry *entry);
  54. AudioscrobblerEntry * rb_audioscrobbler_entry_create (RhythmDBEntry *rb_entry);
  55. AudioscrobblerEntry * rb_audioscrobbler_entry_load_from_string (const char *string);
  56. void rb_audioscrobbler_entry_save_to_string (GString *string, AudioscrobblerEntry *entry);
  57. void rb_audioscrobbler_entry_debug (AudioscrobblerEntry *entry, int index);
  58. G_END_DECLS
  59. #endif /* __RB_AUDIOSCROBBLER_ENTRY_H */