Loading...
Searching...
No Matches
WebcamManager.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2011 Raritan Inc. All rights reserved.
*/
#include <WebcamChannel.idl>
#include <Event.idl>
/** Webcam Management */
module webcam {
/**
* Priority
*/
enumeration Priority {
VERY_LOW, ///< very low
LOW, ///< low
NORMAL, ///< normal
HIGH, ///< high
VERY_HIGH ///< very high
};
/* event definitions */
/**
* Base type of all webcam event
*/
valueobject WebcamEvent extends idl.Event {
Webcam webcam; ///< The webcam which was affected
Information information; ///< Information about the camera
string name; ///< The user-assigned camera name
};
/**
* This event is emitted after a webcam was added
*/
valueobject WebcamAddedEvent extends WebcamEvent {};
/**
* This event is emitted after a webcam has been removed
*/
valueobject WebcamRemovedEvent extends WebcamEvent {};
/** The webcam manager interface */
interface WebcamManager {
/**
* Error codes
*/
constant int NO_ERROR = 0; ///< Operation successful, no error
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
/**
* Retrieve all connected webcams.
*
* @return List of webcams
*/
vector<Webcam> getWebcams();
/**
* Returns an existing channel that is currently viewing the given webcam or creates one
* If the client type is unknown it's added to the list of client types.
*
* Note: When a new channel is created the priority of the given webcam and
* channel type is summed up. The result is used to determine the used overall priority.
*
* @param webcam webcam
* @param clientType the channel client type -> @ref getClientTypes()
* @param channel Result: The channel
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM one of the parameters is invalid
*/
int getChannel(in Webcam webcam, in string clientType, out Channel channel);
/**
* Returns all channels. Note: you need to release every unneeded channel
*
* @return List of all channels
*/
vector<Channel> getChannels();
/**
* Remove a client type
*
* @param clientType client type
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM one of the parameters is invalid
*/
int removeClientType(in string clientType);
/**
* Get all known client types
*
* @return List of all client types
*/
vector<string> getClientTypes();
/**
* Get the priority of all known client types
*
* @return a hash map with the key "event type ID" and the value "priority"
*/
map<string, Priority> getClientTypePriorities();
/**
* Set the priority of a client type
*
* @param priorities a hash map with the key "event type ID" and the value "priority"
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM one of the parameters is invalid
*/
int setClientTypePriorities(in map<string, Priority> priorities);
/**
* Get the priority of a webcam
*
* @return a hash map with the key "webcam ID" and the value "priority"
*/
map<string, Priority> getWebcamPriorities();
/**
* Set the priority of a webcam
*
* @param priorities a hash map with the key "webcam ID" and the value "priority"
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM one of the parameters is invalid
*/
int setWebcamPriorities(in map<string, Priority> priorities);
};
}
webcam::Channel
The channel interface.
Definition WebcamChannel.idl:12
webcam::WebcamManager
The webcam manager interface.
Definition WebcamManager.idl:44
webcam::WebcamManager::getChannel
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...
webcam::WebcamManager::setWebcamPriorities
int setWebcamPriorities(in map< string, Priority > priorities)
Set the priority of a webcam.
webcam::WebcamManager::getWebcams
vector< Webcam > getWebcams()
Retrieve all connected webcams.
webcam::WebcamManager::getClientTypePriorities
map< string, Priority > getClientTypePriorities()
Get the priority of all known client types.
webcam::WebcamManager::setClientTypePriorities
int setClientTypePriorities(in map< string, Priority > priorities)
Set the priority of a client type.
webcam::WebcamManager::getChannels
vector< Channel > getChannels()
Returns all channels.
webcam::WebcamManager::removeClientType
int removeClientType(in string clientType)
Remove a client type.
webcam::WebcamManager::getWebcamPriorities
map< string, Priority > getWebcamPriorities()
Get the priority of a webcam.
webcam::WebcamManager::getClientTypes
vector< string > getClientTypes()
Get all known client types.
webcam::Webcam
The webcam interface.
Definition Webcam.idl:86
idl
Basic IDL definitions.
Definition Event.idl:10
webcam
Webcam Management.
Definition StorageManager.idl:10
webcam::Priority
Priority
Priority.
Definition WebcamManager.idl:15
webcam::VERY_HIGH
@ VERY_HIGH
very high
Definition WebcamManager.idl:20
webcam::LOW
@ LOW
low
Definition WebcamManager.idl:17
webcam::VERY_LOW
@ VERY_LOW
very low
Definition WebcamManager.idl:16
webcam::NORMAL
@ NORMAL
normal
Definition WebcamManager.idl:18
webcam::HIGH
@ HIGH
high
Definition WebcamManager.idl:19
idl::Event
Common base for all events.
Definition Event.idl:13
webcam::Information
Webcam information.
Definition Webcam.idl:79
webcam::WebcamAddedEvent
This event is emitted after a webcam was added.
Definition WebcamManager.idl:36
webcam::WebcamEvent
Base type of all webcam event.
Definition WebcamManager.idl:27
webcam::WebcamEvent::name
string name
The user-assigned camera name.
Definition WebcamManager.idl:30
webcam::WebcamEvent::webcam
Webcam webcam
The webcam which was affected.
Definition WebcamManager.idl:28
webcam::WebcamEvent::information
Information information
Information about the camera.
Definition WebcamManager.idl:29
webcam::WebcamRemovedEvent
This event is emitted after a webcam has been removed.
Definition WebcamManager.idl:41