OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import "oaidl.idl"; | 5 import "oaidl.idl"; |
6 import "ocidl.idl"; | 6 import "ocidl.idl"; |
7 | 7 |
8 typedef enum DaemonState { | |
9 DAEMON_STATE_STOPPED, | |
10 DAEMON_STATE_STARTING, | |
11 DAEMON_STATE_STARTED, | |
12 DAEMON_STATE_STOPPING | |
13 } DaemonState; | |
14 | |
15 [ | 8 [ |
16 object, | 9 object, |
17 uuid(e6c5f02a-2486-4bf0-b13f-f39be260b917), | 10 uuid(e6c5f02a-2486-4bf0-b13f-f39be260b917), |
18 dual, | 11 dual, |
19 nonextensible, | 12 nonextensible, |
20 helpstring("IDaemonControl Interface"), | 13 helpstring("IDaemonControl Interface"), |
21 pointer_default(unique) | 14 pointer_default(unique) |
22 ] | 15 ] |
23 interface IDaemonControl: IDispatch { | 16 interface IDaemonControl: IDispatch { |
24 [ propget, id(1), helpstring("Returns current state of the daemon.") ] | 17 [ id(1), helpstring("Reads the daemon configuration.") ] |
25 HRESULT State([out, retval] DaemonState* state_out); | 18 HRESULT GetConfig([out, retval] BSTR* config_out); |
26 | 19 |
27 [ id(2), helpstring("Reads the daemon configuration.") ] | 20 [ id(2), helpstring("Writes the daemon configuration.") ] |
28 HRESULT ReadConfig([out, retval] BSTR* config_out); | 21 HRESULT SetConfig([in] BSTR config); |
29 | 22 |
30 [ id(3), helpstring("Writes the daemon configuration.") ] | 23 [ id(3), helpstring("Starts the daemon.") ] |
31 HRESULT WriteConfig([in] BSTR config); | |
32 | |
33 [ id(4), helpstring("Starts the daemon.") ] | |
34 HRESULT StartDaemon(); | 24 HRESULT StartDaemon(); |
35 | 25 |
36 [ id(5), helpstring("Stops the daemon.") ] | 26 [ id(4), helpstring("Stops the daemon.") ] |
37 HRESULT StopDaemon(); | 27 HRESULT StopDaemon(); |
38 }; | 28 }; |
39 | 29 |
40 [ | 30 [ |
41 uuid(9d9a5a2c-576e-4acd-9c75-aabff74b205d), | 31 uuid(9d9a5a2c-576e-4acd-9c75-aabff74b205d), |
42 version(1.0), | 32 version(1.0), |
43 helpstring("Chromoting Elevated Controller 1.0 Type Library") | 33 helpstring("Chromoting Elevated Controller 1.0 Type Library") |
44 ] | 34 ] |
45 library ChromotingElevatedControllerLib { | 35 library ChromotingElevatedControllerLib { |
46 importlib("stdole2.tlb"); | 36 importlib("stdole2.tlb"); |
47 | 37 |
48 [ | 38 [ |
49 uuid(3ca3adb6-2dea-4c74-b267-610fef11e4ff), | |
50 dual, | |
51 helpstring("IDaemonEvents Interface") | |
52 ] | |
53 interface IDaemonEvents: IDispatch { | |
54 [ id(1), helpstring("method OnStateChange") ] | |
55 void OnStateChange([in] DaemonState state); | |
56 }; | |
57 | |
58 [ | |
59 uuid(430a9403-8176-4733-afdc-0b325a8fda84), | 39 uuid(430a9403-8176-4733-afdc-0b325a8fda84), |
60 helpstring("ElevatedController Class") | 40 helpstring("ElevatedController Class") |
61 ] | 41 ] |
62 coclass ElevatedController { | 42 coclass ElevatedController { |
63 [default] interface IDaemonControl; | 43 [default] interface IDaemonControl; |
64 [default, source] interface IDaemonEvents; | |
65 }; | 44 }; |
66 }; | 45 }; |
OLD | NEW |