Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
StorageManager.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6#include <UserEvent.idl>
7#include <Webcam.idl>
8
9/** Webcam Management */
10module webcam {
11
12 /** The storage manager interface */
13 interface StorageManager {
14 /**
15 * Error codes
16 */
17 constant int NO_ERROR = 0; ///< Operation successful, no error
18 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
19 constant int ERR_INIT_IN_PROGRESS = 2; ///< Storage information is going to be initialized
20 constant int ERR_ALREADY_RUNNING = 3; ///< The activity is already running
21 constant int ERR_TOO_LARGE = 4; ///< The requested result is too large
22 constant int ERR_OPERATION_NOT_SUPPORTED = 5; ///< The requested operation is not supported on the current storage type
23
24 /** StorageType */
25 enumeration StorageType {
26 LOCAL, ///< Local
27 FTP, ///< FTP
28 CIFS, ///< CIFS
29 NFS ///< NFS
30 };
31
32 /** Direction */
33 enumeration Direction {
34 ASCENDING, ///< ascending
35 DESCENDING ///< descending
36 };
37
38 /** StorageStatus */
39 enumeration StorageStatus {
40 INITIALIZING, ///< Initializing is in progress,
41 READY ///< Storage is ready for usage
42 };
43
44 /** Webcam Storage Info */
45 structure WebcamStorageInfo {
46 Webcam webcam; ///< webcam object
47 long newestIndex; ///< newest know index
48 long oldestIndex; ///< oldest know index
49 int count; ///< nr of stored images from this webcam
50 };
51
52 /** Information */
53 structure StorageInformation {
54 StorageStatus status; ///< storage status
55 int capacity; ///< over-all nr of storable images
56 int used; ///< nr of stored images (local storage only)
57 vector<WebcamStorageInfo> webcamStorageInfo; ///< List of storage information for each webcam (local storage only)
58 };
59
60 /** Settings */
61 structure StorageSettings {
62 StorageType type; ///< storage type
63 int capacity; ///< maximum number of stored images; obsolete, no longer used
64 string server; ///< server ip, share and path (empty/ignored for LOCAL storage type)
65 string username; ///< username (empty/ignored for LOCAL storage type)
66 string password; ///< password (empty/ignored for LOCAL storage type)
67 };
68
69 /** StorageMetaData */
70 structure StorageMetaData {
71 long index; ///< current image index
72 Webcam webcam; ///< source webcam
73 };
74
75 /** StorageMetaData */
76 structure ImageStorageMetaData {
77 ImageMetaData imageMeta; ///< image related meta data
78 int fileSize; ///< image file size in bytes
79 StorageMetaData storageMeta;///< store related meta data
80 };
81
82 /** StorageImage */
83 structure StorageImage {
84 Image image; ///< image object
85 StorageMetaData metaData; ///< meta data
86 };
87
88 /** Activity */
89 structure Activity {
90 Webcam webcam; ///< webcam object
91 int interval; ///< capture interval
92 int count; ///< nr of images to take
93 int done; ///< nr of images taken
94 };
95
96 /** Event: image upload to storage started */
97 valueobject ImageUploadStartedEvent extends event.UserEvent {
98 Webcam webcam; ///< webcam object
99 string folderUrl; ///< URL under which the containing folder can be accessed
100 };
101
102 /**
103 * Get supported storage types
104 *
105 * @return a list of supported storage types
106 */
107 vector<StorageType> getSupportedStorageTypes();
108
109 /**
110 * get storage information
111 *
112 * @return StorageInformation
113 */
114 StorageInformation getInformation();
115
116 /**
117 * get storage settings
118 *
119 * @return StorageSettings
120 */
121 StorageSettings getSettings();
122
123 /**
124 * set storage settings
125 *
126 * @param settings settings structure
127 *
128 * @return NO_ERROR on success
129 * @return ERR_INVALID_PARAM invalid settings
130 */
131 int setSettings(in StorageSettings settings);
132
133 /**
134 * add an image to the storage
135 *
136 * @param webcam image source webcam
137 * @param image image
138 * @param index index of the added image
139 *
140 * @return NO_ERROR on success
141 */
142 int addImage(in Webcam webcam, in Image image, out long index);
143
144 /**
145 * remove an image of the storage
146 *
147 * @note not supported for remote storage (CIFS and FTP)
148 *
149 * @param webcam image source webcam
150 * @param start start index
151 * @param count number of images
152 * @param direction index counting direction
153 *
154 * @return NO_ERROR on success
155 */
156 int removeImages(in Webcam webcam, in long start, in int count, in Direction direction);
157
158 /**
159 * get meta data of images from storage
160 *
161 * @note not supported for remote storage (CIFS and FTP)
162 *
163 * @param webcam image source webcam
164 * @param start start index
165 * @param count number of images
166 * @param direction index counting direction
167 * @param meta result: list of storage meta data
168 *
169 * @return NO_ERROR on success
170 * @return ERR_TOO_LARGE too many information requested
171 */
172 int getMetaData(in Webcam webcam, in long start, in int count,
173 in Direction direction, out vector<ImageStorageMetaData> meta);
174
175 /**
176 * retrieve images from the storage
177 *
178 * @note not supported for remote storage (CIFS and FTP)
179 *
180 * @param webcam image source webcam
181 * @param start start index
182 * @param count number of images
183 * @param direction index counting direction
184 * @param image result: list of storage images
185 *
186 * @return NO_ERROR on success
187 * @return ERR_TOO_LARGE too many images requested
188 */
189 int getImages(in Webcam webcam, in long start, in int count,
190 in Direction direction, out vector<StorageImage> image);
191
192 /**
193 * get all running activities
194 *
195 * @return list of running activities
196 */
197 vector<Activity> getActivities();
198
199 /**
200 * start a capture activity
201 *
202 * @param webcam webcam
203 * @param count number of images to store, zero is interpreted as infinite
204 * @param interval interval in ms
205 *
206 * @return NO_ERROR on success
207 * @return ERR_INVALID_PARAM webcam not found
208 */
209 int startActivity(in Webcam webcam, in int count, in int interval);
210
211 /**
212 * Start a capture activity, storing the images to a specific storage folder
213 *
214 * @param webcam webcam
215 * @param count number of images to store, zero is interpreted as infinite
216 * @param interval interval in ms
217 * @param folder folder path to store the images into
218 *
219 * @return NO_ERROR on success
220 * @return ERR_INVALID_PARAM webcam not found
221 */
222 int startActivityWithFolder(in Webcam webcam, in int count, in int interval, in string folder);
223
224 /**
225 * stop a capture activity
226 *
227 * @param webcam webcam
228 *
229 * @return NO_ERROR on success
230 * @return ERR_INVALID_PARAM no matching activity found
231 */
232 int stopActivity(in Webcam webcam);
233 };
234}
webcam::StorageManager
The storage manager interface.
Definition StorageManager.idl:13
webcam::StorageManager::StorageType
StorageType
StorageType.
Definition StorageManager.idl:25
webcam::StorageManager::CIFS
@ CIFS
CIFS.
Definition StorageManager.idl:28
webcam::StorageManager::FTP
@ FTP
FTP.
Definition StorageManager.idl:27
webcam::StorageManager::LOCAL
@ LOCAL
Local.
Definition StorageManager.idl:26
webcam::StorageManager::getInformation
StorageInformation getInformation()
get storage information
webcam::StorageManager::getMetaData
int getMetaData(in Webcam webcam, in long start, in int count, in Direction direction, out vector< ImageStorageMetaData > meta)
get meta data of images from storage
webcam::StorageManager::removeImages
int removeImages(in Webcam webcam, in long start, in int count, in Direction direction)
remove an image of the storage
webcam::StorageManager::getImages
int getImages(in Webcam webcam, in long start, in int count, in Direction direction, out vector< StorageImage > image)
retrieve images from the storage
webcam::StorageManager::getActivities
vector< Activity > getActivities()
get all running activities
webcam::StorageManager::startActivity
int startActivity(in Webcam webcam, in int count, in int interval)
start a capture activity
webcam::StorageManager::StorageStatus
StorageStatus
StorageStatus.
Definition StorageManager.idl:39
webcam::StorageManager::INITIALIZING
@ INITIALIZING
Initializing is in progress,.
Definition StorageManager.idl:40
webcam::StorageManager::getSupportedStorageTypes
vector< StorageType > getSupportedStorageTypes()
Get supported storage types.
webcam::StorageManager::addImage
int addImage(in Webcam webcam, in Image image, out long index)
add an image to the storage
webcam::StorageManager::startActivityWithFolder
int startActivityWithFolder(in Webcam webcam, in int count, in int interval, in string folder)
Start a capture activity, storing the images to a specific storage folder.
webcam::StorageManager::setSettings
int setSettings(in StorageSettings settings)
set storage settings
webcam::StorageManager::getSettings
StorageSettings getSettings()
get storage settings
webcam::StorageManager::stopActivity
int stopActivity(in Webcam webcam)
stop a capture activity
webcam::StorageManager::Direction
Direction
Direction.
Definition StorageManager.idl:33
webcam::StorageManager::ASCENDING
@ ASCENDING
ascending
Definition StorageManager.idl:34
webcam::Webcam
The webcam interface.
Definition Webcam.idl:86
webcam
Webcam Management.
Definition StorageManager.idl:10
webcam::ImageMetaData
Image meta data.
Definition Webcam.idl:57
webcam::Image
Image.
Definition Webcam.idl:64
webcam::StorageManager::Activity
Activity.
Definition StorageManager.idl:89
webcam::StorageManager::Activity::count
int count
nr of images to take
Definition StorageManager.idl:92
webcam::StorageManager::Activity::done
int done
nr of images taken
Definition StorageManager.idl:93
webcam::StorageManager::Activity::webcam
Webcam webcam
webcam object
Definition StorageManager.idl:90
webcam::StorageManager::Activity::interval
int interval
capture interval
Definition StorageManager.idl:91
webcam::StorageManager::ImageStorageMetaData
StorageMetaData.
Definition StorageManager.idl:76
webcam::StorageManager::ImageStorageMetaData::imageMeta
ImageMetaData imageMeta
image related meta data
Definition StorageManager.idl:77
webcam::StorageManager::ImageStorageMetaData::fileSize
int fileSize
image file size in bytes
Definition StorageManager.idl:78
webcam::StorageManager::ImageStorageMetaData::storageMeta
StorageMetaData storageMeta
store related meta data
Definition StorageManager.idl:79
webcam::StorageManager::ImageUploadStartedEvent
Event: image upload to storage started.
Definition StorageManager.idl:97
webcam::StorageManager::ImageUploadStartedEvent::webcam
Webcam webcam
webcam object
Definition StorageManager.idl:98
webcam::StorageManager::ImageUploadStartedEvent::folderUrl
string folderUrl
URL under which the containing folder can be accessed.
Definition StorageManager.idl:99
webcam::StorageManager::StorageImage
StorageImage.
Definition StorageManager.idl:83
webcam::StorageManager::StorageImage::metaData
StorageMetaData metaData
meta data
Definition StorageManager.idl:85
webcam::StorageManager::StorageImage::image
Image image
image object
Definition StorageManager.idl:84
webcam::StorageManager::StorageInformation
Information.
Definition StorageManager.idl:53
webcam::StorageManager::StorageInformation::used
int used
nr of stored images (local storage only)
Definition StorageManager.idl:56
webcam::StorageManager::StorageInformation::status
StorageStatus status
storage status
Definition StorageManager.idl:54
webcam::StorageManager::StorageInformation::webcamStorageInfo
vector< WebcamStorageInfo > webcamStorageInfo
List of storage information for each webcam (local storage only)
Definition StorageManager.idl:57
webcam::StorageManager::StorageInformation::capacity
int capacity
over-all nr of storable images
Definition StorageManager.idl:55
webcam::StorageManager::StorageMetaData
StorageMetaData.
Definition StorageManager.idl:70
webcam::StorageManager::StorageMetaData::webcam
Webcam webcam
source webcam
Definition StorageManager.idl:72
webcam::StorageManager::StorageMetaData::index
long index
current image index
Definition StorageManager.idl:71
webcam::StorageManager::StorageSettings
Settings.
Definition StorageManager.idl:61
webcam::StorageManager::StorageSettings::type
StorageType type
storage type
Definition StorageManager.idl:62
webcam::StorageManager::StorageSettings::username
string username
username (empty/ignored for LOCAL storage type)
Definition StorageManager.idl:65
webcam::StorageManager::StorageSettings::password
string password
password (empty/ignored for LOCAL storage type)
Definition StorageManager.idl:66
webcam::StorageManager::StorageSettings::capacity
int capacity
maximum number of stored images; obsolete, no longer used
Definition StorageManager.idl:63
webcam::StorageManager::StorageSettings::server
string server
server ip, share and path (empty/ignored for LOCAL storage type)
Definition StorageManager.idl:64
webcam::StorageManager::WebcamStorageInfo
Webcam Storage Info.
Definition StorageManager.idl:45
webcam::StorageManager::WebcamStorageInfo::webcam
Webcam webcam
webcam object
Definition StorageManager.idl:46
webcam::StorageManager::WebcamStorageInfo::oldestIndex
long oldestIndex
oldest know index
Definition StorageManager.idl:48
webcam::StorageManager::WebcamStorageInfo::newestIndex
long newestIndex
newest know index
Definition StorageManager.idl:47
webcam::StorageManager::WebcamStorageInfo::count
int count
nr of stored images from this webcam
Definition StorageManager.idl:49