Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
805 | - | 1 | // /////////////////////////////////////////////////////////////////////////////// |
2 | // Copyright (C) 2010, Frank Blumenberg |
||
3 | // |
||
4 | // See License.txt for complete licensing and attribution information. |
||
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
||
6 | // of this software and associated documentation files (the "Software"), to deal |
||
7 | // in the Software without restriction, including without limitation the rights |
||
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||
9 | // copies of the Software, and to permit persons to whom the Software is |
||
10 | // furnished to do so, subject to the following conditions: |
||
11 | // |
||
12 | // The above copyright notice and this permission notice shall be included in all |
||
13 | // copies or substantial portions of the Software. |
||
14 | // |
||
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||
21 | // THE SOFTWARE. |
||
22 | // |
||
23 | // /////////////////////////////////////////////////////////////////////////////// |
||
24 | |||
25 | #import <Foundation/Foundation.h> |
||
26 | #import "MKConnection.h" |
||
27 | #import "MKDatatypes.h" |
||
28 | |||
29 | extern NSString * const MKConnectedNotification; |
||
30 | extern NSString * const MKDisconnectedNotification; |
||
31 | extern NSString * const MKDisconnectErrorNotification; |
||
32 | |||
33 | extern NSString * const MKVersionNotification; |
||
34 | extern NSString * const MKDebugDataNotification; |
||
35 | extern NSString * const MKDebugLabelNotification; |
||
36 | extern NSString * const MKLcdMenuNotification; |
||
37 | extern NSString * const MKLcdNotification; |
||
38 | |||
39 | extern NSString * const MKReadSettingNotification; |
||
40 | extern NSString * const MKWriteSettingNotification; |
||
41 | extern NSString * const MKChangeSettingNotification; |
||
42 | |||
43 | extern NSString * const MKChannelValuesNotification; |
||
44 | |||
45 | extern NSString * const MKReadMixerNotification; |
||
46 | extern NSString * const MKWriteMixerNotification; |
||
47 | |||
48 | extern NSString * const MKOsdNotification; |
||
49 | |||
50 | |||
51 | @class MKHost; |
||
52 | |||
53 | @interface MKConnectionController : NSObject<MKConnectionDelegate> { |
||
54 | |||
55 | NSObject<MKConnection> * inputController; |
||
56 | NSString * hostOrDevice; |
||
57 | BOOL didPostConnectNotification; |
||
58 | |||
59 | MKAddress primaryDevice; |
||
60 | MKAddress currentDevice; |
||
61 | |||
62 | NSString * shortVersions[3]; |
||
63 | NSString * longVersions[3]; |
||
64 | } |
||
65 | |||
66 | @property(readonly) MKAddress primaryDevice; |
||
67 | @property(assign,readonly) MKAddress currentDevice; |
||
68 | |||
69 | + (MKConnectionController *) sharedMKConnectionController; |
||
70 | |||
71 | - (void) start:(MKHost*)host; |
||
72 | - (void) stop; |
||
73 | |||
74 | - (BOOL) isRunning; |
||
75 | |||
76 | - (void) sendRequest:(NSData *)data; |
||
77 | |||
78 | - (BOOL) hasNaviCtrl; |
||
79 | - (void) activateNaviCtrl; |
||
80 | - (void) activateFlightCtrl; |
||
81 | - (void) activateMK3MAG; |
||
82 | - (void) activateMKGPS; |
||
83 | |||
84 | |||
85 | - (NSString *) shortVersionForAddress:(MKAddress)theAddress; |
||
86 | - (NSString *) longVersionForAddress:(MKAddress)theAddress; |
||
87 | |||
88 | |||
89 | @end |