Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Shoutcast.h
- Revision:
- 0:d9d38ebc0f69
- Child:
- 2:0e9a10f2b8c5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Shoutcast.h Mon Jan 24 13:32:52 2011 +0000
@@ -0,0 +1,47 @@
+#ifndef __SHOUTCAST_H
+#define __SHOUTCAST_H
+
+#include "EthernetNetIf.h"
+
+#include "DNSRequest.h"
+
+#include "defines.h"
+
+class Shoutcast
+{
+public:
+ Shoutcast(const char* devId, char * buffer, int buffer_size);
+
+ const char* GetPrevGenre();
+ const char* GetCurrGenre();
+ const char* GetNextGenre();
+
+ int GetChannel(char* name, int length); //cache
+ int GetTop500(char* name, int length);
+
+ int GetPrevChannel(char* name, int length);
+ int GetCurrChannel(char* name, int length);
+ int GetNextChannel(char* name, int length);
+
+
+ int TuneIn(IpAddr* address, int* port);
+ int GetNextAddress(IpAddr* address, int* port);
+ int GetCurrAddress(IpAddr* address, int* port);
+ int GetPrevAddress(IpAddr* address, int* port);
+
+
+
+private:
+ const char* _devId;
+ int ParseChannelList(const char* channelList);
+ int ParsePls();
+ int GetChannel(char* name, int length, int channelNumber);
+ int GetAddressData(IpAddr* address, int* port, int addressNumber);
+ void onReply(DNSReply reply);
+ int ResolveDNSRequest(IpAddr* addr, char * url);
+ int GetChannelId(int channelNumber);
+ char * _buffer;
+ int _buffer_size;
+};
+
+#endif
\ No newline at end of file