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"