From faa6a27319bb6ab1226fbb4be156cdfea2124503 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Thu, 10 Jul 2003 16:56:27 +0000 Subject: [PATCH] Simplfied AppServerLink interface git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3933 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/AppServerLink.cpp | 15 +++++---------- src/kits/app/Cursor.cpp | 7 +++---- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/kits/app/AppServerLink.cpp b/src/kits/app/AppServerLink.cpp index 7441267fbe..2d6a837dde 100644 --- a/src/kits/app/AppServerLink.cpp +++ b/src/kits/app/AppServerLink.cpp @@ -31,7 +31,6 @@ // System Includes ------------------------------------------------------------- #include -#include // Project Includes ------------------------------------------------------------ #include @@ -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 diff --git a/src/kits/app/Cursor.cpp b/src/kits/app/Cursor.cpp index 740f9d4928..6e8fbe3bc5 100644 --- a/src/kits/app/Cursor.cpp +++ b/src/kits/app/Cursor.cpp @@ -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;