I work with dll callbacks, its have many global functions.
Example: Do dll callback - #3 by Chatouille
I try hide it with namespace, its show no errors, but build fail - show voids functions is privacy.
include “WebHandlerSubsystem.h”
include “Async/Async.h”
typedef bool (* XN_GetBoolean)();
typedef void (* XN_StringVoid)(char *data);
typedef void (* XN_StringCallbackVoid)(const char *data);
typedef void (* XN_NewAccountVoid)(const char *email, const char *password);
typedef void (* XN_BooleanCallbackVoid)(const bool *isSuccess);
typedef void (* XN_LoginCallbackVoid)(const int *AccountID);
typedef void (* XN_CharDataCallbackVoid)(const int *charID, const char *charName, const int *charGender, const char *charSave);
typedef void (* XN_CharsListCallbackVoid)(const int *slot, const int *charID, const char *charName, const int *charGender);
namespace my_namespace
{
XN_StringCallbackVoid XN_PtrCatchError;
void XN_CatchConnectError(const char* msg);
typedef void(*GetErrorCallbackVoid)(XN_StringCallbackVoid callback);
XN_ActionCallbackVoid XN_PtrReadyConnection;
void XN_ConnectStatusReady();
typedef void(*GetCallbackConnectReady)(XN_ActionCallbackVoid callback);
XN_BooleanCallbackVoid XN_PtrConnectStatusChange;
void XN_ConnectStatusChange(const bool* Yep);
typedef void(*GetCallbackConnectState)(XN_BooleanCallbackVoid callback);
//EVENTS CHARACTERS
XN_LoginCallbackVoid XN_PtrIsLoginValid;
void XN_LoginIsValid(const int *AccountID);
typedef void(*GetCallbackLogin)(XN_LoginCallbackVoid callback);
XN_ActionCallbackVoid XN_PtrCharListEmpty;
void XN_CharListIsEmpty();
typedef void(*GetCallbackCharListEmpty)(XN_ActionCallbackVoid callback);
}
//EVENTS CONNECT
using namespace my_namespace;