-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcovers.cpp
71 lines (51 loc) · 1.05 KB
/
covers.cpp
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* covers - Downloads cover images from Amazon.
*
* Copyright (c) 2019 pinc Software. All Rights Reserved.
*/
#include "covers.h"
#include <Application.h>
#include <Bitmap.h>
#include <DataIO.h>
#include <HttpRequest.h>
#include <TranslationUtils.h>
#include <regex.h>
#include <stdio.h>
#include "CoverWindow.h"
#include "Utility.h"
class CoversApplication : public BApplication {
public:
CoversApplication();
virtual ~CoversApplication();
virtual void MessageReceived(BMessage* message);
};
CoversApplication::CoversApplication()
:
BApplication("application/x-vnd.pinc-covers")
{
}
CoversApplication::~CoversApplication()
{
}
void
CoversApplication::MessageReceived(BMessage* message)
{
switch (message->what) {
case kMsgSelected:
case kMsgSkip:
message->PrintToStream();
break;
default:
BApplication::MessageReceived(message);
break;
}
}
// #pragma mark -
int
main()
{
CoversApplication application;
BWindow* window = new CoverWindow();
window->CenterOnScreen();
window->Show();
application.Run();
}