blob: 757f0edace5a678d408345ecf5dc122e82ec7190 [file] [log] [blame]
jerrymf1579332013-02-07 01:56:28 +00001/*
2 * IRemote.h
3 *
4 * Created on: Sep 22, 2012
5 * Author: Mitchell Wills
6 */
7
8#ifndef IREMOTE_H_
9#define IREMOTE_H_
10
11class IRemote;
12
13
14#include "IRemoteConnectionListener.h"
15
16
17
18/**
19 * Represents an object that has a remote connection
20 *
21 * @author Mitchell
22 *
23 */
24class IRemote {
25public:
26 /**
27 * Register an object to listen for connection and disconnection events
28 *
29 * @param listener the listener to be register
30 * @param immediateNotify if the listener object should be notified of the current connection state
31 */
32 virtual void AddConnectionListener(IRemoteConnectionListener* listener, bool immediateNotify) = 0;
33
34 /**
35 * Unregister a listener from connection events
36 *
37 * @param listener the listener to be unregistered
38 */
39 virtual void RemoveConnectionListener(IRemoteConnectionListener* listener) = 0;
40
41 /**
42 * Get the current state of the objects connection
43 * @return the current connection state
44 */
45 virtual bool IsConnected() = 0;
46
47 /**
48 * If the object is acting as a server
49 * @return if the object is a server
50 */
51 virtual bool IsServer() = 0;
52};
53
54
55#endif /* IREMOTE_H_ */