mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2024-12-22 07:30:40 +00:00
effa18a344
git-svn-id: svn://qnap.local/TwoTerm/trunk@1987 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
36 lines
627 B
C++
36 lines
627 B
C++
/*
|
|
* OutputChannel.h
|
|
* 2Term
|
|
*
|
|
* Created by Kelvin Sherlock on 7/7/2010.
|
|
* Copyright 2010 __MyCompanyName__. All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef __OUTPUT_CHANNEL_H__
|
|
#define __OUTPUT_CHANNEL_H__
|
|
|
|
#include <stdint.h>
|
|
#include <sys/types.h>
|
|
|
|
class OutputChannel
|
|
{
|
|
public:
|
|
OutputChannel(int fd) : _fd(fd), _error(0) {};
|
|
|
|
bool write(uint8_t);
|
|
bool write(const char *);
|
|
bool write(const void *, size_t);
|
|
|
|
int error() const { return _error; }
|
|
|
|
private:
|
|
OutputChannel(const OutputChannel&);
|
|
OutputChannel& operator=(const OutputChannel&);
|
|
|
|
int _fd;
|
|
int _error;
|
|
};
|
|
|
|
|
|
#endif |