Raritan / Server Technology Xerus™ PDU 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 extends idl.Event {
28  Webcam webcam; ///< The webcam which was affected
29  Information 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 extends WebcamEvent {};
37 
38  /**
39  * This event is emitted after a webcam has been removed
40  */
41  valueobject WebcamRemovedEvent extends WebcamEvent {};
42 
43  /** The webcam manager interface */
44  interface WebcamManager {
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> 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 webcam, in string clientType, out Channel 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> 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 }
The channel interface.
Definition: WebcamChannel.idl:12
The webcam manager interface.
Definition: WebcamManager.idl:44
vector< Webcam > getWebcams()
Retrieve all connected webcams.
map< string, Priority > getClientTypePriorities()
Get the priority of all known client types.
vector< string > getClientTypes()
Get all known client types.
map< string, Priority > getWebcamPriorities()
Get the priority of a webcam.
int getChannel(in Webcam webcam, in string clientType, out Channel channel)
Returns an existing channel that is currently viewing the given webcam or creates one If the client t...
int setWebcamPriorities(in map< string, Priority > priorities)
Set the priority of a webcam.
int setClientTypePriorities(in map< string, Priority > priorities)
Set the priority of a client type.
int removeClientType(in string clientType)
Remove a client type.
vector< Channel > getChannels()
Returns all channels.
The webcam interface.
Definition: Webcam.idl:86
Basic IDL definitions.
Definition: Event.idl:10
Webcam Management.
Definition: StorageManager.idl:10
string name
The user-assigned camera name.
Definition: WebcamManager.idl:30
Priority
Priority.
Definition: WebcamManager.idl:15
@ VERY_HIGH
very high
Definition: WebcamManager.idl:20
@ LOW
low
Definition: WebcamManager.idl:17
@ VERY_LOW
very low
Definition: WebcamManager.idl:16
@ NORMAL
normal
Definition: WebcamManager.idl:18
@ HIGH
high
Definition: WebcamManager.idl:19
valueobject WebcamEvent
Base type of all webcam event.
Definition: WebcamManager.idl:28
valueobject WebcamAddedEvent
This event is emitted after a webcam was added.
Definition: WebcamManager.idl:31
Information information
Information about the camera.
Definition: WebcamManager.idl:29
valueobject WebcamRemovedEvent
This event is emitted after a webcam has been removed.
Definition: WebcamManager.idl:41
Webcam information.
Definition: Webcam.idl:79