Skip to content

Commit

Permalink
Merge pull request #16 from OCAAlliance/property-change-subscription
Browse files Browse the repository at this point in the history
Property change subscription
  • Loading branch information
tljdebrouwer authored Nov 11, 2020
2 parents 5a1e03c + 67edb6d commit 7460092
Show file tree
Hide file tree
Showing 199 changed files with 2,083 additions and 5,292 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/OcaLite/BonjourSDK/x86/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/BonjourSDK/x86/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</Link>
Expand All @@ -127,7 +127,7 @@ xcopy xml\*.xsd $(OutDir)xml /Y</Command>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/OcaLite/BonjourSDK/x64/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/BonjourSDK/x64/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</Link>
Expand All @@ -154,7 +154,7 @@ xcopy xml\*.xsd $(OutDir)xml /Y</Command>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/OcaLite/BonjourSDK/x86/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/BonjourSDK/x86/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</Link>
Expand All @@ -181,7 +181,7 @@ xcopy xml\*.xsd $(OutDir)xml /Y</Command>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/OcaLite/BonjourSDK/x64/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>WS2_32.lib;..\..\OCAMicro\OCAMicro\src/platform/common/BonjourSDK/x64/dnssd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMT</IgnoreSpecificDefaultLibraries>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// ---- Include system wide include files ----
#include <HostInterfaceLite/OCA/OCP.1/ZeroConf/IOcp1LiteService.h>
#include <HostInterfaceLite/OCA/OCF/OcfLiteHostInterface.h>
#include <../../platform/common/OcaLite/BonjourSDK/dns_sd.h>
#include <../../platform/common/BonjourSDK/dns_sd.h>

// ---- FileInfo Macro ----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using namespace std;
#include <stdarg.h>
#include <algorithm>
#include <HostInterfaceLite/OCA/OCF/OcfLiteHostInterface.h>
#include <OCALite/OCP.1/Ocp1LiteConnectParameters.h>
#include <OCP.1/Ocp1LiteConnectParameters.h>

// ---- FileInfo Macro ----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#define TEST_CONTEXT_H

// ---- Include system wide include files ----
#include <OCALite/OCC/ControlDataTypes/OcaLiteBaseDataTypes.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteFrameworkDataTypes.h>
#include <OCC/ControlDataTypes/OcaLiteBaseDataTypes.h>
#include <OCC/ControlDataTypes/OcaLiteFrameworkDataTypes.h>
#include <DNSSDResolver.h>

// ---- Include local include files ----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*/

// ---- Include system wide include files ----
#include <OCALite/Proxy/GeneralProxy.h>
#include <OCALite/OCC/ControlClasses/Workers/BlocksAndMatrices/OcaLiteBlock.h>
#include <OCALite/OCC/ControlClasses/Managers/OcaLiteNetworkManager.h>
#include <OCALite/OCC/ControlClasses/Managers/OcaLiteMediaClockManager.h>
#include <OCALite/OCC/ControlClasses/Agents/OcaLiteTimeSource.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteMethod.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteManagerDescriptor.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteEvent.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteBlockMember.h>
#include <OCALite/OCP.1/Ocp1LiteNetworkAddress.h>
#include <Proxy/GeneralProxy.h>
#include <OCC/ControlClasses/Workers/BlocksAndMatrices/OcaLiteBlock.h>
#include <OCC/ControlClasses/Managers/OcaLiteNetworkManager.h>
#include <OCC/ControlClasses/Managers/OcaLiteMediaClockManager.h>
#include <OCC/ControlClasses/Agents/OcaLiteTimeSource.h>
#include <OCC/ControlDataTypes/OcaLiteMethod.h>
#include <OCC/ControlDataTypes/OcaLiteManagerDescriptor.h>
#include <OCC/ControlDataTypes/OcaLiteEvent.h>
#include <OCC/ControlDataTypes/OcaLiteBlockMember.h>
#include <OCP.1/Ocp1LiteNetworkAddress.h>

// ---- FileInfo Macro ----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*/

// ---- Include system wide include files ----
#include <OCALite/Proxy/GeneralProxy.h>
#include <OCALite/OCC/ControlClasses/Workers/BlocksAndMatrices/OcaLiteBlock.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteMethod.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteManagerDescriptor.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteEvent.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteBlockMember.h>
#include <OCALite/OCP.1/Ocp1LiteNetworkAddress.h>
#include <Proxy/GeneralProxy.h>
#include <OCC/ControlClasses/Workers/BlocksAndMatrices/OcaLiteBlock.h>
#include <OCC/ControlDataTypes/OcaLiteMethod.h>
#include <OCC/ControlDataTypes/OcaLiteManagerDescriptor.h>
#include <OCC/ControlDataTypes/OcaLiteEvent.h>
#include <OCC/ControlDataTypes/OcaLiteBlockMember.h>
#include <OCP.1/Ocp1LiteNetworkAddress.h>

// ---- FileInfo Macro ----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include <fstream>
#include <vector>
#include <HostInterfaceLite/OCA/OCF/Timer/IOcfLiteTimer.h>
#include <OCALite/Proxy/GeneralProxy.h>
#include <OCALite/OCC/ControlClasses/Managers/OcaLiteNetworkManager.h>
#include <OCALite/OCP.1/Ocp1LiteNetworkAddress.h>
#include <OCALite/OCP.1/Ocp1LiteNetwork.h>
#include <Proxy/GeneralProxy.h>
#include <OCC/ControlClasses/Managers/OcaLiteNetworkManager.h>
#include <OCP.1/Ocp1LiteNetworkAddress.h>
#include <OCP.1/Ocp1LiteNetwork.h>
#include <rapidxml/rapidxml.hpp>
using namespace rapidxml;
using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

