ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ota/url.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | #pragma once |
| TMBOY | 47:9e361da97763 | 2 | class URL |
| TMBOY | 47:9e361da97763 | 3 | { |
| TMBOY | 47:9e361da97763 | 4 | public: |
| TMBOY | 47:9e361da97763 | 5 | URL(const char* url); |
| TMBOY | 47:9e361da97763 | 6 | ~URL(); |
| TMBOY | 47:9e361da97763 | 7 | bool valid()const{return __valid;}; |
| TMBOY | 47:9e361da97763 | 8 | const char* scheme()const{return __scheme;}; |
| TMBOY | 47:9e361da97763 | 9 | const char* host()const{return __host;}; |
| TMBOY | 47:9e361da97763 | 10 | unsigned short port()const{return __port;}; |
| TMBOY | 47:9e361da97763 | 11 | const char* path()const{return __path;}; |
| TMBOY | 47:9e361da97763 | 12 | |
| TMBOY | 47:9e361da97763 | 13 | const char* url()const{return __url;}; |
| TMBOY | 47:9e361da97763 | 14 | private: |
| TMBOY | 47:9e361da97763 | 15 | bool parse(const char* url); |
| TMBOY | 47:9e361da97763 | 16 | bool __valid; |
| TMBOY | 47:9e361da97763 | 17 | char *__scheme; |
| TMBOY | 47:9e361da97763 | 18 | char *__host; |
| TMBOY | 47:9e361da97763 | 19 | unsigned short __port; |
| TMBOY | 47:9e361da97763 | 20 | char *__path; |
| TMBOY | 47:9e361da97763 | 21 | char * __url; |
| TMBOY | 47:9e361da97763 | 22 | }; |
