output_plugin.h 679 Bytes
Newer Older
jcaceres's avatar
jcaceres committed
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 _OUTPUT_PLUGIN_H
#define _OUTPUT_PLUGIN_H

#include "plugin.h"

class Stream;

/**
 * @brief Virtual function declarations for outputs from Stream
 */

class OutputPlugin : public Plugin
{
  protected:
    int    key;
    Stream *stream;
  public:
    OutputPlugin(char *name) : key(-1)
        {
            this->setName(name);
			this->dontRun = false;
        }
    virtual int send(char *buf) = 0;
    virtual void stop() = 0;
    void setReadKey(int newKey)
        {
            key = newKey;
        }
    int getReadKey()
        {
            return key;
        }
    void setStream( Stream *str )
        {
            stream = str;
        }
    
};

#endif