Skip to content

Commit

Permalink
Thunder: Improve WPEFramework namespace backwards compatibility (#1675)
Browse files Browse the repository at this point in the history
Co-authored-by: MFransen69 <[email protected]>
  • Loading branch information
HaseenaSainul and MFransen69 authored Jul 1, 2024
1 parent 535a37d commit 375b9bf
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/com/com.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@
#if defined(__WINDOWS__) && !defined(COM_EXPORTS)
#pragma comment(lib, "com.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(RPC)
7 changes: 7 additions & 0 deletions Source/core/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,13 @@ namespace WPEFramework {
using namespace Thunder;
}

#define WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(NESTED_NAMESPACE) \
namespace WPEFramework { \
namespace NESTED_NAMESPACE { \
using namespace Thunder::NESTED_NAMESPACE; \
} \
}

extern "C" {

#ifdef __WINDOWS__
Expand Down
1 change: 1 addition & 0 deletions Source/core/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@
#pragma comment(lib, "core.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(Core)
#endif
2 changes: 2 additions & 0 deletions Source/cryptalgo/cryptalgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@
#ifdef __WINDOWS__
#pragma comment(lib, "cryptalgo.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(Crypto)
2 changes: 2 additions & 0 deletions Source/extensions/warningreporting/warningreporting.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
#ifdef __WINDOWS__
#pragma comment(lib, "warningreporting.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(WarningReporting)
2 changes: 2 additions & 0 deletions Source/messaging/messaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@
#ifdef __WINDOWS__
#pragma comment(lib, "messaging.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(Messaging)
3 changes: 3 additions & 0 deletions Source/plugins/plugins.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@
#ifdef __WINDOWS__
#pragma comment(lib, "plugins.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(Plugin)
WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(PluginHost)
3 changes: 3 additions & 0 deletions Source/websocket/websocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
#ifdef __WINDOWS__
#pragma comment(lib, "websocket.lib")
#endif

WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(Web)
WPEFRAMEWORK_NESTEDNAMESPACE_COMPATIBILIY(JSONRPC)

0 comments on commit 375b9bf

Please sign in to comment.