Download NHK English news podcast automatically. XML Parser "spxml" is used. This application requires mpod mother board. See also http://mbed.org/users/geodenx/notebook/mpod/

Dependencies:   BlinkLed HTTPClient EthernetInterface FatFileSystemCpp MSCFileSystem spxml mbed-rtos mbed

Fork of mpod_nhk_english by Satoshi Togawa

Download NHK English news podcast automatically.
XML Parser "spxml" is used.
This application requires mpod mother board.
See also http://mbed.org/users/geodenx/notebook/mpod/

Committer:
togayan
Date:
Mon Aug 20 13:27:17 2012 +0000
Revision:
4:7dae52cf560f
1st revision

Who changed what in which revision?

UserRevisionLine numberNew contents of line
togayan 4:7dae52cf560f 1 /*
togayan 4:7dae52cf560f 2 * Copyright 2007 Stephen Liu
togayan 4:7dae52cf560f 3 * For license terms, see the file COPYING along with this library.
togayan 4:7dae52cf560f 4 */
togayan 4:7dae52cf560f 5
togayan 4:7dae52cf560f 6 #ifndef __spxmlcodec_hpp__
togayan 4:7dae52cf560f 7 #define __spxmlcodec_hpp__
togayan 4:7dae52cf560f 8
togayan 4:7dae52cf560f 9 class SP_XmlStringBuffer;
togayan 4:7dae52cf560f 10
togayan 4:7dae52cf560f 11 class SP_XmlStringCodec {
togayan 4:7dae52cf560f 12 public:
togayan 4:7dae52cf560f 13
togayan 4:7dae52cf560f 14 static const char * DEFAULT_ENCODING;
togayan 4:7dae52cf560f 15
togayan 4:7dae52cf560f 16 static int decode( const char * encoding,
togayan 4:7dae52cf560f 17 const char * encodeValue, SP_XmlStringBuffer * outBuffer );
togayan 4:7dae52cf560f 18 static int encode( const char * encoding,
togayan 4:7dae52cf560f 19 const char * decodeValue, SP_XmlStringBuffer * outBuffer );
togayan 4:7dae52cf560f 20 static int isNameChar( const char * encoding, char c );
togayan 4:7dae52cf560f 21
togayan 4:7dae52cf560f 22 private:
togayan 4:7dae52cf560f 23 static const char XML_CHARS [];
togayan 4:7dae52cf560f 24 static const char * ESC_CHARS [];
togayan 4:7dae52cf560f 25
togayan 4:7dae52cf560f 26 SP_XmlStringCodec();
togayan 4:7dae52cf560f 27 };
togayan 4:7dae52cf560f 28
togayan 4:7dae52cf560f 29 class SP_XmlUtf8Codec {
togayan 4:7dae52cf560f 30 public:
togayan 4:7dae52cf560f 31
togayan 4:7dae52cf560f 32 // @return convert how many bytes
togayan 4:7dae52cf560f 33 static int utf82uni( const unsigned char * utf8, int * ch );
togayan 4:7dae52cf560f 34
togayan 4:7dae52cf560f 35 static void uni2utf8( int ch, SP_XmlStringBuffer * outBuffer );
togayan 4:7dae52cf560f 36
togayan 4:7dae52cf560f 37 private:
togayan 4:7dae52cf560f 38 SP_XmlUtf8Codec();
togayan 4:7dae52cf560f 39 };
togayan 4:7dae52cf560f 40
togayan 4:7dae52cf560f 41 #endif