# ne7ssh_session.h

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005-2007 by NetSieben Technologies INC                 *
    00003  *   Author: Andrew Useckas                                                *
    00004  *   Email: andrew@netsieben.com                                           *
    00005  *                                                                         *
    00006  *   Windows Port and bugfixes: Keef Aragon <keef@netsieben.com>           *
    00007  *                                                                         *
    00008  *   This program may be distributed under the terms of the Q Public       *
    00009  *   License as defined by Trolltech AS of Norway and appearing in the     *
    00010  *   file LICENSE.QPL included in the packaging of this file.              *
    00011  *                                                                         *
    00012  *   This program is distributed in the hope that it will be useful,       *
    00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *
    00015  ***************************************************************************/
    00016
    00017 #ifndef NE7SSH_SESSION_H
    00018 #define NE7SSH_SESSION_H
    00019
    00020 #include "ne7ssh_types.h"
    00021 #include "ne7ssh_transport.h"
    00022 #include "crypt.h"
    00023
    00027 class ne7ssh_session
    00028 {
    00029   private:
    00030     Botan::SecureVector<Botan::byte> localVersion;
    00031     Botan::SecureVector<Botan::byte> remoteVersion;
    00032     Botan::SecureVector<Botan::byte> sessionID;
    00033     uint32 sendChannel;
    00034     uint32 receiveChannel;
    00035     uint32 maxPacket;
    00036     int32 channelID;
    00037
    00038   public:
    00039     ne7ssh_transport *transport;
    00040     ne7ssh_crypt *crypto;
    00041
    00045     ne7ssh_session();
    00046
    00050     ~ne7ssh_session();
    00051
    00056     void setLocalVersion (Botan::SecureVector<Botan::byte>& version) { localVersion = version; }
    00057
    00062     Botan::SecureVector<Botan::byte> &getLocalVersion () { return localVersion; }
    00063
    00068     void setRemoteVersion (Botan::SecureVector<Botan::byte>& version) { remoteVersion = version; }
    00069
    00074     Botan::SecureVector<Botan::byte> &getRemoteVersion () { return remoteVersion; }
    00075
    00080     void setSessionID (Botan::SecureVector<Botan::byte>& session) { sessionID = session; }
    00081
    00086     Botan::SecureVector<Botan::byte> &getSessionID () { return sessionID; }
    00087
    00092     void setSendChannel (uint32 channel) { sendChannel = channel; }
    00093
    00098     uint32 getSendChannel () const { return sendChannel; }
    00099
    00104     void setReceiveChannel (uint32 channel) { receiveChannel = channel; }
    00105
    00110     uint32 getReceiveChannel () { return receiveChannel; }
    00111
    00116     void setMaxPacket (uint32 size) { maxPacket = size; }
    00117
    00122     uint32 getMaxPacket () { return maxPacket; }
    00123
    00128     void setSshChannel (int32 channel) { channelID = channel; }
    00129
    00134     int32 getSshChannel () { return channelID; }
    00135
    00136
    00137 };
    00138
    00139 #endif