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
72
73
|
/*
* xbmcclient.cpp
* xbmclauncher
*
* Created by Stephan Diederich on 17.09.08.
* Copyright 2008 Stephan Diederich. All rights reserved.
*
*/
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#import <Cocoa/Cocoa.h>
typedef enum{
ATV_BUTTON_DONT_USE_THIS = 0, //don't use zero, as those enums get converted to strings later
ATV_BUTTON_PLAY=1,
ATV_BUTTON_PLAY_H, //present on ATV>=2.2
ATV_BUTTON_RIGHT,
ATV_BUTTON_RIGHT_RELEASE,
ATV_BUTTON_RIGHT_H, //present on ATV<=2.1 and OSX v?
ATV_BUTTON_RIGHT_H_RELEASE,
ATV_BUTTON_LEFT,
ATV_BUTTON_LEFT_RELEASE,
ATV_BUTTON_LEFT_H, //present on ATV<=2.1 and OSX v?
ATV_BUTTON_LEFT_H_RELEASE,
ATV_BUTTON_UP,
ATV_BUTTON_UP_RELEASE,
ATV_BUTTON_DOWN,
ATV_BUTTON_DOWN_RELEASE,
ATV_BUTTON_MENU,
ATV_BUTTON_MENU_H,
ATV_LEARNED_PLAY,
ATV_LEARNED_PAUSE,
ATV_LEARNED_STOP,
ATV_LEARNED_PREVIOUS,
ATV_LEARNED_NEXT,
ATV_LEARNED_REWIND, //>=ATV 2.3
ATV_LEARNED_REWIND_RELEASE, //>=ATV 2.3
ATV_LEARNED_FORWARD, //>=ATV 2.3
ATV_LEARNED_FORWARD_RELEASE, //>=ATV 2.3
ATV_LEARNED_RETURN,
ATV_LEARNED_ENTER,
ATV_INVALID_BUTTON
} eATVClientEvent;
typedef enum {
DEFAULT_MODE,
UNIVERSAL_MODE,
MULTIREMOTE_MODE
} eRemoteMode;
@interface XBMCClientWrapper : NSObject{
struct XBMCClientWrapperImpl* mp_impl;
}
- (id) initWithMode:(eRemoteMode) f_mode serverAddress:(NSString*) fp_server verbose:(bool) f_verbose;
- (void) setUniversalModeTimeout:(double) f_timeout;
-(void) handleEvent:(eATVClientEvent) f_event;
-(void) switchRemote:(int) f_device_id;
- (void) enableVerboseMode:(bool) f_really;
@end
|