FifoListen.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028
00029
00031
00032
00033 #ifndef __FIFO_LISTEN_H
00034 #define __FIFO_LISTEN_H
00035
00036 #ifdef MIP_HOST_APPLE
00037 #include <applePatch.h>
00038 #include <sys/types.h>
00039 #include <sys/stat.h>
00040 #endif
00041
00042 #include <sys/types.h>
00043 #include <sys/stat.h>
00044 #include <stdio.h>
00045 #include <fcntl.h>
00046 #include <unistd.h>
00047 #include <stdlib.h>
00048 #include <signal.h>
00049 #include <assert.h>
00050 #include <string>
00051 #include <cstring>
00052 #include <iostream>
00053 #include <vector>
00054
00055 using namespace std;
00056
00057 #include "FifoStructs.h"
00058
00061 class FifoListen{
00062 private:
00063 string _name;
00064 int _fd, _retVal, _count, _numRead;
00065 char* _buf;
00066 string _lastMsg;
00067
00068 public:
00069
00073 FifoListen(string name);
00074
00076 ~FifoListen();
00077
00079 void receive(string& msg);
00080 };
00081
00082 #endif
00083
00084
00085