1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#pragma once
#include <bfc/dispatch.h>
#include <api/service/services.h>
// {A32C39BC-CDF7-4c9b-9EA2-9DF7E0D651D2}
static const GUID iTunesImporterGUID =
{ 0xa32c39bc, 0xcdf7, 0x4c9b, { 0x9e, 0xa2, 0x9d, 0xf7, 0xe0, 0xd6, 0x51, 0xd2 } };
class api_itunes_importer : public Dispatchable
{
protected:
api_itunes_importer() {}
~api_itunes_importer() {}
public:
static FOURCC getServiceType() { return WaSvc::UNIQUE; }
static const char *getServiceName() { return "iTunes Importer Service"; }
static GUID getServiceGuid() { return iTunesImporterGUID; }
bool iTunesExists();
int ImportFromFile(HWND parent, const wchar_t *library_file);
int ImportFromiTunes(HWND parent);
int ImportPlaylistsFromiTunes(HWND parent);
enum
{
API_ITUNES_IMPORTER_ITUNESEXISTS = 0,
API_ITUNES_IMPORTER_IMPORTFROMFILE = 1,
API_ITUNES_IMPORTER_IMPORTFROMITUNES = 2,
API_ITUNES_IMPORTER_IMPORTPLAYLISTSFROMITUNES = 3,
};
};
inline bool api_itunes_importer::iTunesExists()
{
return _call(API_ITUNES_IMPORTER_ITUNESEXISTS, (bool)false);
}
inline int api_itunes_importer::ImportFromFile(HWND parent, const wchar_t *library_file)
{
return _call(API_ITUNES_IMPORTER_IMPORTFROMFILE, (int)DISPATCH_FAILURE, parent, library_file);
}
inline int api_itunes_importer::ImportFromiTunes(HWND parent)
{
return _call(API_ITUNES_IMPORTER_IMPORTFROMITUNES, (int)DISPATCH_FAILURE, parent);
}
inline int api_itunes_importer::ImportPlaylistsFromiTunes(HWND parent)
{
return _call(API_ITUNES_IMPORTER_IMPORTPLAYLISTSFROMITUNES, (int)DISPATCH_FAILURE, parent);
}
|