Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

libs/Network/uip/CommandQueue.h

Committer:
Michael J. Spencer
Date:
2014-02-28
Revision:
2:1df0b61d3b5a

File content as of revision 2:1df0b61d3b5a:

#ifndef _COMMANDQUEUE_H_
#define _COMMANDQUEUE_H_

#ifdef __cplusplus

#include "fifo.h"
#include <string>

#include "StreamOutput.h"

class CommandQueue
{
public:
    CommandQueue();
    ~CommandQueue();
    bool pop();
    int add(const char* cmd, StreamOutput *pstream);
    int size() {return q.size();}
    static CommandQueue* getInstance();

private:
    typedef struct {char* str; StreamOutput *pstream; } cmd_t;
    Fifo<cmd_t> q;
    static CommandQueue *instance;
    StreamOutput *null_stream;
};

#else

extern int network_add_command(const char * cmd, void *pstream);
#endif

#endif