repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: fix wait for ack
[deb_libcec.git]
/
include
/
CECExportsCpp.h
diff --git
a/include/CECExportsCpp.h
b/include/CECExportsCpp.h
index f052592b5d034688d376cdd5ac81f23e1e34392e..34905735ea63a3931fde9925cc20bccf564b2f2c 100644
(file)
--- a/
include/CECExportsCpp.h
+++ b/
include/CECExportsCpp.h
@@
-41,7
+41,7
@@
namespace CEC
/*!
* @see cec_open
*/
/*!
* @see cec_open
*/
- virtual bool Open(const char *strPort,
in
t iTimeoutMs = 10000) = 0;
+ virtual bool Open(const char *strPort,
uint32_
t iTimeoutMs = 10000) = 0;
/*!
* @see cec_close
/*!
* @see cec_close
@@
-51,7
+51,7
@@
namespace CEC
/*!
* @see cec_find_adapters
*/
/*!
* @see cec_find_adapters
*/
- virtual int
FindAdapters(std::vector<cec_adapter> &deviceList
, const char *strDevicePath = NULL) = 0;
+ virtual int
8_t FindAdapters(cec_adapter *deviceList, uint8_t iBufSize
, const char *strDevicePath = NULL) = 0;
/*!
* @see cec_ping_adapters
/*!
* @see cec_ping_adapters
@@
-67,12
+67,12
@@
namespace CEC
/*!
* @see cec_get_min_version
*/
/*!
* @see cec_get_min_version
*/
- virtual int GetMinVersion(void) = 0;
+ virtual int
8_t
GetMinVersion(void) = 0;
/*!
* @see cec_get_lib_version
*/
/*!
* @see cec_get_lib_version
*/
- virtual int GetLibVersion(void) = 0;
+ virtual int
8_t
GetLibVersion(void) = 0;
/*!
* @see cec_get_next_log_message
/*!
* @see cec_get_next_log_message
@@
-122,7
+122,9
@@
namespace CEC
};
};
};
};
-extern DECLSPEC void * CECCreate(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1, int iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS);
+extern DECLSPEC void * CECCreate(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1, uint16_t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS);
+
+extern DECLSPEC void CECDestroy(CEC::ICECAdapter *instance);
#if !defined(DLL_EXPORT)
#if defined(_WIN32) || defined(_WIN64)
#if !defined(DLL_EXPORT)
#if defined(_WIN32) || defined(_WIN64)
@@
-135,9
+137,9
@@
static int g_iLibCECInstanceCount = 0;
/*!
* @see cec_init
*/
/*!
* @see cec_init
*/
-inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1,
in
t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS)
+inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1,
uint16_
t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS)
{
{
- typedef void* (__cdecl*_CreateLibCec)(const char *, uint8_t, uint
8
_t);
+ typedef void* (__cdecl*_CreateLibCec)(const char *, uint8_t, uint
16
_t);
_CreateLibCec CreateLibCec;
if (!g_libCEC)
_CreateLibCec CreateLibCec;
if (!g_libCEC)
@@
-149,7
+151,7
@@
inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_addres
CreateLibCec = (_CreateLibCec) (GetProcAddress(g_libCEC, "CECCreate"));
if (!CreateLibCec)
return NULL;
CreateLibCec = (_CreateLibCec) (GetProcAddress(g_libCEC, "CECCreate"));
if (!CreateLibCec)
return NULL;
- return static_cast< CEC::ICECAdapter* > (CreateLibCec(strName, iLogicalAddress, iPhysicalAddress));
+ return static_cast< CEC::ICECAdapter* > (CreateLibCec(strName,
(uint8_t)
iLogicalAddress, iPhysicalAddress));
}
/*!
}
/*!
@@
-158,7
+160,11
@@
inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_addres
*/
inline void UnloadLibCec(CEC::ICECAdapter *device)
{
*/
inline void UnloadLibCec(CEC::ICECAdapter *device)
{
- delete device;
+ typedef void (__cdecl*_DestroyLibCec)(void * device);
+ _DestroyLibCec DestroyLibCec;
+ DestroyLibCec = (_DestroyLibCec) (GetProcAddress(g_libCEC, "CECDestroy"));
+ if (DestroyLibCec)
+ DestroyLibCec(device);
if (--g_iLibCECInstanceCount == 0)
{
if (--g_iLibCECInstanceCount == 0)
{
@@
-172,7
+178,7
@@
inline void UnloadLibCec(CEC::ICECAdapter *device)
/*!
* @see cec_init
*/
/*!
* @see cec_init
*/
-inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1,
in
t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS)
+inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1,
uint16_
t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS)
{
return (CEC::ICECAdapter*) CECCreate(strName, iLogicalAddress, iPhysicalAddress);
};
{
return (CEC::ICECAdapter*) CECCreate(strName, iLogicalAddress, iPhysicalAddress);
};
@@
-184,7
+190,7
@@
inline CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_addres
inline void UnloadLibCec(CEC::ICECAdapter *device)
{
device->Close();
inline void UnloadLibCec(CEC::ICECAdapter *device)
{
device->Close();
-
delete device
;
+
CECDestroy(device)
;
};
#endif
};
#endif