Library for Bert van Dam's book "ARM MICROCONTROLLERS" For all chapters with internet.

Dependencies:   mbed

Committer:
ICTFBI
Date:
Fri Oct 16 14:28:26 2015 +0000
Revision:
0:4edb816d21e1
Pre-update 16-10-15

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ICTFBI 0:4edb816d21e1 1
ICTFBI 0:4edb816d21e1 2 /*
ICTFBI 0:4edb816d21e1 3 Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
ICTFBI 0:4edb816d21e1 4
ICTFBI 0:4edb816d21e1 5 Permission is hereby granted, free of charge, to any person obtaining a copy
ICTFBI 0:4edb816d21e1 6 of this software and associated documentation files (the "Software"), to deal
ICTFBI 0:4edb816d21e1 7 in the Software without restriction, including without limitation the rights
ICTFBI 0:4edb816d21e1 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
ICTFBI 0:4edb816d21e1 9 copies of the Software, and to permit persons to whom the Software is
ICTFBI 0:4edb816d21e1 10 furnished to do so, subject to the following conditions:
ICTFBI 0:4edb816d21e1 11
ICTFBI 0:4edb816d21e1 12 The above copyright notice and this permission notice shall be included in
ICTFBI 0:4edb816d21e1 13 all copies or substantial portions of the Software.
ICTFBI 0:4edb816d21e1 14
ICTFBI 0:4edb816d21e1 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ICTFBI 0:4edb816d21e1 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
ICTFBI 0:4edb816d21e1 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
ICTFBI 0:4edb816d21e1 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
ICTFBI 0:4edb816d21e1 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ICTFBI 0:4edb816d21e1 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
ICTFBI 0:4edb816d21e1 21 THE SOFTWARE.
ICTFBI 0:4edb816d21e1 22 */
ICTFBI 0:4edb816d21e1 23
ICTFBI 0:4edb816d21e1 24 /** \file
ICTFBI 0:4edb816d21e1 25 HTTP Client header file
ICTFBI 0:4edb816d21e1 26 */
ICTFBI 0:4edb816d21e1 27
ICTFBI 0:4edb816d21e1 28 #ifndef HTTP_CLIENT_H
ICTFBI 0:4edb816d21e1 29 #define HTTP_CLIENT_H
ICTFBI 0:4edb816d21e1 30
ICTFBI 0:4edb816d21e1 31 class HTTPData;
ICTFBI 0:4edb816d21e1 32
ICTFBI 0:4edb816d21e1 33 #include "core/net.h"
ICTFBI 0:4edb816d21e1 34 #include "api/TCPSocket.h"
ICTFBI 0:4edb816d21e1 35 #include "api/DNSRequest.h"
ICTFBI 0:4edb816d21e1 36 #include "HTTPData.h"
ICTFBI 0:4edb816d21e1 37 #include "mbed.h"
ICTFBI 0:4edb816d21e1 38
ICTFBI 0:4edb816d21e1 39 #include <string>
ICTFBI 0:4edb816d21e1 40 using std::string;
ICTFBI 0:4edb816d21e1 41
ICTFBI 0:4edb816d21e1 42 #include <map>
ICTFBI 0:4edb816d21e1 43 using std::map;
ICTFBI 0:4edb816d21e1 44
ICTFBI 0:4edb816d21e1 45 ///HTTP client results
ICTFBI 0:4edb816d21e1 46 enum HTTPResult
ICTFBI 0:4edb816d21e1 47 {
ICTFBI 0:4edb816d21e1 48 HTTP_OK, ///<Success
ICTFBI 0:4edb816d21e1 49 HTTP_PROCESSING, ///<Processing
ICTFBI 0:4edb816d21e1 50 HTTP_PARSE, ///<URI Parse error
ICTFBI 0:4edb816d21e1 51 HTTP_DNS, ///<Could not resolve name
ICTFBI 0:4edb816d21e1 52 HTTP_PRTCL, ///<Protocol error
ICTFBI 0:4edb816d21e1 53 HTTP_NOTFOUND, ///<HTTP 404 Error
ICTFBI 0:4edb816d21e1 54 HTTP_REFUSED, ///<HTTP 403 Error
ICTFBI 0:4edb816d21e1 55 HTTP_ERROR, ///<HTTP xxx error
ICTFBI 0:4edb816d21e1 56 HTTP_TIMEOUT, ///<Connection timeout
ICTFBI 0:4edb816d21e1 57 HTTP_CONN ///<Connection error
ICTFBI 0:4edb816d21e1 58 };
ICTFBI 0:4edb816d21e1 59
ICTFBI 0:4edb816d21e1 60 #include "core/netservice.h"
ICTFBI 0:4edb816d21e1 61
ICTFBI 0:4edb816d21e1 62 ///A simple HTTP Client
ICTFBI 0:4edb816d21e1 63 /**
ICTFBI 0:4edb816d21e1 64 The HTTPClient is composed of:
ICTFBI 0:4edb816d21e1 65 - The actual client (HTTPClient)
ICTFBI 0:4edb816d21e1 66 - Classes that act as a data repository, each of which deriving from the HTTPData class (HTTPText for short text content, HTTPFile for file I/O, HTTPMap for key/value pairs, and HTTPStream for streaming purposes)
ICTFBI 0:4edb816d21e1 67 */
ICTFBI 0:4edb816d21e1 68 class HTTPClient : protected NetService
ICTFBI 0:4edb816d21e1 69 {
ICTFBI 0:4edb816d21e1 70 public:
ICTFBI 0:4edb816d21e1 71 ///Instantiates the HTTP client
ICTFBI 0:4edb816d21e1 72 HTTPClient();
ICTFBI 0:4edb816d21e1 73 virtual ~HTTPClient();
ICTFBI 0:4edb816d21e1 74
ICTFBI 0:4edb816d21e1 75 ///Provides a basic authentification feature (Base64 encoded username and password)
ICTFBI 0:4edb816d21e1 76 void basicAuth(const char* user, const char* password); //Basic Authentification
ICTFBI 0:4edb816d21e1 77
ICTFBI 0:4edb816d21e1 78 //High Level setup functions
ICTFBI 0:4edb816d21e1 79 ///Executes a GET Request (blocking)
ICTFBI 0:4edb816d21e1 80 /**
ICTFBI 0:4edb816d21e1 81 Executes a GET request on the URI uri
ICTFBI 0:4edb816d21e1 82 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 83 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 84 Blocks until completion
ICTFBI 0:4edb816d21e1 85 */
ICTFBI 0:4edb816d21e1 86 HTTPResult get(const char* uri, HTTPData* pDataIn); //Blocking
ICTFBI 0:4edb816d21e1 87
ICTFBI 0:4edb816d21e1 88 ///Executes a GET Request (non blocking)
ICTFBI 0:4edb816d21e1 89 /**
ICTFBI 0:4edb816d21e1 90 Executes a GET request on the URI uri
ICTFBI 0:4edb816d21e1 91 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 92 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 93 @param pMethod : callback function
ICTFBI 0:4edb816d21e1 94 The function returns immediately and calls the callback on completion or error
ICTFBI 0:4edb816d21e1 95 */
ICTFBI 0:4edb816d21e1 96 HTTPResult get(const char* uri, HTTPData* pDataIn, void (*pMethod)(HTTPResult)); //Non blocking
ICTFBI 0:4edb816d21e1 97
ICTFBI 0:4edb816d21e1 98 ///Executes a GET Request (non blocking)
ICTFBI 0:4edb816d21e1 99 /**
ICTFBI 0:4edb816d21e1 100 Executes a GET request on the URI uri
ICTFBI 0:4edb816d21e1 101 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 102 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 103 @param pItem : instance of class on which to execute the callback method
ICTFBI 0:4edb816d21e1 104 @param pMethod : callback method
ICTFBI 0:4edb816d21e1 105 The function returns immediately and calls the callback on completion or error
ICTFBI 0:4edb816d21e1 106 */
ICTFBI 0:4edb816d21e1 107 template<class T>
ICTFBI 0:4edb816d21e1 108 HTTPResult get(const char* uri, HTTPData* pDataIn, T* pItem, void (T::*pMethod)(HTTPResult)) //Non blocking
ICTFBI 0:4edb816d21e1 109 {
ICTFBI 0:4edb816d21e1 110 setOnResult(pItem, pMethod);
ICTFBI 0:4edb816d21e1 111 doGet(uri, pDataIn);
ICTFBI 0:4edb816d21e1 112 return HTTP_PROCESSING;
ICTFBI 0:4edb816d21e1 113 }
ICTFBI 0:4edb816d21e1 114
ICTFBI 0:4edb816d21e1 115 ///Executes a POST Request (blocking)
ICTFBI 0:4edb816d21e1 116 /**
ICTFBI 0:4edb816d21e1 117 Executes a POST request on the URI uri
ICTFBI 0:4edb816d21e1 118 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 119 @param dataOut : a HTTPData instance that contains the data that will be posted
ICTFBI 0:4edb816d21e1 120 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 121 Blocks until completion
ICTFBI 0:4edb816d21e1 122 */
ICTFBI 0:4edb816d21e1 123 HTTPResult post(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn); //Blocking
ICTFBI 0:4edb816d21e1 124
ICTFBI 0:4edb816d21e1 125 ///Executes a POST Request (non blocking)
ICTFBI 0:4edb816d21e1 126 /**
ICTFBI 0:4edb816d21e1 127 Executes a POST request on the URI uri
ICTFBI 0:4edb816d21e1 128 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 129 @param dataOut : a HTTPData instance that contains the data that will be posted
ICTFBI 0:4edb816d21e1 130 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 131 @param pMethod : callback function
ICTFBI 0:4edb816d21e1 132 The function returns immediately and calls the callback on completion or error
ICTFBI 0:4edb816d21e1 133 */
ICTFBI 0:4edb816d21e1 134 HTTPResult post(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn, void (*pMethod)(HTTPResult)); //Non blocking
ICTFBI 0:4edb816d21e1 135
ICTFBI 0:4edb816d21e1 136 ///Executes a POST Request (non blocking)
ICTFBI 0:4edb816d21e1 137 /**
ICTFBI 0:4edb816d21e1 138 Executes a POST request on the URI uri
ICTFBI 0:4edb816d21e1 139 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 140 @param dataOut : a HTTPData instance that contains the data that will be posted
ICTFBI 0:4edb816d21e1 141 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 142 @param pItem : instance of class on which to execute the callback method
ICTFBI 0:4edb816d21e1 143 @param pMethod : callback method
ICTFBI 0:4edb816d21e1 144 The function returns immediately and calls the callback on completion or error
ICTFBI 0:4edb816d21e1 145 */
ICTFBI 0:4edb816d21e1 146 template<class T>
ICTFBI 0:4edb816d21e1 147 HTTPResult post(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn, T* pItem, void (T::*pMethod)(HTTPResult)) //Non blocking
ICTFBI 0:4edb816d21e1 148 {
ICTFBI 0:4edb816d21e1 149 setOnResult(pItem, pMethod);
ICTFBI 0:4edb816d21e1 150 doPost(uri, dataOut, pDataIn);
ICTFBI 0:4edb816d21e1 151 return HTTP_PROCESSING;
ICTFBI 0:4edb816d21e1 152 }
ICTFBI 0:4edb816d21e1 153
ICTFBI 0:4edb816d21e1 154 ///Executes a GET Request (non blocking)
ICTFBI 0:4edb816d21e1 155 /**
ICTFBI 0:4edb816d21e1 156 Executes a GET request on the URI uri
ICTFBI 0:4edb816d21e1 157 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 158 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 159 The function returns immediately and calls the previously set callback on completion or error
ICTFBI 0:4edb816d21e1 160 */
ICTFBI 0:4edb816d21e1 161 void doGet(const char* uri, HTTPData* pDataIn);
ICTFBI 0:4edb816d21e1 162
ICTFBI 0:4edb816d21e1 163 ///Executes a POST Request (non blocking)
ICTFBI 0:4edb816d21e1 164 /**
ICTFBI 0:4edb816d21e1 165 Executes a POST request on the URI uri
ICTFBI 0:4edb816d21e1 166 @param uri : URI on which to execute the request
ICTFBI 0:4edb816d21e1 167 @param dataOut : a HTTPData instance that contains the data that will be posted
ICTFBI 0:4edb816d21e1 168 @param pDataIn : pointer to an HTTPData instance that will collect the data returned by the request, can be NULL
ICTFBI 0:4edb816d21e1 169 @param pMethod : callback function
ICTFBI 0:4edb816d21e1 170 The function returns immediately and calls the previously set callback on completion or error
ICTFBI 0:4edb816d21e1 171 */
ICTFBI 0:4edb816d21e1 172 void doPost(const char* uri, const HTTPData& dataOut, HTTPData* pDataIn);
ICTFBI 0:4edb816d21e1 173
ICTFBI 0:4edb816d21e1 174 ///Setups the result callback
ICTFBI 0:4edb816d21e1 175 /**
ICTFBI 0:4edb816d21e1 176 @param pMethod : callback function
ICTFBI 0:4edb816d21e1 177 */
ICTFBI 0:4edb816d21e1 178 void setOnResult( void (*pMethod)(HTTPResult) );
ICTFBI 0:4edb816d21e1 179
ICTFBI 0:4edb816d21e1 180 ///Setups the result callback
ICTFBI 0:4edb816d21e1 181 /**
ICTFBI 0:4edb816d21e1 182 @param pItem : instance of class on which to execute the callback method
ICTFBI 0:4edb816d21e1 183 @param pMethod : callback method
ICTFBI 0:4edb816d21e1 184 */
ICTFBI 0:4edb816d21e1 185 class CDummy;
ICTFBI 0:4edb816d21e1 186 template<class T>
ICTFBI 0:4edb816d21e1 187 void setOnResult( T* pItem, void (T::*pMethod)(HTTPResult) )
ICTFBI 0:4edb816d21e1 188 {
ICTFBI 0:4edb816d21e1 189 m_pCb = NULL;
ICTFBI 0:4edb816d21e1 190 m_pCbItem = (CDummy*) pItem;
ICTFBI 0:4edb816d21e1 191 m_pCbMeth = (void (CDummy::*)(HTTPResult)) pMethod;
ICTFBI 0:4edb816d21e1 192 }
ICTFBI 0:4edb816d21e1 193
ICTFBI 0:4edb816d21e1 194 ///Setups timeout
ICTFBI 0:4edb816d21e1 195 /**
ICTFBI 0:4edb816d21e1 196 @param ms : time of connection inactivity in ms after which the request should timeout
ICTFBI 0:4edb816d21e1 197 */
ICTFBI 0:4edb816d21e1 198 void setTimeout(int ms);
ICTFBI 0:4edb816d21e1 199
ICTFBI 0:4edb816d21e1 200 virtual void poll(); //Called by NetServices
ICTFBI 0:4edb816d21e1 201
ICTFBI 0:4edb816d21e1 202 ///Gets last request's HTTP response code
ICTFBI 0:4edb816d21e1 203 /**
ICTFBI 0:4edb816d21e1 204 @return The HTTP response code of the last request
ICTFBI 0:4edb816d21e1 205 */
ICTFBI 0:4edb816d21e1 206 int getHTTPResponseCode();
ICTFBI 0:4edb816d21e1 207
ICTFBI 0:4edb816d21e1 208 ///Sets a specific request header
ICTFBI 0:4edb816d21e1 209 void setRequestHeader(const string& header, const string& value);
ICTFBI 0:4edb816d21e1 210
ICTFBI 0:4edb816d21e1 211 ///Gets a response header
ICTFBI 0:4edb816d21e1 212 string& getResponseHeader(const string& header);
ICTFBI 0:4edb816d21e1 213
ICTFBI 0:4edb816d21e1 214 ///Clears request headers
ICTFBI 0:4edb816d21e1 215 void resetRequestHeaders();
ICTFBI 0:4edb816d21e1 216
ICTFBI 0:4edb816d21e1 217 protected:
ICTFBI 0:4edb816d21e1 218 void resetTimeout();
ICTFBI 0:4edb816d21e1 219
ICTFBI 0:4edb816d21e1 220 void init();
ICTFBI 0:4edb816d21e1 221 void close();
ICTFBI 0:4edb816d21e1 222
ICTFBI 0:4edb816d21e1 223 void setup(const char* uri, HTTPData* pDataOut, HTTPData* pDataIn); //Setup request, make DNS Req if necessary
ICTFBI 0:4edb816d21e1 224 void connect(); //Start Connection
ICTFBI 0:4edb816d21e1 225
ICTFBI 0:4edb816d21e1 226 int tryRead(); //Read data and try to feed output
ICTFBI 0:4edb816d21e1 227 void readData(); //Data has been read
ICTFBI 0:4edb816d21e1 228 void writeData(); //Data has been written & buf is free
ICTFBI 0:4edb816d21e1 229
ICTFBI 0:4edb816d21e1 230 void onTCPSocketEvent(TCPSocketEvent e);
ICTFBI 0:4edb816d21e1 231 void onDNSReply(DNSReply r);
ICTFBI 0:4edb816d21e1 232 void onResult(HTTPResult r); //Called when exchange completed or on failure
ICTFBI 0:4edb816d21e1 233 void onTimeout(); //Connection has timed out
ICTFBI 0:4edb816d21e1 234
ICTFBI 0:4edb816d21e1 235 private:
ICTFBI 0:4edb816d21e1 236 HTTPResult blockingProcess(); //Called in blocking mode, calls Net::poll() until return code is available
ICTFBI 0:4edb816d21e1 237
ICTFBI 0:4edb816d21e1 238 bool readHeaders(); //Called first when receiving data
ICTFBI 0:4edb816d21e1 239 bool writeHeaders(); //Called to create req
ICTFBI 0:4edb816d21e1 240 int readLine(char* str, int maxLen, bool* pIncomplete = NULL);
ICTFBI 0:4edb816d21e1 241
ICTFBI 0:4edb816d21e1 242 enum HTTP_METH
ICTFBI 0:4edb816d21e1 243 {
ICTFBI 0:4edb816d21e1 244 HTTP_GET,
ICTFBI 0:4edb816d21e1 245 HTTP_POST,
ICTFBI 0:4edb816d21e1 246 HTTP_HEAD
ICTFBI 0:4edb816d21e1 247 };
ICTFBI 0:4edb816d21e1 248
ICTFBI 0:4edb816d21e1 249 HTTP_METH m_meth;
ICTFBI 0:4edb816d21e1 250
ICTFBI 0:4edb816d21e1 251 CDummy* m_pCbItem;
ICTFBI 0:4edb816d21e1 252 void (CDummy::*m_pCbMeth)(HTTPResult);
ICTFBI 0:4edb816d21e1 253
ICTFBI 0:4edb816d21e1 254 void (*m_pCb)(HTTPResult);
ICTFBI 0:4edb816d21e1 255
ICTFBI 0:4edb816d21e1 256 TCPSocket* m_pTCPSocket;
ICTFBI 0:4edb816d21e1 257 map<string, string> m_reqHeaders;
ICTFBI 0:4edb816d21e1 258 map<string, string> m_respHeaders;
ICTFBI 0:4edb816d21e1 259
ICTFBI 0:4edb816d21e1 260 Timer m_watchdog;
ICTFBI 0:4edb816d21e1 261 int m_timeout;
ICTFBI 0:4edb816d21e1 262
ICTFBI 0:4edb816d21e1 263 DNSRequest* m_pDnsReq;
ICTFBI 0:4edb816d21e1 264
ICTFBI 0:4edb816d21e1 265 Host m_server;
ICTFBI 0:4edb816d21e1 266 string m_path;
ICTFBI 0:4edb816d21e1 267
ICTFBI 0:4edb816d21e1 268 bool m_closed;
ICTFBI 0:4edb816d21e1 269
ICTFBI 0:4edb816d21e1 270 enum HTTPStep
ICTFBI 0:4edb816d21e1 271 {
ICTFBI 0:4edb816d21e1 272 // HTTP_INIT,
ICTFBI 0:4edb816d21e1 273 HTTP_WRITE_HEADERS,
ICTFBI 0:4edb816d21e1 274 HTTP_WRITE_DATA,
ICTFBI 0:4edb816d21e1 275 HTTP_READ_HEADERS,
ICTFBI 0:4edb816d21e1 276 HTTP_READ_DATA,
ICTFBI 0:4edb816d21e1 277 HTTP_READ_DATA_INCOMPLETE,
ICTFBI 0:4edb816d21e1 278 HTTP_DONE,
ICTFBI 0:4edb816d21e1 279 HTTP_CLOSED
ICTFBI 0:4edb816d21e1 280 };
ICTFBI 0:4edb816d21e1 281
ICTFBI 0:4edb816d21e1 282 HTTPStep m_state;
ICTFBI 0:4edb816d21e1 283
ICTFBI 0:4edb816d21e1 284 HTTPData* m_pDataOut;
ICTFBI 0:4edb816d21e1 285 HTTPData* m_pDataIn;
ICTFBI 0:4edb816d21e1 286
ICTFBI 0:4edb816d21e1 287 bool m_dataChunked; //Data is encoded as chunks
ICTFBI 0:4edb816d21e1 288 int m_dataPos; //Position in data
ICTFBI 0:4edb816d21e1 289 int m_dataLen; //Data length
ICTFBI 0:4edb816d21e1 290 char* m_buf;
ICTFBI 0:4edb816d21e1 291 char* m_pBufRemaining; //Remaining
ICTFBI 0:4edb816d21e1 292 int m_bufRemainingLen; //Data length in m_pBufRemaining
ICTFBI 0:4edb816d21e1 293
ICTFBI 0:4edb816d21e1 294 int m_httpResponseCode;
ICTFBI 0:4edb816d21e1 295
ICTFBI 0:4edb816d21e1 296 HTTPResult m_blockingResult; //Result if blocking mode
ICTFBI 0:4edb816d21e1 297
ICTFBI 0:4edb816d21e1 298 };
ICTFBI 0:4edb816d21e1 299
ICTFBI 0:4edb816d21e1 300 //Including data containers here for more convenience
ICTFBI 0:4edb816d21e1 301 #include "data/HTTPFile.h"
ICTFBI 0:4edb816d21e1 302 #include "data/HTTPStream.h"
ICTFBI 0:4edb816d21e1 303 #include "data/HTTPText.h"
ICTFBI 0:4edb816d21e1 304 #include "data/HTTPMap.h"
ICTFBI 0:4edb816d21e1 305
ICTFBI 0:4edb816d21e1 306 #endif