diff options
author | Yury Melnichek <melnichek@gmail.com> | 2013-03-20 03:15:00 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:51:51 +0300 |
commit | b038b09dd71f3f03575969d8b23bedbcc92a23a9 (patch) | |
tree | c979199630af53a9e639bfb2c518f31c2dbce612 /api | |
parent | 7c30a7b80f64cc8403c76bb2e135a9f982e52e46 (diff) |
[api] More minor fixes.
Diffstat (limited to 'api')
-rw-r--r-- | api/src/c/api-client.c | 4 | ||||
-rw-r--r-- | api/src/c/api-client.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/api/src/c/api-client.c b/api/src/c/api-client.c index 8935993ab1..5045050c46 100644 --- a/api/src/c/api-client.c +++ b/api/src/c/api-client.c @@ -70,8 +70,10 @@ void MapsWithMe_LatLonToString(double lat, double lon, char * s, int nBytes) } } -char * MapsWithMe_GenShortShowMapUrl(double lat, double lon, double zoomLevel, char const * name) +int MapsWithMe_GenShortShowMapUrl(double lat, double lon, double zoomLevel, char const * name, char * buf, int bufSize) { // @TODO: Implement MapsWithMe_GenShortShowMapUrl(). + // @TODO: Escape URL-unfriendly characters: ! * ' ( ) ; : @ & = + $ , / ? % # [ ] + return 0; } diff --git a/api/src/c/api-client.h b/api/src/c/api-client.h index 5562373150..9335a8950b 100644 --- a/api/src/c/api-client.h +++ b/api/src/c/api-client.h @@ -39,7 +39,8 @@ char * MapsWithMe_GenShowMapUrl(MapsWithMe_ShowMapRequest const * request); */ // Helper method to generate short url. -char * MapsWithMe_GenShortShowMapUrl(double lat, double lon, double zoomLevel, char const * name); +// Returns the number of bytes required to fit the whole URL or an error_code < 0 on error. +int MapsWithMe_GenShortShowMapUrl(double lat, double lon, double zoomLevel, char const * name, char * buf, int bufSize); #ifdef __cplusplus } // Closing brace for extern "C" |