Janitorial work, mostly.

Removed SetMsgCode()


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7903 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2004-06-11 12:55:42 +00:00
parent 57e2e4fe35
commit 0223e22e5a

View File

@ -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: Session.h
// Author: Adi Oanca <adioanca@mymail.ro>
// Description: Stream-based messaging class
//
//------------------------------------------------------------------------------
#ifndef _SESSION_H
#define _SESSION_H
@ -8,20 +34,19 @@
#include <Point.h>
#include <ServerProtocol.h>
class BSession {
class BSession
{
public:
BSession(port_id receivePort, port_id sendPort);
BSession(int32, char *);
BSession( const BSession &ses );
virtual ~BSession();
virtual ~BSession(void);
void SetSendPort( port_id port );
void SetRecvPort( port_id port );
port_id GetSendPort(void) const { return fSendPort; }
port_id GetRecvPort(void) const { return fReceivePort; }
void SetMsgCode(int32 code);
char* ReadString();
char *ReadString();
void ReadBool( bool *b );
void ReadInt8( int8 *i );
void ReadUInt8( uint8 *i );
@ -65,16 +90,17 @@ public:
void Sync();
void Close();
// if possible - do not use!
void CopyToSendBuffer(void* buffer, int32 count);
private:
// if possible, do not use
void SetMsgCode(int32 code);
void CopyToSendBuffer(void* buffer, int32 count);
private:
port_id fSendPort;
port_id fReceivePort;
char *fSendBuffer;
int32 fSendPosition;
int32 fSendCode;
int32 fRecvCode;
char *fReceiveBuffer;