Skip to content
Browse files

Before delete.

  • Loading branch information...
1 parent 6012978 commit 977af1bcb006d3b770d868f61720a8472da01fcb @Alxandr committed Oct 18, 2012
Showing with 9,142 additions and 2,149 deletions.
  1. +3 −1 .gitignore
  2. +69 −0 SpotiFire.LibSpotify/Album.cpp
  3. +23 −0 SpotiFire.LibSpotify/Album.h
  4. +100 −0 SpotiFire.LibSpotify/Albumbrowse.cpp
  5. +27 −0 SpotiFire.LibSpotify/Albumbrowse.h
  6. +41 −0 SpotiFire.LibSpotify/Artist.cpp
  7. +19 −0 SpotiFire.LibSpotify/Artist.h
  8. +135 −0 SpotiFire.LibSpotify/Artistbrowse.cpp
  9. +32 −0 SpotiFire.LibSpotify/Artistbrowse.h
  10. +42 −0 SpotiFire.LibSpotify/AssemblyInfo.cpp
  11. +90 −0 SpotiFire.LibSpotify/Image.cpp
  12. +25 −0 SpotiFire.LibSpotify/Image.h
  13. +48 −0 SpotiFire.LibSpotify/Inbox.cpp
  14. +18 −0 SpotiFire.LibSpotify/Inbox.h
  15. +273 −0 SpotiFire.LibSpotify/Playlist.cpp
  16. +48 −0 SpotiFire.LibSpotify/Playlist.h
  17. +167 −0 SpotiFire.LibSpotify/Playlistcontainer.cpp
  18. +32 −0 SpotiFire.LibSpotify/Playlistcontainer.h
  19. +38 −0 SpotiFire.LibSpotify/ReadMe.txt
  20. +162 −0 SpotiFire.LibSpotify/Search.cpp
  21. +35 −0 SpotiFire.LibSpotify/Search.h
  22. +576 −0 SpotiFire.LibSpotify/Session.cpp
  23. +88 −0 SpotiFire.LibSpotify/Session.h
  24. +127 −0 SpotiFire.LibSpotify/SpotiFire.LibSpotify.vcxproj
  25. +121 −0 SpotiFire.LibSpotify/SpotiFire.LibSpotify.vcxproj.filters
  26. +5 −0 SpotiFire.LibSpotify/Stdafx.cpp
  27. +7 −0 SpotiFire.LibSpotify/Stdafx.h
  28. +158 −0 SpotiFire.LibSpotify/Track.cpp
  29. +34 −0 SpotiFire.LibSpotify/Track.h
  30. 0 SpotiFire.LibSpotify/Transform.tt
  31. +41 −0 SpotiFire.LibSpotify/User.cpp
  32. +19 −0 SpotiFire.LibSpotify/User.h
  33. BIN SpotiFire.LibSpotify/app.ico
  34. BIN SpotiFire.LibSpotify/app.rc
  35. +3,959 −0 SpotiFire.LibSpotify/include/libspotify/api.h
  36. +3 −0 SpotiFire.LibSpotify/resource.h
  37. +3 −3 SpotiFire.SpotifyLib/EventArgs/SessionEventArgs.cs
  38. +1 −1 SpotiFire.SpotifyLib/Interfaces/IAlbum.cs
  39. +1 −1 SpotiFire.SpotifyLib/Interfaces/IAlbumBrowse.cs
  40. +1 −1 SpotiFire.SpotifyLib/Interfaces/IArtist.cs
  41. +1 −1 SpotiFire.SpotifyLib/Interfaces/IArtistBrowse.cs
  42. +1 −1 SpotiFire.SpotifyLib/Interfaces/IContainerPlaylist.cs
  43. +2 −2 SpotiFire.SpotifyLib/Interfaces/IImage.cs
  44. +1 −1 SpotiFire.SpotifyLib/Interfaces/ILink.cs
  45. +1 −1 SpotiFire.SpotifyLib/Interfaces/ISearch.cs
  46. +8 −8 SpotiFire.SpotifyLib/Interfaces/ISession.cs
  47. +1 −1 SpotiFire.SpotifyLib/Interfaces/ITrack.cs
  48. +53 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.album.browsing.cs
  49. +47 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.album.cs
  50. +68 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.artist.browsing.cs
  51. +27 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.artist.cs
  52. +207 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.error.cs
  53. +82 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.helpers.cs
  54. +63 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.image.cs
  55. +26 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.inbox.cs
  56. +235 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.links.cs
  57. +146 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.playlist.cs
  58. +98 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.playlistcontainer.cs
  59. +77 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.search.cs
  60. +971 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.session.cs
  61. +87 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.toplist.cs
  62. +84 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.tracks.cs
  63. +53 −0 SpotiFire.SpotifyLib/LibSpotify/libspotify.user.cs
  64. +5 −5 SpotiFire.SpotifyLib/LinkExtensions.cs
  65. +26 −1 SpotiFire.SpotifyLib/SpotiFire.SpotifyLib.csproj
  66. +3 −3 SpotiFire.SpotifyLib/SpotifyException.cs
  67. +5 −5 SpotiFire.SpotifyLib/SpotifyLibExtensions.cs
  68. +4 −4 SpotiFire.SpotifyLib/SpotifyTypes/Album.cs
  69. +4 −4 SpotiFire.SpotifyLib/SpotifyTypes/AlbumBrowse.cs
  70. +3 −3 SpotiFire.SpotifyLib/SpotifyTypes/Artist.cs
  71. +3 −3 SpotiFire.SpotifyLib/SpotifyTypes/ArtistBrowse.cs
  72. +12 −12 SpotiFire.SpotifyLib/SpotifyTypes/ContainerPlaylist.cs
  73. +6 −8 SpotiFire.SpotifyLib/SpotifyTypes/Image.cs
  74. +31 −36 SpotiFire.SpotifyLib/SpotifyTypes/Link.cs
  75. +44 −69 SpotiFire.SpotifyLib/SpotifyTypes/Playlist.cs
  76. +18 −39 SpotiFire.SpotifyLib/SpotifyTypes/PlaylistContainer.cs
  77. +4 −4 SpotiFire.SpotifyLib/SpotifyTypes/Search.cs
  78. +27 −51 SpotiFire.SpotifyLib/SpotifyTypes/Session.cs
  79. +8 −5 SpotiFire.SpotifyLib/SpotifyTypes/Track.cs
  80. +0 −1,872 SpotiFire.SpotifyLib/libspotify.cs
  81. +1 −1 SpotiFire.TestClient/Program.cs
  82. +2 −1 SpotiFire.TestClient/SpotiFire.TestClient.csproj
  83. BIN SpotiFire.TestClient/bass.dll
  84. +2 −1 SpotiFire.WinFormsTest/SpotiFire.WinFormsTest.csproj
  85. +24 −0 SpotiFire.sln
  86. 0 {SpotiFire.WinFormsTest → }/bass.dll
