diff --git a/headers/private/app/AppServerLink.h b/headers/private/app/AppServerLink.h index e4c03ea122..deb58399de 100644 --- a/headers/private/app/AppServerLink.h +++ b/headers/private/app/AppServerLink.h @@ -37,6 +37,7 @@ // Project Includes ------------------------------------------------------------ #include #include +#include // Local Includes -------------------------------------------------------------- @@ -44,11 +45,10 @@ // Globals --------------------------------------------------------------------- -//class PortLink; namespace BPrivate { -class BAppServerLink : public BSession +class BAppServerLink : public PortLink { public: BAppServerLink(void); diff --git a/headers/private/app/PortLink.h b/headers/private/app/PortLink.h index e508f4e46c..ebf5f3e8b9 100644 --- a/headers/private/app/PortLink.h +++ b/headers/private/app/PortLink.h @@ -1,3 +1,29 @@ +//------------------------------------------------------------------------------ +// Copyright (c) 2001-2002, OpenBeOS +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// File Name: PortLink.h +// Author: DarkWyrm +// Description: Class for low-overhead port-based messaging +// +//------------------------------------------------------------------------------ #ifndef _PORTLINK_H #define _PORTLINK_H diff --git a/headers/private/app/PortMessage.h b/headers/private/app/PortMessage.h index 82eec95354..a82282ca55 100644 --- a/headers/private/app/PortMessage.h +++ b/headers/private/app/PortMessage.h @@ -69,13 +69,11 @@ public: } void Rewind(void); - void BSessionWorkaround(void); private: int32 _code; uint8 *_buffer; ssize_t _buffersize; uint8 *_index; - bool is_session_msg; }; #endif diff --git a/headers/private/app/ServerProtocol.h b/headers/private/app/ServerProtocol.h index da7cf66fa0..8ce1a88a94 100644 --- a/headers/private/app/ServerProtocol.h +++ b/headers/private/app/ServerProtocol.h @@ -13,7 +13,7 @@ enum SERVER_TRUE='_srt', SERVER_FALSE, AS_SERVER_BMESSAGE, -AS_SERVER_SESSION, +AS_SERVER_AREALINK, // Application definitions AS_CREATE_APP, diff --git a/headers/private/app/Session.h b/headers/private/app/Session.h index ad0c4efa14..3b32eb5e68 100644 --- a/headers/private/app/Session.h +++ b/headers/private/app/Session.h @@ -11,16 +11,16 @@ class BSession { public: - BSession(port_id receivePort, port_id sendPort, bool isPortLink = false); - BSession(int32, char *); - BSession( const BSession &ses ); -virtual ~BSession(); + BSession(port_id receivePort, port_id sendPort, bool isPortLink = false); + BSession(int32, char *); + BSession( const BSession &ses ); + virtual ~BSession(); void SetSendPort( port_id port ); void SetRecvPort( port_id port ); port_id GetSendPort(void) const { return fSendPort; } port_id GetRecvPort(void) const { return fReceivePort; } bool DropInputBuffer(); - + void SetMsgCode(int32 code); char* ReadString(); status_t ReadBool( bool *b ); status_t ReadInt8( int8 *i ); @@ -66,7 +66,6 @@ virtual ~BSession(); status_t Sync(); void Close(); private: -friend class PortLink; port_id fSendPort; port_id fReceivePort; @@ -80,6 +79,5 @@ friend class PortLink; int32 fReceivePosition; }; -//extern _IMPEXP_BE _BSession_ *main_session; #endif