Raritan PX2/PX3 JSON-RPC API: pdu-json-rpc-api/idl/WebcamManager.idl Source File

Raritan PX2/PX3 JSON-RPC API

WebcamManager.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6 #include <WebcamChannel.idl>
7 #include <Event.idl>
8
9 /** Webcam Management */
10 module webcam {
11
12 /**
13 * Priority
14 */
15 enumeration Priority {
16 VERY_LOW, ///< very low
17 LOW, ///< low
18 NORMAL, ///< normal
19 HIGH, ///< high
20 VERY_HIGH ///< very high
21 };
22
23 /* event definitions */
24 /**
25 * Base type of all webcam event
26 */
27 valueobject WebcamEvent_1_0_1 extends idl.Event {
28 Webcam_2_0_1 webcam; ///< The webcam which was affected
29 Information_3_0_0 information; ///< Information about the camera
30 string name; ///< The user-assigned camera name
31 };
32
33 /**
34 * This event is emitted after a webcam was added
35 */
36 valueobject WebcamAddedEvent_1_0_1 extends WebcamEvent_1_0_1 {};
37
38 /**
39 * This event is emitted after a webcam has been removed
40 */
41 valueobject WebcamRemovedEvent_1_0_1 extends WebcamEvent_1_0_1 {};
42
43 /** The webcam manager interface */
44 interface WebcamManager_2_0_1 {
45
46 /**
47 * Error codes
48 */
49 constant int NO_ERROR = 0; ///< Operation successful, no error
50 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
51
52 /**
53 * Retrieve all connected webcams.
54 *
55 * @return List of webcams
56 */
57 vector<Webcam_2_0_1> getWebcams();
58
59 /**
60 * Returns an existing channel that is currently viewing the given webcam or creates one
61 * If the client type is unknown it's added to the list of client types.
62 *
63 * Note: When a new channel is created the priority of the given webcam and
64 * channel type is summed up. The result is used to determine the used overall priority.
65 *
66 * @param webcam webcam
67 * @param clientType the channel client type -> @ref getClientTypes()
68 * @param channel Result: The channel
69 *
70 * @return NO_ERROR on success
71 * @return ERR_INVALID_PARAM one of the parameters is invalid
72 */
73 int getChannel(in Webcam_2_0_1 webcam, in string clientType, out Channel_1_0_1 channel);
74
75 /**
76 * Returns all channels. Note: you need to release every unneeded channel
77 *
78 * @return List of all channels
79 */
80 vector<Channel_1_0_1> getChannels();
81
82 /**
83 * Remove a client type
84 *
85 * @param clientType client type
86 *
87 * @return NO_ERROR on success
88 * @return ERR_INVALID_PARAM one of the parameters is invalid
89 */
90 int removeClientType(in string clientType);
91
92 /**
93 * Get all known client types
94 *
95 * @return List of all client types
96 */
97 vector<string> getClientTypes();
98
99 /**
100 * Get the priority of all known client types
101 *
102 * @return a hash map with the key "event type ID" and the value "priority"
103 */
104 map<string, Priority> getClientTypePriorities();
105
106 /**
107 * Set the priority of a client type
108 *
109 * @param priorities a hash map with the key "event type ID" and the value "priority"
110 *
111 * @return NO_ERROR on success
112 * @return ERR_INVALID_PARAM one of the parameters is invalid
113 */
114 int setClientTypePriorities(in map<string, Priority> priorities);
115
116 /**
117 * Get the priority of a webcam
118 *
119 * @return a hash map with the key "webcam ID" and the value "priority"
120 */
121 map<string, Priority> getWebcamPriorities();
122
123 /**
124 * Set the priority of a webcam
125 *
126 * @param priorities a hash map with the key "webcam ID" and the value "priority"
127 *
128 * @return NO_ERROR on success
129 * @return ERR_INVALID_PARAM one of the parameters is invalid
130 */
131 int setWebcamPriorities(in map<string, Priority> priorities);
132
133 };
134 }
webcam::LOW
low
Definition: WebcamManager.idl:17
webcam::Information_3_0_0
Webcam information.
Definition: Webcam.idl:79
webcam::WebcamRemovedEvent_1_0_1
valueobject WebcamRemovedEvent_1_0_1
This event is emitted after a webcam has been removed.
Definition: WebcamManager.idl:41
webcam::Webcam_2_0_1
The webcam interface.
Definition: Webcam.idl:86
webcam::WebcamEvent_1_0_1
valueobject WebcamEvent_1_0_1
Base type of all webcam event.
Definition: WebcamManager.idl:28
webcam::NORMAL
normal
Definition: WebcamManager.idl:18
webcam::HIGH
high
Definition: WebcamManager.idl:19
idl
Basic IDL definitions.
Definition: Event.idl:10
webcam::WebcamManager_2_0_1
The webcam manager interface.
Definition: WebcamManager.idl:44
webcam::name
string name
The user-assigned camera name.
Definition: WebcamManager.idl:30
webcam::Channel_1_0_1
The channel interface.
Definition: WebcamChannel.idl:12
webcam::VERY_LOW
very low
Definition: WebcamManager.idl:16
webcam::information
Information_3_0_0 information
Information about the camera.
Definition: WebcamManager.idl:29
webcam
Webcam Management.
Definition: StorageManager.idl:10
webcam::Priority
Priority
Priority.
Definition: WebcamManager.idl:15
webcam::VERY_HIGH
very high
Definition: WebcamManager.idl:20