aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd/channel.h
blob: 444208872e301ed7e95dbdd85f6ef2c2fcc9a169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _channel_h_
#define _channel_h_

#include <stdio.h>

#include "bool.h"

class ncp;
class bufferStore;

class channel {
	public:
		channel(ncp *ncpController);
		void newNcpController(ncp *ncpController);

		void setNcpChannel(int chan);
		void ncpSend(bufferStore &a);
		void setVerbose(short int _verbose);
		short int getVerbose();
		virtual void ncpDataCallback(bufferStore &a) = NULL;
		virtual const char *getNcpConnectName() = NULL;
		void ncpConnect();
		virtual void ncpConnectAck() = NULL;
		virtual void ncpConnectTerminate() = NULL;
		void ncpDisconnect();

		// The following two calls are used for destructing an instance
		virtual bool terminate(); // Mainloop will terminate this class if true
		void terminateWhenAsked();

	protected:
		short int verbose;

	private:
		ncp *ncpController;
		bool _terminate;
		int ncpChannel;
};

#endif