repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: reset the active view after a routing change. issue #1
[deb_libcec.git]
/
include
/
CECExportsCpp.h
diff --git
a/include/CECExportsCpp.h
b/include/CECExportsCpp.h
index d5903515b4d9603c54927f336c15015b08fe0be8..7d70e7fe24c830cf74a36512bf7f316d6a5e0bff 100644
(file)
--- a/
include/CECExportsCpp.h
+++ b/
include/CECExportsCpp.h
@@
-36,12
+36,13
@@
namespace CEC
class ICECAdapter
{
public:
class ICECAdapter
{
public:
+ virtual ~ICECAdapter() {};
/*! @name Adapter methods */
//@{
/*!
* @see cec_open
*/
/*! @name Adapter methods */
//@{
/*!
* @see cec_open
*/
- virtual bool Open(const char *strPort, uint
64
_t iTimeoutMs = 10000) = 0;
+ virtual bool Open(const char *strPort, uint
32
_t iTimeoutMs = 10000) = 0;
/*!
* @see cec_close
/*!
* @see cec_close
@@
-51,7
+52,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
+68,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
@@
-92,7
+93,7
@@
namespace CEC
/*!
* @see cec_transmit
*/
/*!
* @see cec_transmit
*/
- virtual bool Transmit(const cec_
frame
&data, bool bWaitForAck = true) = 0;
+ virtual bool Transmit(const cec_
command
&data, bool bWaitForAck = true) = 0;
/*!
* @see cec_set_logical_address
/*!
* @see cec_set_logical_address
@@
-124,6
+125,8
@@
namespace CEC
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 * 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)
#include <windows.h>
#if !defined(DLL_EXPORT)
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
@@
-158,7
+161,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)
{
@@
-184,7
+191,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