module YalpInterfaces { enum YalpErrorCode { OK, ERROR_SQL, ERROR_UNDEFINED }; enum YalpErrorLevel { ERROR_LEVEL_DEBUG, ERROR_LEVEL_INFO, ERROR_LEVEL_ERROR, ERROR_LEVEL_CRITICAL }; struct YalpError { string msg; YalpErrorCode code; YalpErrorLevel level; string descr; }; struct YalpFile { boolean isDir; string name; string parent; }; typedef sequence YalpFiles; struct StreamCounter { unsigned long actualStreams; unsigned long allStreams; }; enum AccessRights { ADMIN, USER, NO_YALP_SERVER, DENY }; struct YalpUser { unsigned long id; string name; string realName; AccessRights level; }; typedef sequence Users; enum MediaType { IMAGE, VIDEO, SOUND, OTHER }; typedef sequence MediaTypes; struct StringProperty { string property; string value; }; typedef sequence StringProperties; struct IntProperty { string property; long value; }; typedef sequence IntProperties; typedef sequence MediaTags; struct Media { /* mandatory */ string name; unsigned long id; MediaType type; unsigned long inputPluginId; /* optional */ YalpUser owner; string lastEdit; string path; string fileName; string duration; StringProperties stringProps; IntProperties intProps; MediaTags tags; }; typedef sequence Medias; enum Action { START, PLAY, PAUSE, STOP, FORWARD, BACKWARD, CREATE, EDIT, DELETE }; typedef sequence Actions; enum AccessType { FILE, FILES, STREAM }; enum EncodingType { UNKNOWN, MP3, MPG, MPEG, AVI, MOV, M2T, JPEG, JPG, TIFF }; struct AccessInfo { string name; string description; string executable; string params; AccessType type; }; struct Output { unsigned long id; AccessInfo info; Medias playlist; Action outputAction; string destIp; }; enum PluginType { INPUT_PLUGIN, OUTPUT_PLUGIN, AUTH_PLUGIN }; struct PluginInfo { /* mandatory */ unsigned long id; string name; string description; PluginType type; /* optional */ MediaTypes supportedTypes; AccessInfo access; unsigned short maxClients; unsigned short actClients; }; typedef sequence PluginInfos; struct Session { unsigned long id; YalpUser me; string ip; PluginInfos availablePlugins; }; /* YALP startup * * 1) CORBA - NameService * 2) YALP - ServerControl (connects to Db via NameService) * 4) YALP - all Plugins (connecting to ServerControl via NS) * 5) YALP - Clients (connecting to ServerControl via NS, getting handles) * (to available OutputPlugins via ServerControl ) */ /* implemented by OutputPlugins */ interface OutputPluginInterface { void getInfo(out PluginInfo info, out YalpError err); void control(inout Output ctlOutput, out YalpError err); oneway void shutdown(); }; /* implemented by InputPlugins */ interface InputPluginInterface { void getInfo(out PluginInfo info, out YalpError err); void changeMedia(in Media toChange, in Action todo, out YalpError err); void search(in string str, in MediaTypes types, out Medias result, out YalpError err); void getNumOfMedias(out unsigned long num, out YalpError err); }; /* implemented by UserIdentificationPlugin */ interface UserIdentificationInterface { void getInfo(out PluginInfo info, out YalpError err); void userVerify(in string user, in string passwd, out YalpError err, out YalpUser acc); void getUser(out Users list, out YalpError err); void changeUser(in YalpUser usr, in string passwd, in Action todo, out YalpError err); }; /* implemented by YALP */ interface ServerControlInterface { /* User Handling */ void clientLogon(in string userName, in string pass, in string ipAdress, out Session hej, out YalpError err); void clientLogoff(in Session bye, out YalpError err); void getUser(out Users list, out YalpError err); void changeUser(in YalpUser usr, in string passwd, in Action todo, out YalpError err); /* Media Handling */ void changeMedia(in Media toChange, in Action todo, out YalpError err); void getNumOfMedias(out unsigned long num, out YalpError err); void control(inout Output ctlOutput, out YalpError err); void search(in string str, in MediaTypes types, out Medias result, out YalpError err); /* Outputplugin Handling */ void registerOutputPlugin(in OutputPluginInterface itf, inout PluginInfo info, out YalpError err); void removeOutputPlugin(in PluginInfo itf, out YalpError err); void getOutputPlugins(out PluginInfos itfs, in string name, out YalpError err); /* Inputplugin Handling */ void registerInputPlugin(in Object itf, inout PluginInfo info, out YalpError err); void removeInputPlugin(in PluginInfo itf, out YalpError err); void getInputPlugins(out PluginInfos itfs, in string name, out YalpError err); /* Identificationplugin Handling */ void registerAuthPlugin(in Object itf, inout PluginInfo info, out YalpError err); void removeAuthPlugin(in PluginInfo itf, out YalpError err); void getAuthPlugins(out PluginInfos itfs, in string name, out YalpError err); /* Server related */ void ping(out YalpError pong); oneway void serverShutdown(); }; };