// ---- Include system wide include files ----
#include <DNSSDResolver.h>
#include <OCALite/OCC/ControlClasses/Workers/BlocksAndMatrices/OcaLiteBlock.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteBlockMember.h>
#include <OCALite/OCC/ControlDataTypes/OcaLiteManagerDescriptor.h>
#include <OCALite/OCP.1/Ocp1LiteConnectParameters.h>
#include <OCALite/Proxy/GeneralProxy.h>
#include <OCC/ControlClasses/Workers/BlocksAndMatrices/OcaLiteBlock.h>
#include <OCC/ControlDataTypes/OcaLiteBlockMember.h>
#include <OCC/ControlDataTypes/OcaLiteManagerDescriptor.h>
#include <OCP.1/Ocp1LiteConnectParameters.h>
#include <Proxy/GeneralProxy.h>

// ---- FileInfo Macro ----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

// ---- Include system wide include files ----
#include <OCALite/OCP.1/Ocp1LiteConnectParameters.h>
#include <OCP.1/Ocp1LiteConnectParameters.h>
#include <HostInterfaceLite/OCA/OCF/Timer/IOcfLiteTimer.h>

// ---- FileInfo Macro ----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// ---- Include local include files ----
#include "../../TestFramework/BaseTestClass.h"
#include <OCALite/OCF/OcaLiteCommandHandlerController.h>
#include <OCF/OcaLiteCommandHandlerController.h>

// ---- Referenced classes and types ----

Expand Down
2 changes: 1 addition & 1 deletion OCACompliancyTestTool/DNSSDResolver/DNSSDResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// ---- Include system wide include files ----
#include <PlatformDataTypes.h>
#define _WINSOCKAPI_
#include <../platform/common/OcaLite/BonjourSDK/dns_sd.h>
#include <../platform/common/BonjourSDK/dns_sd.h>

// ---- Include local include files ----
#include "ResolveResult.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#include <HostInterfaceLite/OCA/OCF/Configuration/IOcfLiteConfigure.h>
#ifdef _WIN32
#include <Winsock2.h>
#else
#elif __APPLE__
#include <unistd.h>
#endif

// ---- FileInfo Macro ----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ void OcfLiteLogLogMessage(UINT8 logLevel, const char* type, const char* file, UI
UINT32 messageLength(static_cast<UINT32>(::vsnprintf(NULL, 0, message, argList) + 1));
if (messageLength <= MAX_FULL_MESSAGE_LENGTH)
{
// For Apple this seems required to reset the argList after above vsnprintf function
va_start(argList, message);

#ifdef _WIN32
INT32 result(::vsprintf_s(m_fullLogMessage, message, argList));
bool bAddCarrageReturn = false;
#else
INT32 result(::vsprintf(m_fullLogMessage, message, argList));
#endif
bool bAddCarrageReturn = false;

if (static_cast<UINT32>(result) <= messageLength)
{
Expand All @@ -72,11 +79,11 @@ void OcfLiteLogLogMessage(UINT8 logLevel, const char* type, const char* file, UI

if (m_fullLogMessage[0] == '.')
{
printf("%s%s", &m_fullLogMessage[1], bAddCarrageReturn? "\r\n": "");
printf("%s%s", &m_fullLogMessage[1], bAddCarrageReturn ? "\r\n" : "");
}
else
{
printf("%*s%s%s", m_indent, "", m_fullLogMessage, bAddCarrageReturn? "\r\n": "");
printf("%*s%s%s", m_indent, "", m_fullLogMessage, bAddCarrageReturn ? "\r\n" : "");
}

// Increase message indent
Expand All @@ -85,6 +92,14 @@ void OcfLiteLogLogMessage(UINT8 logLevel, const char* type, const char* file, UI
m_indent += 2;
}
}
else
{
printf("Buffer overflow in processing log message\r\n");
}
}
else
{
printf("Buffer overflow in log message\r\n");
}
va_end(argList);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
*/

// ---- Include system wide include files ----
#ifdef _WIN32
#include <Windows.h>
#else
#include <sys/time.h>
#include <stdio.h>
#include <unistd.h>
#endif

// ---- FileInfo Macro ----

Expand All @@ -21,5 +27,11 @@
// Platform-specific implementation of static method 'GetTimerTickCount' of base class
UINT32 OcfLiteTimerGetTimerTickCount(void)
{
#ifdef _WIN32
return ::GetTickCount();
#else
struct timeval start;
gettimeofday(&start, NULL);
return (UINT32)((start.tv_sec) * 1000 + start.tv_usec/1000.0);
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ bool Ocp1LiteNetworkInitialize()
{
if (!m_bInitialized)
{
#ifdef _WIN32
int iResult;
WSADATA wsaData;
// Initialize Winsock
Expand All @@ -40,6 +41,9 @@ bool Ocp1LiteNetworkInitialize()
{
m_bInitialized = true;
}
#else
m_bInitialized = true;
#endif
}

return true;
Expand Down
Loading

0 comments on commit 7460092

Please sign in to comment.