reverted HTTPCLient debug back to defaulted off
Fork of MTS-Socket by
Diff: CommInterface.h
- Revision:
- 1:096f484f3ae6
- Parent:
- 0:eef30dbe1130
- Child:
- 2:ebc6129de4e8
diff -r eef30dbe1130 -r 096f484f3ae6 CommInterface.h --- a/CommInterface.h Thu May 15 22:02:08 2014 +0000 +++ b/CommInterface.h Mon May 19 12:36:11 2014 -0500 @@ -1,4 +1,38 @@ #ifndef COMMINTERFACE_H #define COMMINTERFACE_H -#endif \ No newline at end of file +#include "mbed.h" + +/** This pure virtual class for communications link of interface. This class +* should be derived from when creating a class to manage the underlying connection +* of a new link type. +*/ +class CommInterface +{ +public: + /** This method is used to establish a connection on a communications link. Required + * configurations and settings should be done in other calls or an init function. + * + * @returns true if the connection was successfully established, otherwise false. + */ + virtual bool connect() = 0; + + /** This method is used to disconnect a communications like. This includes + * any cleanup required before another connection can be made. + */ + virtual void disconnect() = 0; + + /** This method is used to check if the link is currently connected. + * + * @returns true if currently connected, otherwise false. + */ + virtual bool isConnected() = 0; + + /** This method is used to reset the device that provides the communications + * capability. Note that this call should block until the commincations device + * is ready for use. + */ + virtual void reset() = 0; +}; + +#endif /* COMMINTERFACE_H */