00001 #ifndef __si_adevmgr_h__48ec342b_57a0_4648_a018_6a8574ce7bba
00002 #define __si_adevmgr_h__48ec342b_57a0_4648_a018_6a8574ce7bba
00003
00023 #include <si_std/listt.h>
00024 #include <si_sha/autodev.h>
00025 #include <si_sha/autopkt.h>
00026
00027 typedef struct sc_lase sc_lase;
00028
00031 typedef struct sc_nameToName {
00032 const TCHAR* first;
00033 const TCHAR* second;
00034 } sc_nameToName;
00035
00039 sm_listDecl(sc_nameToName);
00040
00059 typedef struct sc_automationDeviceMgr {
00060
00061
00062 sc_nameToNameList instcFromDevAddr;
00063 sc_nameToNameList inameFromDevAddr;
00064 sc_nameToNameList classFromDevType;
00065 sc_lase* jsEngine;
00066 struct sqlite3* db;
00067 } sc_automationDeviceMgr;
00068
00069 sc_status sc_automationDeviceMgr_construct(sc_automationDeviceMgr* pom,
00070 sc_lase* jscx);
00078 sc_status sc_automationDeviceMgr_destruct(sc_automationDeviceMgr* pom);
00084 sc_status sc_automationDeviceMgr_getInstanceNameFromDeviceAddress(
00085 sc_automationDeviceMgr* pom,
00086 const TCHAR* deviceAddr,
00087 const TCHAR** instanceName);
00100 sc_status sc_automationDeviceMgr_getClassFromDeviceType(
00101 sc_automationDeviceMgr* pom,
00102 const TCHAR* deviceType,
00103 const TCHAR** className);
00115 sc_status sc_automationDeviceMgr_getInstanceFromDeviceAddress(
00116 sc_automationDeviceMgr* pom,
00117 const TCHAR* deviceAddr,
00118 const TCHAR** instanceName);
00137 sc_status sc_automationDeviceMgr_createDevice(sc_automationDeviceMgr* pom,
00138 const TCHAR* bridgeName,
00139 sc_automationDevice* pd);
00153 sc_status sc_automationDeviceMgr_relayMessage(sc_automationDeviceMgr* pom,
00154 const TCHAR* deviceAddress,
00155 sc_automationPacket* pkt);
00170 sc_status sc_automationDeviceMgr_saveArchive(sc_automationDeviceMgr* pom,
00171 const TCHAR* ident,
00172 const TCHAR* archive);
00191 sc_status sc_automationDeviceMgr_saveLink(sc_automationDeviceMgr* pom,
00192 const TCHAR* srcIdent,
00193 const TCHAR* srcEvent,
00194 const TCHAR* dstIdent,
00195 const TCHAR* dstMethd);
00217 sc_status sc_automationDeviceMgr_clearLinks(sc_automationDeviceMgr* pom,
00218 const TCHAR* srcIdent);
00230 sc_status sc_automationDeviceMgr_renameDevice(sc_automationDeviceMgr* pom,
00231 const TCHAR* curName,
00232 const TCHAR* newName);
00245 #endif