Files
allwpilib/networktables/cpp/include/networktables2/connection/ConnectionAdapter.h
Brad Miller 69d9ad70ab CMake Changes
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.

Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
2014-04-01 11:18:29 -04:00

47 lines
1.2 KiB
C++

/*
* ConnectionAdapter.h
*
* Created on: Sep 16, 2012
* Author: Mitchell Wills
*/
#ifndef CONNECTIONADAPTER_H_
#define CONNECTIONADAPTER_H_
class ConnectionAdapter;
#include "networktables2/NetworkTableEntry.h"
#include "networktables2/connection/BadMessageException.h"
#include "networktables2/util/IOException.h"
#include "tables/ITable.h"
class ConnectionAdapter
{
public:
virtual ~ConnectionAdapter()
{
}
//returns true if the connection should still be alive
virtual bool keepAlive() = 0;
virtual void clientHello(ProtocolVersion protocolRevision) = 0;
virtual void serverHelloComplete() = 0;
virtual void protocolVersionUnsupported(ProtocolVersion protocolRevision) = 0;
virtual void offerIncomingAssignment(NetworkTableEntry* newEntry) = 0;
virtual void offerIncomingUpdate(NetworkTableEntry* newEntry, SequenceNumber sequenceNumber, EntryValue value) = 0;
virtual NetworkTableEntry* GetEntry(EntryId) = 0;
/**
* called if a bad message exception is thrown
* @param e
*/
virtual void badMessage(BadMessageException& e) = 0;
/**
* called if an io exception is thrown
* @param e
*/
virtual void ioException(IOException& e) = 0;
};
#endif /* CONNECTIONADAPTER_H_ */