StorageManager.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2011 Raritan Inc. All rights reserved.
*/
#include <UserEvent.idl>
#include <Webcam.idl>
/** Webcam Management */
module webcam {
/** The storage manager interface */
interface StorageManager_1_0_2 {
/**
* Error codes
*/
constant int NO_ERROR = 0; ///< Operation successful, no error
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
constant int ERR_INIT_IN_PROGRESS = 2; ///< Storage information is going to be initialized
constant int ERR_ALREADY_RUNNING = 3; ///< The activity is already running
constant int ERR_TOO_LARGE = 4; ///< The requested result is too large
constant int ERR_OPERATION_NOT_SUPPORTED = 5; ///< The requested operation is not supported on the current storage type
/** StorageType */
enumeration StorageType {
LOCAL, ///< Local
FTP, ///< FTP
CIFS, ///< CIFS
NFS ///< NFS
};
/** Direction */
enumeration Direction {
ASCENDING, ///< ascending
DESCENDING ///< descending
};
/** StorageStatus */
enumeration StorageStatus {
INITIALIZING, ///< Initializing is in progress,
READY ///< Storage is ready for usage
};
/** Webcam Storage Info */
structure WebcamStorageInfo {
Webcam_2_0_1 webcam; ///< webcam object
long newestIndex; ///< newest know index
long oldestIndex; ///< oldest know index
int count; ///< nr of stored images from this webcam
};
/** Information */
structure StorageInformation {
StorageStatus status; ///< storage status
int capacity; ///< over-all nr of storable images
int used; ///< nr of stored images (local storage only)
vector<WebcamStorageInfo> webcamStorageInfo; ///< List of storage information for each webcam (local storage only)
};
/** Settings */
structure StorageSettings {
StorageType type; ///< storage type
int capacity; ///< maximum number of stored images; obsolete, no longer used
string server; ///< server ip, share and path (empty/ignored for LOCAL storage type)
string username; ///< username (empty/ignored for LOCAL storage type)
string password; ///< password (empty/ignored for LOCAL storage type)
};
/** StorageMetaData */
structure StorageMetaData {
long index; ///< current image index
Webcam_2_0_1 webcam; ///< source webcam
};
/** StorageMetaData */
structure ImageStorageMetaData {
ImageMetaData imageMeta; ///< image related meta data
int fileSize; ///< image file size in bytes
StorageMetaData storageMeta;///< store related meta data
};
/** StorageImage */
structure StorageImage {
Image_2_0_0 image; ///< image object
StorageMetaData metaData; ///< meta data
};
/** Activity */
structure Activity {
Webcam_2_0_1 webcam; ///< webcam object
int interval; ///< capture interval
int count; ///< nr of images to take
int done; ///< nr of images taken
};
/** Event: image upload to storage started */
valueobject ImageUploadStartedEvent extends event.UserEvent {
Webcam_2_0_1 webcam; ///< webcam object
string folderUrl; ///< URL under which the containing folder can be accessed
};
/**
* Get supported storage types
*
* @return a list of supported storage types
*/
vector<StorageType> getSupportedStorageTypes();
/**
* get storage information
*
* @return StorageInformation
*/
StorageInformation getInformation();
/**
* get storage settings
*
* @return StorageSettings
*/
StorageSettings getSettings();
/**
* set storage settings
*
* @param settings settings structure
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM invalid settings
*/
int setSettings(in StorageSettings settings);
/**
* add an image to the storage
*
* @param webcam image source webcam
* @param image image
* @param index index of the added image
*
* @return NO_ERROR on success
*/
int addImage(in Webcam_2_0_1 webcam, in Image_2_0_0 image, out long index);
/**
* remove an image of the storage
*
* @note not supported for remote storage (CIFS and FTP)
*
* @param webcam image source webcam
* @param start start index
* @param count number of images
* @param direction index counting direction
*
* @return NO_ERROR on success
*/
int removeImages(in Webcam_2_0_1 webcam, in long start, in int count, in Direction direction);
/**
* get meta data of images from storage
*
* @note not supported for remote storage (CIFS and FTP)
*
* @param webcam image source webcam
* @param start start index
* @param count number of images
* @param direction index counting direction
* @param meta result: list of storage meta data
*
* @return NO_ERROR on success
* @return ERR_TOO_LARGE too many information requested
*/
int getMetaData(in Webcam_2_0_1 webcam, in long start, in int count,
in Direction direction, out vector<ImageStorageMetaData> meta);
/**
* retrieve images from the storage
*
* @note not supported for remote storage (CIFS and FTP)
*
* @param webcam image source webcam
* @param start start index
* @param count number of images
* @param direction index counting direction
* @param image result: list of storage images
*
* @return NO_ERROR on success
* @return ERR_TOO_LARGE too many images requested
*/
int getImages(in Webcam_2_0_1 webcam, in long start, in int count,
in Direction direction, out vector<StorageImage> image);
/**
* get all running activities
*
* @return list of running activities
*/
vector<Activity> getActivities();
/**
* start a capture activity
*
* @param webcam webcam
* @param count number of images to store, zero is interpreted as infinite
* @param interval interval in ms
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM webcam not found
*/
int startActivity(in Webcam_2_0_1 webcam, in int count, in int interval);
/**
* Start a capture activity, storing the images to a specific storage folder
*
* @param webcam webcam
* @param count number of images to store, zero is interpreted as infinite
* @param interval interval in ms
* @param folder folder path to store the images into
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM webcam not found
*/
int startActivityWithFolder(in Webcam_2_0_1 webcam, in int count, in int interval, in string folder);
/**
* stop a capture activity
*
* @param webcam webcam
*
* @return NO_ERROR on success
* @return ERR_INVALID_PARAM no matching activity found
*/
int stopActivity(in Webcam_2_0_1 webcam);
};
}
webcam::StorageManager_1_0_2::StorageInformation::webcamStorageInfo
vector< WebcamStorageInfo > webcamStorageInfo
List of storage information for each webcam (local storage only)
Definition: StorageManager.idl:57
webcam::StorageManager_1_0_2::StorageSettings
Settings.
Definition: StorageManager.idl:61
webcam::StorageManager_1_0_2::StorageSettings::password
string password
password (empty/ignored for LOCAL storage type)
Definition: StorageManager.idl:66
webcam::StorageManager_1_0_2::WebcamStorageInfo
Webcam Storage Info.
Definition: StorageManager.idl:45
webcam::StorageManager_1_0_2::INITIALIZING
Initializing is in progress,.
Definition: StorageManager.idl:40
webcam::StorageManager_1_0_2::StorageMetaData
StorageMetaData.
Definition: StorageManager.idl:70
webcam::StorageManager_1_0_2::ImageStorageMetaData::imageMeta
ImageMetaData imageMeta
image related meta data
Definition: StorageManager.idl:77
webcam::StorageManager_1_0_2::ImageStorageMetaData::storageMeta
StorageMetaData storageMeta
store related meta data
Definition: StorageManager.idl:79
webcam::StorageManager_1_0_2::StorageInformation::used
int used
nr of stored images (local storage only)
Definition: StorageManager.idl:56
webcam::Webcam_2_0_1
The webcam interface.
Definition: Webcam.idl:86
webcam::StorageManager_1_0_2::StorageType
StorageType
StorageType.
Definition: StorageManager.idl:25
webcam::StorageManager_1_0_2::StorageStatus
StorageStatus
StorageStatus.
Definition: StorageManager.idl:39
webcam::StorageManager_1_0_2::WebcamStorageInfo::webcam
Webcam_2_0_1 webcam
webcam object
Definition: StorageManager.idl:46
webcam::StorageManager_1_0_2::StorageImage::image
Image_2_0_0 image
image object
Definition: StorageManager.idl:84
webcam::StorageManager_1_0_2::StorageInformation
Information.
Definition: StorageManager.idl:53
webcam::StorageManager_1_0_2::StorageInformation::status
StorageStatus status
storage status
Definition: StorageManager.idl:54
webcam::StorageManager_1_0_2::folderUrl
string folderUrl
URL under which the containing folder can be accessed.
Definition: StorageManager.idl:99
webcam::StorageManager_1_0_2::Activity::done
int done
nr of images taken
Definition: StorageManager.idl:93
webcam::StorageManager_1_0_2::StorageSettings::server
string server
server ip, share and path (empty/ignored for LOCAL storage type)
Definition: StorageManager.idl:64
webcam::StorageManager_1_0_2::StorageMetaData::webcam
Webcam_2_0_1 webcam
source webcam
Definition: StorageManager.idl:72
webcam::StorageManager_1_0_2::StorageImage
StorageImage.
Definition: StorageManager.idl:83
webcam::StorageManager_1_0_2
The storage manager interface.
Definition: StorageManager.idl:13
webcam::StorageManager_1_0_2::StorageImage::metaData
StorageMetaData metaData
meta data
Definition: StorageManager.idl:85
webcam::StorageManager_1_0_2::FTP
FTP.
Definition: StorageManager.idl:27
webcam::StorageManager_1_0_2::ImageStorageMetaData
StorageMetaData.
Definition: StorageManager.idl:76
webcam::StorageManager_1_0_2::Activity::webcam
Webcam_2_0_1 webcam
webcam object
Definition: StorageManager.idl:90
webcam::StorageManager_1_0_2::LOCAL
Local.
Definition: StorageManager.idl:26
webcam::StorageManager_1_0_2::WebcamStorageInfo::count
int count
nr of stored images from this webcam
Definition: StorageManager.idl:49
webcam::StorageManager_1_0_2::ImageStorageMetaData::fileSize
int fileSize
image file size in bytes
Definition: StorageManager.idl:78
webcam::StorageManager_1_0_2::Activity::interval
int interval
capture interval
Definition: StorageManager.idl:91
webcam::StorageManager_1_0_2::StorageMetaData::index
long index
current image index
Definition: StorageManager.idl:71
webcam::StorageManager_1_0_2::CIFS
CIFS.
Definition: StorageManager.idl:28
webcam::StorageManager_1_0_2::WebcamStorageInfo::oldestIndex
long oldestIndex
oldest know index
Definition: StorageManager.idl:48
webcam::Image_2_0_0
Image.
Definition: Webcam.idl:64
webcam::StorageManager_1_0_2::StorageInformation::capacity
int capacity
over-all nr of storable images
Definition: StorageManager.idl:55
webcam::StorageManager_1_0_2::StorageSettings::username
string username
username (empty/ignored for LOCAL storage type)
Definition: StorageManager.idl:65
webcam::StorageManager_1_0_2::WebcamStorageInfo::newestIndex
long newestIndex
newest know index
Definition: StorageManager.idl:47
webcam::StorageManager_1_0_2::Direction
Direction
Direction.
Definition: StorageManager.idl:33
webcam::StorageManager_1_0_2::Activity::count
int count
nr of images to take
Definition: StorageManager.idl:92
webcam
Webcam Management.
Definition: StorageManager.idl:10
webcam::StorageManager_1_0_2::Activity
Activity.
Definition: StorageManager.idl:89
webcam::ImageMetaData
Image meta data.
Definition: Webcam.idl:57
webcam::StorageManager_1_0_2::ASCENDING
ascending
Definition: StorageManager.idl:34
webcam::StorageManager_1_0_2::StorageSettings::capacity
int capacity
maximum number of stored images; obsolete, no longer used
Definition: StorageManager.idl:63
webcam::StorageManager_1_0_2::StorageSettings::type
StorageType type
storage type
Definition: StorageManager.idl:62