2
* $Id: NG_TerraplayNetworkDeviceInterface.h 29240 2010-06-05 15:31:55Z campbellbarton $
4
* ***** BEGIN GPL LICENSE BLOCK *****
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21
* All rights reserved.
23
* The Original Code is: all of this file.
25
* Contributor(s): none yet.
27
* ***** END GPL LICENSE BLOCK *****
28
* TerraplayNetworkDeviceInterface derived from NG_NetworkDeviceInterface
30
#ifndef NG_TERRAPLAYNETWORKDEVICEINTERFACE_H
31
#define NG_TERRAPLAYNETWORKDEVICEINTERFACE_H
34
#include "GASInterface.h"
35
#include "NG_NetworkDeviceInterface.h"
37
class NG_TerraplayNetworkDeviceInterface : public NG_NetworkDeviceInterface
39
std::deque<NG_NetworkMessage*> m_messages;
41
// Terraplay GAS stuff
44
GASRequestId group_id_request;
45
int group_id_request_valid;
47
void interface_error(char *str, GASResult error);
49
NG_TerraplayNetworkDeviceInterface();
50
~NG_TerraplayNetworkDeviceInterface();
52
bool Connect(char *GAS_address, unsigned int GAS_port,
53
char *GAS_password, unsigned int localport,
54
unsigned int timeout);
55
bool Disconnect(void);
57
void SendNetworkMessage(NG_NetworkMessage* nwmsg);
58
vector<NG_NetworkMessage*> RetrieveNetworkMessages(void);
63
#endif //NG_TERRAPLAYNETWORKDEVICEINTERFACE_H