Simplfied AppServerLink interface

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3933 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2003-07-10 16:56:27 +00:00
parent 61480f2184
commit faa6a27319
2 changed files with 8 additions and 14 deletions

View File

@ -31,7 +31,6 @@
// System Includes -------------------------------------------------------------
#include <Application.h>
#include <PortLink.h>
// Project Includes ------------------------------------------------------------
#include <AppServerLink.h>
@ -44,23 +43,19 @@
namespace BPrivate {
//------------------------------------------------------------------------------
BAppServerLink::BAppServerLink()
BAppServerLink::BAppServerLink(void)
: PortLink(0L)
{
be_app->Lock();
portlink=new PortLink(be_app->fServerFrom);
SetPort(be_app->fServerFrom);
}
//------------------------------------------------------------------------------
BAppServerLink::~BAppServerLink()
{
delete portlink;
be_app->Unlock();
}
//------------------------------------------------------------------------------
void BAppServerLink::Init()
{
}
//------------------------------------------------------------------------------
} // namespace BPrivate

View File

@ -66,12 +66,11 @@ BCursor::BCursor(const void *cursorData)
// Send data directly to server
BPrivate::BAppServerLink *serverlink = new BPrivate::BAppServerLink;
serverlink->Init();
serverlink->portlink->SetOpCode(AS_SET_CURSOR_BCURSOR);
serverlink->portlink->Attach((void *)cursorData,68);
serverlink->SetOpCode(AS_SET_CURSOR_BCURSOR);
serverlink->Attach((void *)cursorData,68);
//Rumor has it that this API will be cleaned up later
buffer=serverlink->portlink->FlushWithReply(&returncode,&status,&buffersize);
buffer=serverlink->FlushWithReply(&returncode,&status,&buffersize);
m_serverToken=*((int32*)buffer);
delete serverlink;