#include <Application.h>
#include <ApplicationPrivate.h>
#include <AppServerLink.h>
#include <locks.h>
static recursive_lock sLock = RECURSIVE_LOCK_INITIALIZER("AppServerLink_sLock");
namespace BPrivate {
AppServerLink::AppServerLink()
{
recursive_lock_lock(&sLock);
if (be_app != NULL) {
fReceiver = &BApplication::Private::ServerLink()->Receiver();
fSender = &BApplication::Private::ServerLink()->Sender();
} else {
debugger("You need to have a valid app_server connection first!");
}
}
AppServerLink::~AppServerLink()
{
recursive_lock_unlock(&sLock);
}
}