#ifndef _SENDMAP_DLL #define _SENDMAP_DLL #ifdef __cplusplus extern "C" { #endif #ifdef _DLL_VERSION #define LIBSPEC __declspec(dllexport) #define CALL_API __stdcall #else #define LIBSPEC __declspec(dllimport) #define CALL_API __stdcall #endif #define _SE_OK 1 #define _SE_NOT_INITIATED -1 #define _SE_COULD_NOT_CONNECT -2 #define _SE_NOT_CONNECTED -3 #define _SE_UPLOAD_CANCELLED -4 #define _SE_NO_FILE -5 #define _SE_OTHER_ERROR -10 /** Initialisation of the send library - tries to connect to the GPS @param port_type 0 - RS connection (COM port), 1 - USB (requires Garmin USB driver installed in the system) @param port_name for RS connection - com port name e.g. "COM1", for USB should be "USB" the highest grid value is 24, values should be descending @return _SE const _SE_OK - connection established */ LIBSPEC int CALL_API se_connect(int port_type,const char* port_name,const char* copyright); /** Close connection */ LIBSPEC int CALL_API se_disconnect(); /** Get the unique ID of the GPS @return GPS ID */ LIBSPEC unsigned int CALL_API se_get_id(); /** Get the avail. memory size @return GPS ID */ LIBSPEC int CALL_API se_get_memory(); /** Get the software version of the GPS @return */ LIBSPEC const char* CALL_API se_get_version(); /** Erase GPS map memory @return _SE_CONST */ LIBSPEC int CALL_API se_erase_memory(); /** Add unlock keys - required if maps are locked @return _SE_CONST */ LIBSPEC int CALL_API se_add_key(const char* key); /** Set the mapset name @return _SE_CONST */ LIBSPEC int CALL_API se_set_mapset(const char* name); /** Add single IMG file to be uploaded @param file_name name of the IMG file @param region_name name of the region to which belongs the map @return _SE_CONST */ LIBSPEC int CALL_API se_add_file(const char* file_name,const char* region_name); /** Add single IMG file to be uploaded - only specified part of the file will be upload - can be used if more than one IMG file exist in global file @param file_name name of the IMG file @param start_data offset in the file to the IMG data @param len_data length of the IMG file inside the file @return _SE_CONST */ LIBSPEC int CALL_API se_add_raw_file(const char* file_name,int start_data,int len_data); /** Add IMG file which has been merged with the DLL library @return _SE_CONST */ LIBSPEC int CALL_API se_add_dll_file(); /** Upload process callback function */ typedef int (CALL_API *_UPLOADER)(int position,int total); /** Uploads all the specified IMG files to the GPS @return _SE_CONST */ LIBSPEC int CALL_API se_upload(_UPLOADER uploaderCallback,int speed); LIBSPEC int CALL_API se_upload_no_callback(int speed); #undef LIBSPEC #ifdef __cplusplus } #endif #endif