Frank Weissenborn / ShoutCastConnector
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ShoutcastConnector.h Source File

ShoutcastConnector.h

00001 #ifndef __SHOUTCASTCONNECTOR_H
00002 #define __SHOUTCASTCONNECTOR_H
00003 
00004 
00005 #include "VS1053.h"
00006 #include "TCPSocket.h"
00007 
00008 typedef void (*myCallBack_pfn)(const char*, int, int, int);
00009 
00010 class ShoutcastConnector
00011 {
00012 public:
00013     ShoutcastConnector(VS1053* mp3,myCallBack_pfn, char *buffer, int buffer_size);
00014     int Connect(IpAddr address, int port, const char * path);
00015     int Disconnect();
00016 private:
00017     VS1053*                          _mp3;
00018     myCallBack_pfn                   _callback;
00019     TCPSocket                        _sock;
00020     char*                            _buffer;
00021     int                              _buffer_size;
00022     const char *                           _path;
00023 
00024     void Writeable();
00025     void Readable();
00026     
00027     void onTCPSocketEvent(TCPSocketEvent e);
00028 };
00029 
00030 #endif