View
4 .gitignore
@@ -26,4 +26,6 @@ obj/
_ReSharper*/
[Tt]est[Rr]esult*
SpotiFire.Tests
-
+ipch/
+*.sdf
+*.opensdf
View
69 SpotiFire.LibSpotify/Album.cpp
@@ -0,0 +1,69 @@
+#include "stdafx.h"
+
+#include "Album.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+int SpotiFire::Album::type(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (int)sp_album_type(album);
+}
+
+int SpotiFire::Album::add_ref(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (int)sp_album_add_ref(album);
+}
+
+int SpotiFire::Album::release(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (int)sp_album_release(album);
+}
+
+Boolean SpotiFire::Album::is_loaded(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (Boolean)sp_album_is_loaded(album);
+}
+
+Boolean SpotiFire::Album::is_available(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (Boolean)sp_album_is_available(album);
+}
+
+IntPtr SpotiFire::Album::artist(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (IntPtr)(void *)sp_album_artist(album);
+}
+
+IntPtr SpotiFire::Album::cover(IntPtr albumPtr, int size)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (IntPtr)(void *)sp_album_cover(album, (sp_image_size)size);
+}
+
+String^ SpotiFire::Album::name(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return gcnew String(sp_album_name(album));
+}
+
+Int32 SpotiFire::Album::year(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (Int32)sp_album_year(album);
+}
+
View
23 SpotiFire.LibSpotify/Album.h
@@ -0,0 +1,23 @@
+// Album.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Album
+ {
+ internal:
+ static int type(IntPtr albumPtr);
+ static int add_ref(IntPtr albumPtr);
+ static int release(IntPtr albumPtr);
+ static Boolean is_loaded(IntPtr albumPtr);
+ static Boolean is_available(IntPtr albumPtr);
+ static IntPtr artist(IntPtr albumPtr);
+ static IntPtr cover(IntPtr albumPtr, int size);
+ static String^ name(IntPtr albumPtr);
+ static Int32 year(IntPtr albumPtr);
+ };
+}
View
100 SpotiFire.LibSpotify/Albumbrowse.cpp
@@ -0,0 +1,100 @@
+#include "stdafx.h"
+
+#include "Albumbrowse.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+IntPtr SpotiFire::Albumbrowse::album(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (IntPtr)(void *)sp_albumbrowse_album(alb);
+}
+
+IntPtr SpotiFire::Albumbrowse::artist(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (IntPtr)(void *)sp_albumbrowse_artist(alb);
+}
+
+Int32 SpotiFire::Albumbrowse::num_copyrights(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (Int32)sp_albumbrowse_num_copyrights(alb);
+}
+
+String^ SpotiFire::Albumbrowse::copyright(IntPtr albPtr, Int32 index)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return gcnew String(sp_albumbrowse_copyright(alb, index));
+}
+
+Int32 SpotiFire::Albumbrowse::num_tracks(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (Int32)sp_albumbrowse_num_tracks(alb);
+}
+
+IntPtr SpotiFire::Albumbrowse::track(IntPtr albPtr, Int32 index)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (IntPtr)(void *)sp_albumbrowse_track(alb, index);
+}
+
+String^ SpotiFire::Albumbrowse::review(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return gcnew String(sp_albumbrowse_review(alb));
+}
+
+Int32 SpotiFire::Albumbrowse::backend_request_duration(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (Int32)sp_albumbrowse_backend_request_duration(alb);
+}
+
+int SpotiFire::Albumbrowse::add_ref(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (int)sp_albumbrowse_add_ref(alb);
+}
+
+int SpotiFire::Albumbrowse::release(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (int)sp_albumbrowse_release(alb);
+}
+
+IntPtr SpotiFire::Albumbrowse::create(IntPtr sessionPtr, IntPtr albumPtr, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ albumbrowse_complete_cb* callback = SP_TYPE(albumbrowse_complete_cb, callbackPtr);
+
+ return (IntPtr)(void *)sp_albumbrowse_create(session, album, callback, userData);
+}
+
+Boolean SpotiFire::Albumbrowse::is_loaded(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (Boolean)sp_albumbrowse_is_loaded(alb);
+}
+
+int SpotiFire::Albumbrowse::error(IntPtr albPtr)
+{
+ sp_albumbrowse* alb = SP_TYPE(sp_albumbrowse, albPtr);
+
+ return (int)sp_albumbrowse_error(alb);
+}
+
View
27 SpotiFire.LibSpotify/Albumbrowse.h
@@ -0,0 +1,27 @@
+// Albumbrowse.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Albumbrowse
+ {
+ internal:
+ static IntPtr album(IntPtr albPtr);
+ static IntPtr artist(IntPtr albPtr);
+ static Int32 num_copyrights(IntPtr albPtr);
+ static String^ copyright(IntPtr albPtr, Int32 index);
+ static Int32 num_tracks(IntPtr albPtr);
+ static IntPtr track(IntPtr albPtr, Int32 index);
+ static String^ review(IntPtr albPtr);
+ static Int32 backend_request_duration(IntPtr albPtr);
+ static int add_ref(IntPtr albPtr);
+ static int release(IntPtr albPtr);
+ static IntPtr create(IntPtr sessionPtr, IntPtr albumPtr, IntPtr callback, IntPtr userDataPtr);
+ static Boolean is_loaded(IntPtr albPtr);
+ static int error(IntPtr albPtr);
+ };
+}
View
41 SpotiFire.LibSpotify/Artist.cpp
@@ -0,0 +1,41 @@
+#include "stdafx.h"
+
+#include "Artist.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+String^ SpotiFire::Artist::name(IntPtr artistPtr)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return gcnew String(sp_artist_name(artist));
+}
+
+Boolean SpotiFire::Artist::is_loaded(IntPtr artistPtr)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return (Boolean)sp_artist_is_loaded(artist);
+}
+
+IntPtr SpotiFire::Artist::portrait(IntPtr artistPtr, int size)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return (IntPtr)(void *)sp_artist_portrait(artist, (sp_image_size)size);
+}
+
+int SpotiFire::Artist::add_ref(IntPtr artistPtr)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return (int)sp_artist_add_ref(artist);
+}
+
+int SpotiFire::Artist::release(IntPtr artistPtr)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return (int)sp_artist_release(artist);
+}
+
View
19 SpotiFire.LibSpotify/Artist.h
@@ -0,0 +1,19 @@
+// Artist.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Artist
+ {
+ internal:
+ static String^ name(IntPtr artistPtr);
+ static Boolean is_loaded(IntPtr artistPtr);
+ static IntPtr portrait(IntPtr artistPtr, int size);
+ static int add_ref(IntPtr artistPtr);
+ static int release(IntPtr artistPtr);
+ };
+}
View
135 SpotiFire.LibSpotify/Artistbrowse.cpp
@@ -0,0 +1,135 @@
+#include "stdafx.h"
+
+#include "Artistbrowse.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+IntPtr SpotiFire::Artistbrowse::create(IntPtr sessionPtr, IntPtr artistPtr, int type, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ artistbrowse_complete_cb* callback = SP_TYPE(artistbrowse_complete_cb, callbackPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_create(session, artist, (sp_artistbrowse_type)type, callback, userData);
+}
+
+Boolean SpotiFire::Artistbrowse::is_loaded(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Boolean)sp_artistbrowse_is_loaded(arb);
+}
+
+int SpotiFire::Artistbrowse::error(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (int)sp_artistbrowse_error(arb);
+}
+
+IntPtr SpotiFire::Artistbrowse::artist(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_artist(arb);
+}
+
+Int32 SpotiFire::Artistbrowse::num_portraits(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Int32)sp_artistbrowse_num_portraits(arb);
+}
+
+IntPtr SpotiFire::Artistbrowse::portrait(IntPtr arbPtr, Int32 index)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_portrait(arb, index);
+}
+
+Int32 SpotiFire::Artistbrowse::num_tracks(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Int32)sp_artistbrowse_num_tracks(arb);
+}
+
+IntPtr SpotiFire::Artistbrowse::track(IntPtr arbPtr, Int32 index)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_track(arb, index);
+}
+
+Int32 SpotiFire::Artistbrowse::num_tophit_tracks(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Int32)sp_artistbrowse_num_tophit_tracks(arb);
+}
+
+IntPtr SpotiFire::Artistbrowse::tophit_track(IntPtr arbPtr, Int32 index)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_tophit_track(arb, index);
+}
+
+Int32 SpotiFire::Artistbrowse::num_albums(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Int32)sp_artistbrowse_num_albums(arb);
+}
+
+IntPtr SpotiFire::Artistbrowse::album(IntPtr arbPtr, Int32 index)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_album(arb, index);
+}
+
+Int32 SpotiFire::Artistbrowse::num_similar_artists(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Int32)sp_artistbrowse_num_similar_artists(arb);
+}
+
+IntPtr SpotiFire::Artistbrowse::similar_artist(IntPtr arbPtr, Int32 index)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (IntPtr)(void *)sp_artistbrowse_similar_artist(arb, index);
+}
+
+String^ SpotiFire::Artistbrowse::biography(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return gcnew String(sp_artistbrowse_biography(arb));
+}
+
+Int32 SpotiFire::Artistbrowse::backend_request_duration(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (Int32)sp_artistbrowse_backend_request_duration(arb);
+}
+
+int SpotiFire::Artistbrowse::add_ref(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (int)sp_artistbrowse_add_ref(arb);
+}
+
+int SpotiFire::Artistbrowse::release(IntPtr arbPtr)
+{
+ sp_artistbrowse* arb = SP_TYPE(sp_artistbrowse, arbPtr);
+
+ return (int)sp_artistbrowse_release(arb);
+}
+
View
32 SpotiFire.LibSpotify/Artistbrowse.h
@@ -0,0 +1,32 @@
+// Artistbrowse.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Artistbrowse
+ {
+ internal:
+ static IntPtr create(IntPtr sessionPtr, IntPtr artistPtr, int type, IntPtr callback, IntPtr userDataPtr);
+ static Boolean is_loaded(IntPtr arbPtr);
+ static int error(IntPtr arbPtr);
+ static IntPtr artist(IntPtr arbPtr);
+ static Int32 num_portraits(IntPtr arbPtr);
+ static IntPtr portrait(IntPtr arbPtr, Int32 index);
+ static Int32 num_tracks(IntPtr arbPtr);
+ static IntPtr track(IntPtr arbPtr, Int32 index);
+ static Int32 num_tophit_tracks(IntPtr arbPtr);
+ static IntPtr tophit_track(IntPtr arbPtr, Int32 index);
+ static Int32 num_albums(IntPtr arbPtr);
+ static IntPtr album(IntPtr arbPtr, Int32 index);
+ static Int32 num_similar_artists(IntPtr arbPtr);
+ static IntPtr similar_artist(IntPtr arbPtr, Int32 index);
+ static String^ biography(IntPtr arbPtr);
+ static Int32 backend_request_duration(IntPtr arbPtr);
+ static int add_ref(IntPtr arbPtr);
+ static int release(IntPtr arbPtr);
+ };
+}
View
42 SpotiFire.LibSpotify/AssemblyInfo.cpp
@@ -0,0 +1,42 @@
+#include "stdafx.h"
+
+using namespace System;
+using namespace System::Reflection;
+using namespace System::Runtime::CompilerServices;
+using namespace System::Runtime::InteropServices;
+using namespace System::Security::Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly:AssemblyTitleAttribute("SpotiFireLibSpotify")];
+[assembly:AssemblyDescriptionAttribute("")];
+[assembly:AssemblyConfigurationAttribute("")];
+[assembly:AssemblyCompanyAttribute("")];
+[assembly:AssemblyProductAttribute("SpotiFireLibSpotify")];
+[assembly:AssemblyCopyrightAttribute("Copyright (c) 2012")];
+[assembly:AssemblyTrademarkAttribute("")];
+[assembly:AssemblyCultureAttribute("")];
+
+[assembly:InternalsVisibleTo("SpotiFire.SpotifyLib")];
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the value or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly:AssemblyVersionAttribute("1.0.*")];
+
+[assembly:ComVisible(false)];
+
+[assembly:CLSCompliantAttribute(true)];
+
+[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
View
90 SpotiFire.LibSpotify/Image.cpp
@@ -0,0 +1,90 @@
+#include "stdafx.h"
+
+#include "Image.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+IntPtr SpotiFire::Image::create(IntPtr sessionPtr, IntPtr imageIdArr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ byte* imageId = SP_TYPE(byte, imageIdArr);
+
+ return (IntPtr)(void *)sp_image_create(session, imageId);
+}
+
+IntPtr SpotiFire::Image::create_from_link(IntPtr sessionPtr, IntPtr linkPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_image_create_from_link(session, link);
+}
+
+int SpotiFire::Image::add_load_callback(IntPtr imagePtr, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+ image_loaded_cb* callback = SP_TYPE(image_loaded_cb, callbackPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+
+ return (int)sp_image_add_load_callback(image, callback, userData);
+}
+
+int SpotiFire::Image::remove_load_callback(IntPtr imagePtr, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+ image_loaded_cb* callback = SP_TYPE(image_loaded_cb, callbackPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+
+ return (int)sp_image_remove_load_callback(image, callback, userData);
+}
+
+Boolean SpotiFire::Image::is_loaded(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (Boolean)sp_image_is_loaded(image);
+}
+
+int SpotiFire::Image::error(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (int)sp_image_error(image);
+}
+
+int SpotiFire::Image::format(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (int)sp_image_format(image);
+}
+
+IntPtr SpotiFire::Image::data(IntPtr imagePtr, Int32& dataSize)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+ size_t* size = SP_TYPE(size_t, &dataSize);
+
+ return (IntPtr)(void *)sp_image_data(image, size);
+}
+
+IntPtr SpotiFire::Image::image_id(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (IntPtr)(void *)sp_image_image_id(image);
+}
+
+int SpotiFire::Image::add_ref(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (int)sp_image_add_ref(image);
+}
+
+int SpotiFire::Image::release(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (int)sp_image_release(image);
+}
+
View
25 SpotiFire.LibSpotify/Image.h
@@ -0,0 +1,25 @@
+// Image.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Image
+ {
+ internal:
+ static IntPtr create(IntPtr sessionPtr, IntPtr imageIdArr);
+ static IntPtr create_from_link(IntPtr sessionPtr, IntPtr linkPtr);
+ static int add_load_callback(IntPtr imagePtr, IntPtr callbackPtr, IntPtr userDataPtr);
+ static int remove_load_callback(IntPtr imagePtr, IntPtr callbackPtr, IntPtr userDataPtr);
+ static Boolean is_loaded(IntPtr imagePtr);
+ static int error(IntPtr imagePtr);
+ static int format(IntPtr imagePtr);
+ static IntPtr data(IntPtr imagePtr, Int32& dataSize);
+ static IntPtr image_id(IntPtr imagePtr);
+ static int add_ref(IntPtr imagePtr);
+ static int release(IntPtr imagePtr);
+ };
+}
View
48 SpotiFire.LibSpotify/Inbox.cpp
@@ -0,0 +1,48 @@
+#include "stdafx.h"
+
+#include "Inbox.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+#define SP_STRING(str) (char *)(void *)Marshal::StringToHGlobalAnsi(str)
+#define SP_FREE(str) Marshal::FreeHGlobal((IntPtr)(void *)str)
+
+using namespace System::Runtime::InteropServices;
+
+IntPtr SpotiFire::Inbox::post_tracks(IntPtr sessionPtr, String^ user, array<IntPtr>^ trackPtrs, Int32 numTracks, String^ message, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_track** tracks = new sp_track*[trackPtrs->Length];
+ for(int i = 0, l = trackPtrs->Length; i < l; i++)
+ tracks[i] = SP_TYPE(sp_track, trackPtrs[i]);
+ inboxpost_complete_cb* callback = SP_TYPE(inboxpost_complete_cb, callbackPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ char* _user = SP_STRING(user);
+ char *_message = SP_STRING(message);
+
+ IntPtr ret = (IntPtr)(void *)sp_inbox_post_tracks(session, _user, tracks, numTracks, _message, callback, userData);
+ SP_FREE(_user);
+ SP_FREE(_message);
+ return ret;
+}
+
+int SpotiFire::Inbox::error(IntPtr inboxPtr)
+{
+ sp_inbox* inbox = SP_TYPE(sp_inbox, inboxPtr);
+
+ return (int)sp_inbox_error(inbox);
+}
+
+int SpotiFire::Inbox::add_ref(IntPtr inboxPtr)
+{
+ sp_inbox* inbox = SP_TYPE(sp_inbox, inboxPtr);
+
+ return (int)sp_inbox_add_ref(inbox);
+}
+
+int SpotiFire::Inbox::release(IntPtr inboxPtr)
+{
+ sp_inbox* inbox = SP_TYPE(sp_inbox, inboxPtr);
+
+ return (int)sp_inbox_release(inbox);
+}
+
View
18 SpotiFire.LibSpotify/Inbox.h
@@ -0,0 +1,18 @@
+// Inbox.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Inbox
+ {
+ internal:
+ static IntPtr post_tracks(IntPtr sessionPtr, String^ user, array<IntPtr>^ trackPtrs, Int32 numTracks, String^ message, IntPtr callbackPtr, IntPtr userDataPtr);
+ static int error(IntPtr inboxPtr);
+ static int add_ref(IntPtr inboxPtr);
+ static int release(IntPtr inboxPtr);
+ };
+}
View
273 SpotiFire.LibSpotify/Playlist.cpp
@@ -0,0 +1,273 @@
+#include "stdafx.h"
+
+#include "Playlist.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+using namespace System::Runtime::InteropServices;
+#define SP_STRING(str) (char *)(void *)Marshal::StringToHGlobalAnsi(str)
+#define SP_FREE(str) Marshal::FreeHGlobal((IntPtr)(void *)str)
+
+int SpotiFire::Playlist::subscribers_free(IntPtr subsPtr)
+{
+ sp_subscribers* subs = SP_TYPE(sp_subscribers, subsPtr);
+
+ return (int)sp_playlist_subscribers_free(subs);
+}
+
+int SpotiFire::Playlist::update_subscribers(IntPtr sessionPtr, IntPtr plPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_update_subscribers(session, pl);
+}
+
+Boolean SpotiFire::Playlist::is_in_ram(IntPtr sessionPtr, IntPtr plPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Boolean)sp_playlist_is_in_ram(session, pl);
+}
+
+int SpotiFire::Playlist::set_in_ram(IntPtr sessionPtr, IntPtr plPtr, Boolean inRam)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_set_in_ram(session, pl, inRam);
+}
+
+IntPtr SpotiFire::Playlist::create(IntPtr sessionPtr, IntPtr linkPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_playlist_create(session, link);
+}
+
+int SpotiFire::Playlist::set_offline_mode(IntPtr sessionPtr, IntPtr plPtr, Boolean offline)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_set_offline_mode(session, pl, offline);
+}
+
+int SpotiFire::Playlist::get_offline_status(IntPtr sessionPtr, IntPtr plPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_get_offline_status(session, pl);
+}
+
+Int32 SpotiFire::Playlist::get_offline_download_completed(IntPtr sessionPtr, IntPtr plPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Int32)sp_playlist_get_offline_download_completed(session, pl);
+}
+
+int SpotiFire::Playlist::add_ref(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_add_ref(pl);
+}
+
+int SpotiFire::Playlist::release(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_release(pl);
+}
+
+Int32 SpotiFire::Playlist::num_tracks(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Int32)sp_playlist_num_tracks(pl);
+}
+
+IntPtr SpotiFire::Playlist::track(IntPtr plPtr, Int32 index)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (IntPtr)(void *)sp_playlist_track(pl, index);
+}
+
+Int32 SpotiFire::Playlist::track_create_time(IntPtr plPtr, Int32 index)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Int32)sp_playlist_track_create_time(pl, index);
+}
+
+IntPtr SpotiFire::Playlist::track_creator(IntPtr plPtr, Int32 index)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (IntPtr)(void *)sp_playlist_track_creator(pl, index);
+}
+
+Boolean SpotiFire::Playlist::track_seen(IntPtr plPtr, Int32 index)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Boolean)sp_playlist_track_seen(pl, index);
+}
+
+int SpotiFire::Playlist::track_set_seen(IntPtr plPtr, Int32 index, Boolean seen)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_track_set_seen(pl, index, seen);
+}
+
+String^ SpotiFire::Playlist::track_message(IntPtr plPtr, Int32 index)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return gcnew String(sp_playlist_track_message(pl, index));
+}
+
+String^ SpotiFire::Playlist::name(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return gcnew String(sp_playlist_name(pl));
+}
+
+int SpotiFire::Playlist::rename(IntPtr plPtr, String^ newName)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ char *_newName = SP_STRING(newName);
+
+ int ret = (int)sp_playlist_rename(pl, _newName);
+ SP_FREE(_newName);
+ return ret;
+}
+
+IntPtr SpotiFire::Playlist::owner(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (IntPtr)(void *)sp_playlist_owner(pl);
+}
+
+Boolean SpotiFire::Playlist::is_collaborative(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Boolean)sp_playlist_is_collaborative(pl);
+}
+
+int SpotiFire::Playlist::set_collaborative(IntPtr plPtr, Boolean collaborative)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_set_collaborative(pl, collaborative);
+}
+
+int SpotiFire::Playlist::set_autolink_tracks(IntPtr plPtr, Boolean autolink)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (int)sp_playlist_set_autolink_tracks(pl, autolink);
+}
+
+String^ SpotiFire::Playlist::get_description(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return gcnew String(sp_playlist_get_description(pl));
+}
+
+Boolean SpotiFire::Playlist::get_image(IntPtr plPtr, IntPtr imageIdPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ byte* imageId = SP_TYPE(byte, imageIdPtr);
+
+ return (Boolean)sp_playlist_get_image(pl, imageId);
+}
+
+Boolean SpotiFire::Playlist::has_pending_changes(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Boolean)sp_playlist_has_pending_changes(pl);
+}
+
+int SpotiFire::Playlist::add_tracks(IntPtr plPtr, array<IntPtr>^ trackPtrs, Int32 numTracks, Int32 position, IntPtr sessionPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ sp_track** tracks = new sp_track*[trackPtrs->Length];
+ for(int i = 0, l = trackPtrs->Length; i < l; i++)
+ tracks[i] = SP_TYPE(sp_track, trackPtrs[i]);
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_playlist_add_tracks(pl, tracks, numTracks, position, session);
+}
+
+int SpotiFire::Playlist::remove_tracks(IntPtr plPtr, array<Int32>^ trackIndexs, Int32 numTracks)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ int* trackIndexes = new int[trackIndexs->Length];
+ for(int i = 0, l = trackIndexs->Length; i < l; i++)
+ trackIndexes[i] = trackIndexs[i];
+
+ return (int)sp_playlist_remove_tracks(pl, trackIndexes, numTracks);
+}
+
+int SpotiFire::Playlist::reorder_tracks(IntPtr plPtr, array<Int32>^ trackIndexs, Int32 numTracks, Int32 newPosition)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ int* trackIndexes = new int[trackIndexs->Length];
+ for(int i = 0, l = trackIndexs->Length; i < l; i++)
+ trackIndexes[i] = trackIndexs[i];
+
+ return (int)sp_playlist_reorder_tracks(pl, trackIndexes, numTracks, newPosition);
+}
+
+UInt32 SpotiFire::Playlist::num_subscribers(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (UInt32)sp_playlist_num_subscribers(pl);
+}
+
+IntPtr SpotiFire::Playlist::subscribers(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (IntPtr)(void *)sp_playlist_subscribers(pl);
+}
+
+Boolean SpotiFire::Playlist::is_loaded(IntPtr plPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Boolean)sp_playlist_is_loaded(pl);
+}
+
+int SpotiFire::Playlist::add_callbacks(IntPtr plPtr, IntPtr callbacksPtr, IntPtr userDataPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ sp_playlist_callbacks* callbacks = SP_TYPE(sp_playlist_callbacks, callbacksPtr);
+
+ return (int)sp_playlist_add_callbacks(pl, callbacks, userData);
+}
+
+int SpotiFire::Playlist::remove_callbacks(IntPtr plPtr, IntPtr callbacksPtr, IntPtr userDataPtr)
+{
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ sp_playlist_callbacks* callbacks = SP_TYPE(sp_playlist_callbacks, callbacksPtr);
+
+ return (int)sp_playlist_remove_callbacks(pl, callbacks, userData);
+}
+
View
48 SpotiFire.LibSpotify/Playlist.h
@@ -0,0 +1,48 @@
+// Playlist.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Playlist
+ {
+ internal:
+ static int subscribers_free(IntPtr subsPtr);
+ static int update_subscribers(IntPtr sessionPtr, IntPtr plPtr);
+ static Boolean is_in_ram(IntPtr sessionPtr, IntPtr plPtr);
+ static int set_in_ram(IntPtr sessionPtr, IntPtr plPtr, Boolean inRam);
+ static IntPtr create(IntPtr sessionPtr, IntPtr linkPtr);
+ static int set_offline_mode(IntPtr sessionPtr, IntPtr plPtr, Boolean offline);
+ static int get_offline_status(IntPtr sessionPtr, IntPtr plPtr);
+ static Int32 get_offline_download_completed(IntPtr sessionPtr, IntPtr plPtr);
+ static int add_ref(IntPtr plPtr);
+ static int release(IntPtr plPtr);
+ static Int32 num_tracks(IntPtr plPtr);
+ static IntPtr track(IntPtr plPtr, Int32 index);
+ static Int32 track_create_time(IntPtr plPtr, Int32 index);
+ static IntPtr track_creator(IntPtr plPtr, Int32 index);
+ static Boolean track_seen(IntPtr plPtr, Int32 index);
+ static int track_set_seen(IntPtr plPtr, Int32 index, Boolean seen);
+ static String^ track_message(IntPtr plPtr, Int32 index);
+ static String^ name(IntPtr plPtr);
+ static int rename(IntPtr plPtr, String^ newName);
+ static IntPtr owner(IntPtr plPtr);
+ static Boolean is_collaborative(IntPtr plPtr);
+ static int set_collaborative(IntPtr plPtr, Boolean collaborative);
+ static int set_autolink_tracks(IntPtr plPtr, Boolean autolink);
+ static String^ get_description(IntPtr plPtr);
+ static Boolean get_image(IntPtr plPtr, IntPtr imageIdPtr);
+ static Boolean has_pending_changes(IntPtr plPtr);
+ static int add_tracks(IntPtr plPtr, array<IntPtr>^ trackPtrs, Int32 numTracks, Int32 position, IntPtr sessionPtr);
+ static int remove_tracks(IntPtr plPtr, array<Int32>^ trackIndexs, Int32 numTracks);
+ static int reorder_tracks(IntPtr plPtr, array<Int32>^ trackIndexs, Int32 numTracks, Int32 newPosition);
+ static UInt32 num_subscribers(IntPtr plPtr);
+ static IntPtr subscribers(IntPtr plPtr);
+ static Boolean is_loaded(IntPtr plPtr);
+ static int add_callbacks(IntPtr plPtr, IntPtr callbacks, IntPtr userDataPtr);
+ static int remove_callbacks(IntPtr plPtr, IntPtr callbacks, IntPtr userDataPtr);
+ };
+}
View
167 SpotiFire.LibSpotify/Playlistcontainer.cpp
@@ -0,0 +1,167 @@
+#include "stdafx.h"
+
+#include "Playlistcontainer.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+using namespace System::Runtime::InteropServices;
+#define SP_STRING(str) (char *)(void *)Marshal::StringToHGlobalAnsi(str)
+#define SP_FREE(str) Marshal::FreeHGlobal((IntPtr)(void *)str)
+
+int SpotiFire::Playlistcontainer::add_callbacks(IntPtr pcPtr, IntPtr callbacksPtr, IntPtr userDataPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ sp_playlistcontainer_callbacks* callbacks = SP_TYPE(sp_playlistcontainer_callbacks, callbacksPtr);
+
+ return (int)sp_playlistcontainer_add_callbacks(pc, callbacks, userData);
+}
+
+int SpotiFire::Playlistcontainer::remove_callbacks(IntPtr pcPtr, IntPtr callbacksPtr, IntPtr userDataPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ sp_playlistcontainer_callbacks* callbacks = SP_TYPE(sp_playlistcontainer_callbacks, callbacksPtr);
+
+ return (int)sp_playlistcontainer_remove_callbacks(pc, callbacks, userData);
+}
+
+Int32 SpotiFire::Playlistcontainer::num_playlists(IntPtr pcPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (Int32)sp_playlistcontainer_num_playlists(pc);
+}
+
+Boolean SpotiFire::Playlistcontainer::is_loaded(IntPtr pcPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (Boolean)sp_playlistcontainer_is_loaded(pc);
+}
+
+IntPtr SpotiFire::Playlistcontainer::playlist(IntPtr pcPtr, Int32 index)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (IntPtr)(void *)sp_playlistcontainer_playlist(pc, index);
+}
+
+int SpotiFire::Playlistcontainer::playlist_type(IntPtr pcPtr, Int32 index)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (int)sp_playlistcontainer_playlist_type(pc, index);
+}
+
+String^ SpotiFire::Playlistcontainer::playlist_folder_name(IntPtr pcPtr, Int32 index)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ int length = 256;
+ char* buffer = new char[length];
+
+ int actualLength = sp_playlistcontainer_playlist_folder_name(pc, index, buffer, length);
+ if(actualLength >= length) {
+ length = actualLength + 1;
+ delete buffer;
+ buffer = new char[length];
+ sp_playlistcontainer_playlist_folder_name(pc, index, buffer, length);
+ }
+
+ String^ ret = gcnew String(buffer);
+ delete buffer;
+ return ret;
+}
+
+UInt64 SpotiFire::Playlistcontainer::playlist_folder_id(IntPtr pcPtr, Int32 index)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (UInt64)sp_playlistcontainer_playlist_folder_id(pc, index);
+}
+
+IntPtr SpotiFire::Playlistcontainer::add_new_playlist(IntPtr pcPtr, String^ name)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ char* _name = SP_STRING(name);
+
+ IntPtr ret = (IntPtr)(void *)sp_playlistcontainer_add_new_playlist(pc, _name);
+ SP_FREE(_name);
+ return ret;
+}
+
+IntPtr SpotiFire::Playlistcontainer::add_playlist(IntPtr pcPtr, IntPtr linkPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_playlistcontainer_add_playlist(pc, link);
+}
+
+int SpotiFire::Playlistcontainer::remove_playlist(IntPtr pcPtr, Int32 index)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (int)sp_playlistcontainer_remove_playlist(pc, index);
+}
+
+int SpotiFire::Playlistcontainer::move_playlist(IntPtr pcPtr, Int32 index, Int32 newPosition, Boolean dryRun)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (int)sp_playlistcontainer_move_playlist(pc, index, newPosition, dryRun);
+}
+
+int SpotiFire::Playlistcontainer::add_folder(IntPtr pcPtr, Int32 index, String^ name)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ char* _name = SP_STRING(name);
+
+ int ret = (int)sp_playlistcontainer_add_folder(pc, index, _name);
+ SP_FREE(_name);
+ return ret;
+}
+
+IntPtr SpotiFire::Playlistcontainer::owner(IntPtr pcPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (IntPtr)(void *)sp_playlistcontainer_owner(pc);
+}
+
+int SpotiFire::Playlistcontainer::add_ref(IntPtr pcPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (int)sp_playlistcontainer_add_ref(pc);
+}
+
+int SpotiFire::Playlistcontainer::release(IntPtr pcPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+
+ return (int)sp_playlistcontainer_release(pc);
+}
+
+array<IntPtr>^ SpotiFire::Playlistcontainer::get_unseen_tracks(IntPtr pcPtr, IntPtr plPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+ int count = sp_playlistcontainer_get_unseen_tracks(pc, pl, NULL, 0);
+ sp_track** tracks = new sp_track*[count];
+ sp_playlistcontainer_get_unseen_tracks(pc, pl, tracks, count);
+
+ array<IntPtr>^ ret = gcnew array<IntPtr>(count);
+ Marshal::Copy((IntPtr)(void *)tracks, ret, 0, count);
+ delete tracks;
+ return ret;
+}
+
+Int32 SpotiFire::Playlistcontainer::clear_unseen_tracks(IntPtr pcPtr, IntPtr plPtr)
+{
+ sp_playlistcontainer* pc = SP_TYPE(sp_playlistcontainer, pcPtr);
+ sp_playlist* pl = SP_TYPE(sp_playlist, plPtr);
+
+ return (Int32)sp_playlistcontainer_clear_unseen_tracks(pc, pl);
+}
+
View
32 SpotiFire.LibSpotify/Playlistcontainer.h
@@ -0,0 +1,32 @@
+// Playlistcontainer.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Playlistcontainer
+ {
+ internal:
+ static int add_callbacks(IntPtr pcPtr, IntPtr callbacks, IntPtr userDataPtr);
+ static int remove_callbacks(IntPtr pcPtr, IntPtr callbacks, IntPtr userDataPtr);
+ static Int32 num_playlists(IntPtr pcPtr);
+ static Boolean is_loaded(IntPtr pcPtr);
+ static IntPtr playlist(IntPtr pcPtr, Int32 index);
+ static int playlist_type(IntPtr pcPtr, Int32 index);
+ static String^ playlist_folder_name(IntPtr pcPtr, Int32 index);
+ static UInt64 playlist_folder_id(IntPtr pcPtr, Int32 index);
+ static IntPtr add_new_playlist(IntPtr pcPtr, String^ name);
+ static IntPtr add_playlist(IntPtr pcPtr, IntPtr linkPtr);
+ static int remove_playlist(IntPtr pcPter, Int32 index);
+ static int move_playlist(IntPtr pcPtr, Int32 index, Int32 newPosition, Boolean dryRun);
+ static int add_folder(IntPtr pcPtr, Int32 index, String^ name);
+ static IntPtr owner(IntPtr pcPtr);
+ static int add_ref(IntPtr pcPtr);
+ static int release(IntPtr pcPtr);
+ static array<IntPtr>^ get_unseen_tracks(IntPtr pcPtr, IntPtr plPtr);
+ static Int32 clear_unseen_tracks(IntPtr pcPtr, IntPtr plPtr);
+ };
+}
View
38 SpotiFire.LibSpotify/ReadMe.txt
@@ -0,0 +1,38 @@
+========================================================================
+ DYNAMIC LINK LIBRARY : SpotiFire.LibSpotify Project Overview
+========================================================================
+
+AppWizard has created this SpotiFire.LibSpotify DLL for you.
+
+This file contains a summary of what you will find in each of the files that
+make up your SpotiFire.LibSpotify application.
+
+SpotiFire.LibSpotify.vcxproj
+ This is the main project file for VC++ projects generated using an Application Wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+SpotiFire.LibSpotify.vcxproj.filters
+ This is the filters file for VC++ projects generated using an Application Wizard.
+ It contains information about the association between the files in your project
+ and the filters. This association is used in the IDE to show grouping of files with
+ similar extensions under a specific node (for e.g. ".cpp" files are associated with the
+ "Source Files" filter).
+
+SpotiFire.LibSpotify.cpp
+ This is the main DLL source file.
+
+SpotiFire.LibSpotify.h
+ This file contains a class declaration.
+
+AssemblyInfo.cpp
+ Contains custom attributes for modifying assembly metadata.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////
View
162 SpotiFire.LibSpotify/Search.cpp
@@ -0,0 +1,162 @@
+#include "stdafx.h"
+
+#include "Search.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+using namespace System::Runtime::InteropServices;
+#define SP_STRING(str) (char *)(void *)Marshal::StringToHGlobalAnsi(str)
+#define SP_FREE(str) Marshal::FreeHGlobal((IntPtr)(void *)str)
+
+Int32 SpotiFire::Search::num_artists(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_num_artists(search);
+}
+
+IntPtr SpotiFire::Search::artist(IntPtr searchPtr, Int32 index)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (IntPtr)(void *)sp_search_artist(search, index);
+}
+
+String^ SpotiFire::Search::query(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return gcnew String(sp_search_query(search));
+}
+
+String^ SpotiFire::Search::did_you_mean(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return gcnew String(sp_search_did_you_mean(search));
+}
+
+Int32 SpotiFire::Search::total_tracks(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_total_tracks(search);
+}
+
+Int32 SpotiFire::Search::total_albums(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_total_albums(search);
+}
+
+Int32 SpotiFire::Search::total_artists(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_total_artists(search);
+}
+
+Int32 SpotiFire::Search::total_playlists(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_total_playlists(search);
+}
+
+int SpotiFire::Search::add_ref(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (int)sp_search_add_ref(search);
+}
+
+int SpotiFire::Search::release(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (int)sp_search_release(search);
+}
+
+IntPtr SpotiFire::Search::create(IntPtr sessionPtr, String^ query, Int32 trackOffset, Int32 trackCount, Int32 albumOffset, Int32 albumCount, Int32 artistOffset, Int32 artistCount, Int32 playlistOffset, Int32 playlistCount, int type, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ search_complete_cb* callback = SP_TYPE(search_complete_cb, callbackPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ char* _query = SP_STRING(query);
+
+ IntPtr ret = (IntPtr)(void *)sp_search_create(session, _query, trackOffset, trackCount, albumOffset, albumCount, artistOffset, artistCount, playlistOffset, playlistCount, (sp_search_type)type, callback, userData);
+ SP_FREE(_query);
+ return ret;
+}
+
+Boolean SpotiFire::Search::is_loaded(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Boolean)sp_search_is_loaded(search);
+}
+
+int SpotiFire::Search::error(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (int)sp_search_error(search);
+}
+
+Int32 SpotiFire::Search::num_tracks(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_num_tracks(search);
+}
+
+IntPtr SpotiFire::Search::track(IntPtr searchPtr, Int32 index)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (IntPtr)(void *)sp_search_track(search, index);
+}
+
+Int32 SpotiFire::Search::num_albums(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_num_albums(search);
+}
+
+IntPtr SpotiFire::Search::album(IntPtr searchPtr, Int32 index)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (IntPtr)(void *)sp_search_album(search, index);
+}
+
+Int32 SpotiFire::Search::num_playlists(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (Int32)sp_search_num_playlists(search);
+}
+
+String^ SpotiFire::Search::playlist_name(IntPtr searchPtr, Int32 index)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return gcnew String(sp_search_playlist_name(search, index));
+}
+
+String^ SpotiFire::Search::playlist_uri(IntPtr searchPtr, Int32 index)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return gcnew String(sp_search_playlist_uri(search, index));
+}
+
+String^ SpotiFire::Search::playlist_image_uri(IntPtr searchPtr, Int32 index)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return gcnew String(sp_search_playlist_image_uri(search, index));
+}
+
View
35 SpotiFire.LibSpotify/Search.h
@@ -0,0 +1,35 @@
+// Search.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Search
+ {
+ internal:
+ static Int32 num_artists(IntPtr searchPtr);
+ static IntPtr artist(IntPtr searchPtr, Int32 index);
+ static String^ query(IntPtr searchPtr);
+ static String^ did_you_mean(IntPtr searchPtr);
+ static Int32 total_tracks(IntPtr searchPtr);
+ static Int32 total_albums(IntPtr searchPtr);
+ static Int32 total_artists(IntPtr searchPtr);
+ static Int32 total_playlists(IntPtr searchPtr);
+ static int add_ref(IntPtr searchPtr);
+ static int release(IntPtr searchPtr);
+ static IntPtr create(IntPtr sessionPtr, String^ query, Int32 trackOffset, Int32 trackCount, Int32 albumOffset, Int32 albumCount, Int32 artistOffset, Int32 artistCount, Int32 playlistOffset, Int32 playlistCount, int type, IntPtr callbackPtr, IntPtr userDataPtr);
+ static Boolean is_loaded(IntPtr searchPtr);
+ static int error(IntPtr searchPtr);
+ static Int32 num_tracks(IntPtr searchPtr);
+ static IntPtr track(IntPtr searchPtr, Int32 index);
+ static Int32 num_albums(IntPtr searchPtr);
+ static IntPtr album(IntPtr searchPtr, Int32 index);
+ static Int32 num_playlists(IntPtr searchPtr);
+ static String^ playlist_name(IntPtr searchPtr, Int32 index);
+ static String^ playlist_uri(IntPtr searchPtr, Int32 index);
+ static String^ playlist_image_uri(IntPtr searchPtr, Int32 index);
+ };
+}
View
576 SpotiFire.LibSpotify/Session.cpp
@@ -0,0 +1,576 @@
+#include "stdafx.h"
+
+#include "Session.h"
+#include "include\libspotify\api.h"
+#define SP_TYPE(type_name, ptrPtr) (type_name *)(void *)ptrPtr
+
+using namespace System::Runtime::InteropServices;
+#define SP_STRING(str) (char *)(void *)Marshal::StringToHGlobalAnsi(str)
+#define SP_FREE(str) Marshal::FreeHGlobal((IntPtr)(void *)str)
+
+Int32 SpotiFire::Session::offline_num_playlists(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (Int32)sp_offline_num_playlists(session);
+}
+
+Boolean SpotiFire::Session::offline_sync_get_status(IntPtr sessionPtr, int& status)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_offline_sync_status *stat = SP_TYPE(sp_offline_sync_status, &status);
+
+ return (Boolean)sp_offline_sync_get_status(session, stat);
+}
+
+Int32 SpotiFire::Session::offline_time_left(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (Int32)sp_offline_time_left(session);
+}
+
+Int32 SpotiFire::Session::user_country(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (Int32)sp_session_user_country(session);
+}
+
+int SpotiFire::Session::player_play(IntPtr sessionPtr, Boolean play)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_player_play(session, play);
+}
+
+int SpotiFire::Session::player_unload(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_player_unload(session);
+}
+
+int SpotiFire::Session::player_prefetch(IntPtr sessionPtr, IntPtr trackPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_track* track = SP_TYPE(sp_track, trackPtr);
+
+ return (int)sp_session_player_prefetch(session, track);
+}
+
+IntPtr SpotiFire::Session::playlistcontainer(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (IntPtr)(void *)sp_session_playlistcontainer(session);
+}
+
+IntPtr SpotiFire::Session::inbox_create(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (IntPtr)(void *)sp_session_inbox_create(session);
+}
+
+IntPtr SpotiFire::Session::starred_create(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (IntPtr)(void *)sp_session_starred_create(session);
+}
+
+IntPtr SpotiFire::Session::starred_for_user_create(IntPtr sessionPtr, String^ canonicalUsername)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ char *_username = SP_STRING(canonicalUsername);
+
+ IntPtr ret = (IntPtr)(void *)sp_session_starred_for_user_create(session, _username);
+ SP_FREE(_username);
+ return ret;
+}
+
+IntPtr SpotiFire::Session::publishedcontainer_for_user_create(IntPtr sessionPtr, String^ canonicalUsername)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ char *_username = SP_STRING(canonicalUsername);
+
+ IntPtr ret = (IntPtr)(void *)sp_session_publishedcontainer_for_user_create(session, _username);
+ SP_FREE(_username);
+ return ret;
+}
+
+int SpotiFire::Session::preferred_bitrate(IntPtr sessionPtr, int bitrate)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_preferred_bitrate(session, (sp_bitrate)bitrate);
+}
+
+int SpotiFire::Session::preferred_offline_bitrate(IntPtr sessionPtr, int bitrate, Boolean allowResync)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_preferred_offline_bitrate(session, (sp_bitrate)bitrate, allowResync);
+}
+
+Boolean SpotiFire::Session::get_volume_normalization(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (Boolean)sp_session_get_volume_normalization(session);
+}
+
+int SpotiFire::Session::set_volume_normalization(IntPtr sessionPtr, Boolean on)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_set_volume_normalization(session, on);
+}
+
+int SpotiFire::Session::set_private_session(IntPtr sessionPtr, Boolean enabled)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_set_private_session(session, enabled);
+}
+
+Boolean SpotiFire::Session::is_private_session(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (Boolean)sp_session_is_private_session(session);
+}
+
+int SpotiFire::Session::set_scrobbling(IntPtr sessionPtr, int provider, int state)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_set_scrobbling(session, (sp_social_provider)provider, (sp_scrobbling_state)state);
+}
+
+int SpotiFire::Session::is_scrobbling(IntPtr sessionPtr, int provider, int& state)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_scrobbling_state* s = SP_TYPE(sp_scrobbling_state, state);
+
+ return (int)sp_session_is_scrobbling(session, (sp_social_provider)provider, s);
+}
+
+int SpotiFire::Session::is_scrobbling_possible(IntPtr sessionPtr, int provider, Boolean& isPossible)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_is_scrobbling_possible(session, (sp_social_provider)provider, &isPossible);
+}
+
+int SpotiFire::Session::set_social_credentials(IntPtr sessionPtr, int provider, String^ username, String^ password)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ char* _username = SP_STRING(username);
+ char *_password = SP_STRING(password);
+
+ int ret = (int)sp_session_set_social_credentials(session, (sp_social_provider)provider, _username, _password);
+ SP_FREE(_username);
+ SP_FREE(_password);
+ return ret;
+}
+
+int SpotiFire::Session::set_connection_type(IntPtr sessionPtr, int type)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_set_connection_type(session, (sp_connection_type)type);
+}
+
+int SpotiFire::Session::set_connection_rules(IntPtr sessionPtr, int rules)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_set_connection_rules(session, (sp_connection_rules)rules);
+}
+
+Int32 SpotiFire::Session::offline_tracks_to_sync(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (Int32)sp_offline_tracks_to_sync(session);
+}
+
+int SpotiFire::Session::link_release(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (int)sp_link_release(link);
+}
+
+int SpotiFire::Session::create(IntPtr configPtr, IntPtr& sessionPtr)
+{
+ sp_session_config* config = SP_TYPE(sp_session_config, configPtr);
+ sp_session* session;
+
+ int ret = (int)sp_session_create(config, &session);
+ sessionPtr = (IntPtr)(void *)session;
+ return ret;
+}
+
+int SpotiFire::Session::release(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_release(session);
+}
+
+int SpotiFire::Session::login(IntPtr sessionPtr, String^ username, String^ password, Boolean rememberMe, String^ blob)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ char* _uname = SP_STRING(username);
+ char *_pw = SP_STRING(password);
+ char *_blob = SP_STRING(blob);
+
+ int ret = (int)sp_session_login(session, _uname, _pw, rememberMe, _blob);
+ SP_FREE(_uname);
+ SP_FREE(_pw);
+ SP_FREE(_blob);
+ return ret;
+}
+
+int SpotiFire::Session::relogin(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_relogin(session);
+}
+
+String^ SpotiFire::Session::remembered_user(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ int size = sp_session_remembered_user(session, NULL, 0) + 1;
+ char* buffer = new char[size];
+ sp_session_remembered_user(session, buffer, size);
+
+ String^ ret = gcnew String(buffer);
+ delete buffer;
+ return ret;
+}
+
+String^ SpotiFire::Session::user_name(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return gcnew String(sp_session_user_name(session));
+}
+
+int SpotiFire::Session::forget_me(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_forget_me(session);
+}
+
+IntPtr SpotiFire::Session::user(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (IntPtr)(void *)sp_session_user(session);
+}
+
+int SpotiFire::Session::logout(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_logout(session);
+}
+
+int SpotiFire::Session::flush_caches(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_flush_caches(session);
+}
+
+int SpotiFire::Session::connectionstate(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_connectionstate(session);
+}
+
+IntPtr SpotiFire::Session::userdata(IntPtr sessionPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (IntPtr)(void *)sp_session_userdata(session);
+}
+
+int SpotiFire::Session::set_cache_size(IntPtr sessionPtr, Int32 size)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_set_cache_size(session, size);
+}
+
+int SpotiFire::Session::process_events(IntPtr sessionPtr, Int32& nextTimeout)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_process_events(session, &nextTimeout);
+}
+
+int SpotiFire::Session::player_load(IntPtr sessionPtr, IntPtr trackPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ sp_track* track = SP_TYPE(sp_track, trackPtr);
+
+ return (int)sp_session_player_load(session, track);
+}
+
+int SpotiFire::Session::player_seek(IntPtr sessionPtr, Int32 offset)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+
+ return (int)sp_session_player_seek(session, offset);
+}
+
+IntPtr SpotiFire::Session::link_create_from_string(String^ link)
+{
+ char* _link = SP_STRING(link);
+
+ IntPtr ret = (IntPtr)(void *)sp_link_create_from_string(_link);
+ SP_FREE(_link);
+ return ret;
+}
+
+IntPtr SpotiFire::Session::link_create_from_track(IntPtr trackPtr, Int32 offset)
+{
+ sp_track* track = SP_TYPE(sp_track, trackPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_track(track, offset);
+}
+
+IntPtr SpotiFire::Session::link_create_from_album(IntPtr albumPtr)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_album(album);
+}
+
+IntPtr SpotiFire::Session::link_create_from_album_cover(IntPtr albumPtr, int size)
+{
+ sp_album* album = SP_TYPE(sp_album, albumPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_album_cover(album, (sp_image_size)size);
+}
+
+IntPtr SpotiFire::Session::link_create_from_artist(IntPtr artistPtr)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_artist(artist);
+}
+
+IntPtr SpotiFire::Session::link_create_from_artist_portrait(IntPtr artistPtr, int size)
+{
+ sp_artist* artist = SP_TYPE(sp_artist, artistPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_artist_portrait(artist, (sp_image_size)size);
+}
+
+IntPtr SpotiFire::Session::link_create_from_artistbrowse_portrait(IntPtr artistPtr, Int32 index)
+{
+ sp_artistbrowse* artist = SP_TYPE(sp_artistbrowse, artistPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_artistbrowse_portrait(artist, index);
+}
+
+IntPtr SpotiFire::Session::link_create_from_search(IntPtr searchPtr)
+{
+ sp_search* search = SP_TYPE(sp_search, searchPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_search(search);
+}
+
+IntPtr SpotiFire::Session::link_create_from_playlist(IntPtr playlistPtr)
+{
+ sp_playlist* playlist = SP_TYPE(sp_playlist, playlistPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_playlist(playlist);
+}
+
+IntPtr SpotiFire::Session::link_create_from_user(IntPtr userPtr)
+{
+ sp_user* user = SP_TYPE(sp_user, userPtr);
+
+ return (IntPtr)(void *)sp_link_create_from_user(user);
+}
+
+IntPtr SpotiFire::Session::link_create_from_image(IntPtr imagePtr)
+{
+ sp_image* image = SP_TYPE(sp_image, imagePtr);
+
+ return (IntPtr)(void *)sp_link_create_from_image(image);
+}
+
+String^ SpotiFire::Session::link_as_string(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+ int length = sp_link_as_string(link, NULL, 0) + 1;
+ char* buffer = new char[length];
+ sp_link_as_string(link, buffer, length);
+
+ String^ ret = gcnew String(buffer);
+ delete buffer;
+ return ret;
+}
+
+int SpotiFire::Session::link_type(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (int)sp_link_type(link);
+}
+
+IntPtr SpotiFire::Session::link_as_track(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_link_as_track(link);
+}
+
+IntPtr SpotiFire::Session::link_as_track_and_offset(IntPtr linkPtr, Int32& offset)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_link_as_track_and_offset(link, &offset);
+}
+
+IntPtr SpotiFire::Session::link_as_album(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_link_as_album(link);
+}
+
+IntPtr SpotiFire::Session::link_as_artist(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_link_as_artist(link);
+}
+
+IntPtr SpotiFire::Session::link_as_user(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (IntPtr)(void *)sp_link_as_user(link);
+}
+
+int SpotiFire::Session::link_add_ref(IntPtr linkPtr)
+{
+ sp_link* link = SP_TYPE(sp_link, linkPtr);
+
+ return (int)sp_link_add_ref(link);
+}
+
+IntPtr SpotiFire::Session::localtrack_create(String^ artist, String^ title, String^ album, Int32 length)
+{
+ char *_a = SP_STRING(artist),
+ *_t = SP_STRING(title),
+ *_al = SP_STRING(album);
+
+ IntPtr ret = (IntPtr)(void *)sp_localtrack_create(_a, _t, _al, length);
+ SP_FREE(_a);
+ SP_FREE(_t);
+ SP_FREE(_al);
+ return ret;
+}
+
+IntPtr SpotiFire::Session::toplistbrowse_create(IntPtr sessionPtr, int type, int region, String^ username, IntPtr callbackPtr, IntPtr userDataPtr)
+{
+ sp_session* session = SP_TYPE(sp_session, sessionPtr);
+ toplistbrowse_complete_cb* callback = SP_TYPE(toplistbrowse_complete_cb, callbackPtr);
+ void* userData = SP_TYPE(void, userDataPtr);
+ char* _u = SP_STRING(username);
+
+ IntPtr ret = (IntPtr)(void *)sp_toplistbrowse_create(session, (sp_toplisttype)type, (sp_toplistregion)region, _u, callback, userData);
+ SP_FREE(_u);
+ return ret;
+}
+
+Boolean SpotiFire::Session::toplistbrowse_is_loaded(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (Boolean)sp_toplistbrowse_is_loaded(tlb);
+}
+
+int SpotiFire::Session::toplistbrowse_error(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (int)sp_toplistbrowse_error(tlb);
+}
+
+int SpotiFire::Session::toplistbrowse_add_ref(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (int)sp_toplistbrowse_add_ref(tlb);
+}
+
+int SpotiFire::Session::toplistbrowse_release(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (int)sp_toplistbrowse_release(tlb);
+}
+
+Int32 SpotiFire::Session::toplistbrowse_num_artists(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (Int32)sp_toplistbrowse_num_artists(tlb);
+}
+
+IntPtr SpotiFire::Session::toplistbrowse_artist(IntPtr tlbPtr, Int32 index)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (IntPtr)(void *)sp_toplistbrowse_artist(tlb, index);
+}
+
+Int32 SpotiFire::Session::toplistbrowse_num_albums(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (Int32)sp_toplistbrowse_num_albums(tlb);
+}
+
+IntPtr SpotiFire::Session::toplistbrowse_album(IntPtr tlbPtr, Int32 index)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (IntPtr)(void *)sp_toplistbrowse_album(tlb, index);
+}
+
+Int32 SpotiFire::Session::toplistbrowse_num_tracks(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (Int32)sp_toplistbrowse_num_tracks(tlb);
+}
+
+IntPtr SpotiFire::Session::toplistbrowse_track(IntPtr tlbPtr, Int32 index)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (IntPtr)(void *)sp_toplistbrowse_track(tlb, index);
+}
+
+Int32 SpotiFire::Session::toplistbrowse_backend_request_duration(IntPtr tlbPtr)
+{
+ sp_toplistbrowse* tlb = SP_TYPE(sp_toplistbrowse, tlbPtr);
+
+ return (Int32)sp_toplistbrowse_backend_request_duration(tlb);
+}
+
View
88 SpotiFire.LibSpotify/Session.h
@@ -0,0 +1,88 @@
+// Session.h
+
+#pragma once
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace SpotiFire {
+
+ public ref class Session
+ {
+ internal:
+ static Int32 offline_num_playlists(IntPtr sessionPtr);
+ static Boolean offline_sync_get_status(IntPtr sessionPtr, int& status);
+ static Int32 offline_time_left(IntPtr sessionPtr);
+ static Int32 user_country(IntPtr sessionPtr);
+ static int player_play(IntPtr sessionPtr, Boolean play);
+ static int player_unload(IntPtr sessionPtr);
+ static int player_prefetch(IntPtr sessionPtr, IntPtr trackPtr);
+ static IntPtr playlistcontainer(IntPtr sessionPtr);
+ static IntPtr inbox_create(IntPtr sessionPtr);
+ static IntPtr starred_create(IntPtr sessionPtr);
+ static IntPtr starred_for_user_create(IntPtr sessionPtr, String^ canonicalUsername);
+ static IntPtr publishedcontainer_for_user_create(IntPtr sessionPtr, String^ canonicalUsername);
+ static int preferred_bitrate(IntPtr sessionPtr, int bitrate);
+ static int preferred_offline_bitrate(IntPtr sessionPtr, int bitrate, Boolean allowResync);
+ static Boolean get_volume_normalization(IntPtr sessionPtr);
+ static int set_volume_normalization(IntPtr sessionPtr, Boolean on);
+ static int set_private_session(IntPtr sessionPtr, Boolean enabled);
+ static Boolean is_private_session(IntPtr sessionPtr);
+ static int set_scrobbling(IntPtr sessionPtr, int provider, int state);
+ static int is_scrobbling(IntPtr sessionPtr, int provider, int& state);
+ static int is_scrobbling_possible(IntPtr sessionPtr, int provider, Boolean& isPossible);
+ static int set_social_credentials(IntPtr sessionPtr, int provider, String^ username, String^ password);
+ static int set_connection_type(IntPtr sessionPtr, int type);
+ static int set_connection_rules(IntPtr sessionPtr, int rules);
+ static Int32 offline_tracks_to_sync(IntPtr sessionPtr);
+ static int link_release(IntPtr linkPtr);
+ static int create(IntPtr configPtr, IntPtr& sessionPtr);
+ static int release(IntPtr sessionPtr);
+ static int login(IntPtr sessionPtr, String^ username, String^ password, Boolean rememberMe, String^ blob);
+ static int relogin(IntPtr sessionPtr);
+ static String^ remembered_user(IntPtr sessionPtr);
+ static String^ user_name(IntPtr sessionPtr);
+ static int forget_me(IntPtr sessionPtr);
+ static IntPtr user(IntPtr sessionPtr);
+ static int logout(IntPtr sessionPtr);
+ static int flush_caches(IntPtr sessionPtr);
+ static int connectionstate(IntPtr sessionPtr);
+ static IntPtr userdata(IntPtr sessionPtr);
+ static int set_cache_size(IntPtr sessionPtr, Int32 size);
+ static int process_events(IntPtr sessionPtr, Int32& nextTimeout);
+ static int player_load(IntPtr sessionPtr, IntPtr trackPtr);
+ static int player_seek(IntPtr sessionPtr, Int32 offset);
+ static IntPtr link_create_from_string(String^ link);
+ static IntPtr link_create_from_track(IntPtr trackPtr, Int32 offset);
+ static IntPtr link_create_from_album(IntPtr albumPtr);
+ static IntPtr link_create_from_album_cover(IntPtr albumPtr, int size);
+ static IntPtr link_create_from_artist(IntPtr artistPtr);
+ static IntPtr link_create_from_artist_portrait(IntPtr artistPtr, int size);
+ static IntPtr link_create_from_artistbrowse_portrait(IntPtr artistPtr, Int32 index);
+ static IntPtr link_create_from_search(IntPtr searchPtr);
+ static IntPtr link_create_from_playlist(IntPtr playlistPtr);
+ static IntPtr link_create_from_user(IntPtr userPtr);
+ static IntPtr link_create_from_image(IntPtr imagePtr);
+ static String^ link_as_string(IntPtr linkPtr);
+ static int link_type(IntPtr linkPtr);
+ static IntPtr link_as_track(IntPtr linkPtr);
+ static IntPtr link_as_track_and_offset(IntPtr linkPtr, Int32& offset);
+ static IntPtr link_as_album(IntPtr linkPtr);
+ static IntPtr link_as_artist(IntPtr linkPtr);
+ static IntPtr link_as_user(IntPtr linkPtr);
+ static int link_add_ref(IntPtr linkPtr);
+ static IntPtr localtrack_create(String^ artist, String^ title, String^ album, Int32 length);
+ static IntPtr toplistbrowse_create(IntPtr sessionPtr, int type, int region, String^ username, IntPtr callbackPtr, IntPtr userDataPtr);
+ static Boolean toplistbrowse_is_loaded(IntPtr tlbPtr);
+ static int toplistbrowse_error(IntPtr tlbPtr);
+ static int toplistbrowse_add_ref(IntPtr tlbPtr);
+ static int toplistbrowse_release(IntPtr tlbPtr);
+ static Int32 toplistbrowse_num_artists(IntPtr tlbPtr);
+ static IntPtr toplistbrowse_artist(IntPtr tlbPtr, Int32 index);
+ static Int32 toplistbrowse_num_albums(IntPtr tlbPtr);
+ static IntPtr toplistbrowse_album(IntPtr tlbPtr, Int32 index);
+ static Int32 toplistbrowse_num_tracks(IntPtr tlbPtr);
+ static IntPtr toplistbrowse_track(IntPtr tlbPtr, Int32 index);
+ static Int32 toplistbrowse_backend_request_duration(IntPtr tlbPtr);
+ };
+}
View
127 SpotiFire.LibSpotify/SpotiFire.LibSpotify.vcxproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{3A193712-4AE2-4B7A-9ADF-139D3213E34B}</ProjectGuid>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <Keyword>ManagedCProj</Keyword>
+ <RootNamespace>SpotiFireLibSpotify</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v110</PlatformToolset>
+ <CLRSupport>true</CLRSupport>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v110</PlatformToolset>
+ <CLRSupport>true</CLRSupport>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>libspotify.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>$(SolutionDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies />
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Album.h" />
+ <ClInclude Include="Albumbrowse.h" />
+ <ClInclude Include="Artist.h" />
+ <ClInclude Include="Artistbrowse.h" />
+ <ClInclude Include="Image.h" />
+ <ClInclude Include="Inbox.h" />
+ <ClInclude Include="include\libspotify\api.h" />
+ <ClInclude Include="Playlist.h" />
+ <ClInclude Include="Playlistcontainer.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="Search.h" />
+ <ClInclude Include="Session.h" />
+ <ClInclude Include="Stdafx.h" />
+ <ClInclude Include="Track.h" />
+ <ClInclude Include="User.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Album.cpp" />
+ <ClCompile Include="Albumbrowse.cpp" />
+ <ClCompile Include="Artist.cpp" />
+ <ClCompile Include="Artistbrowse.cpp" />
+ <ClCompile Include="AssemblyInfo.cpp" />
+ <ClCompile Include="Image.cpp" />
+ <ClCompile Include="Inbox.cpp" />
+ <ClCompile Include="Playlist.cpp" />
+ <ClCompile Include="Playlistcontainer.cpp" />
+ <ClCompile Include="Search.cpp" />
+ <ClCompile Include="Session.cpp" />
+ <ClCompile Include="Stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="Track.cpp" />
+ <ClCompile Include="User.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="app.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="app.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
View
121 SpotiFire.LibSpotify/SpotiFire.LibSpotify.vcxproj.filters
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\libspotify\api.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="User.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Track.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Session.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Search.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Playlistcontainer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Playlist.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Inbox.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Image.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Artistbrowse.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Artist.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Albumbrowse.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Album.h">