C++ SDK
 All Data Structures Functions Variables Enumerations Enumerator Modules Pages
CApplicationAPI Class Reference

Basic class providing set of functions to command Drive. More...

#include <ApplicationApi.h>

Static Public Member Functions

static int InitApi (LPCTSTR lpszPath, APPLICATION_HANDLEPROC pfnApplicationEventHandler, int nLeft, int nTop, int nWidth, int nHeight, BOOL bRunInForeground=TRUE, BOOL bNoCaption=FALSE, HWND hParentWnd=NULL)
 The function initializes ApplicationAPI and must be called at the very first place. More...
 
static int CloseApi ()
 The function uninitializes ApplicationAPI. No other API functions will be executed after this command.
The function should be called at the end of SDK application. You can call function EndApplication before this one, if you wish to close navigation too. More...
 
static int IsApplicationRunning (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function verifies whether Drive is running. More...
 
static int EndApplication (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function ends Drive application. More...
 
static int BringApplicationToForeground (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function brings Drive window to foreground. More...
 
static int BringApplicationToBackground (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function brings Drive window to background. The application is hidden and stops doing any graphic operations which results in less processor load. However, it continues to read GPS port. More...
 
static int GetUniqueDeviceId (LpError lpError, LPTSTR lpszDeviceID, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns device ID. More...
 
static int IsApplicationInForeground (LpError lpError, BOOL &bApplicationInForeground, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function returns, if the application is active in foreground or idle in background. More...
 
static int GetMapVersion (LpError lpError, LPCTSTR lpszIso, LPTSTR lpszMapVersion, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function gets the map version of a given country's ISO code. More...
 
static int GetApplicationVersion (LpError lpError, LPTSTR lpszDriveVersion, LPTSTR lpszBuiltNumber, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function gets the Drive's version and build number. More...
 
static int GetSdkVersion (LpError lpError, LPTSTR lpszSdkVersion, LPTSTR lpszBuiltNumber, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Gets the SDK's version and its build number. More...
 
static int ChangeApplicationOptions (LpError lpError, SChangeOption *lpChangeOption, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function changes basic Drive settings. More...
 
static int SetDefaultValues (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function sets default Drive settings. More...
 
static int ChangeAppRectangle (LpError lpError, int nLeft, int nTop, int nWidth, int nHeight, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function change position and size of Drive application. More...
 
static int GetActualGpsPosition (LpError lpError, SGpsPosition *lpGpsPosition, BOOL bSatellitesInfo, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns informations about actual GPS position. More...
 
static int GetRouteInfo (LpError lpError, SRouteInfo *lpRouteInfo, BOOL bExtended=FALSE, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns informations about computed route. More...
 
static int GetRouteStatus (LpError lpError, LPTSTR &lpRouteStatus, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns informations about computed route in json format. More...
 
static int StartNavigation (LpError lpError, SLocation *lpLocation, DWORD dwFlags, BOOL bShowApplication, BOOL bSearchAddress, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function starts navigate to taken location. More...
 
static int StartNavigation (LpError lpError, SLocation *lpLocation, DWORD dwFlags, BOOL bCloseDelivery, BOOL bShowApplication, BOOL bSearchAddress, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function starts navigate to taken location. More...
 
static int StartNavigation (LpError lpError, SLocation *lpLocation, DWORD dwFlags, BOOL bCloseDelivery, BOOL bShowApplication, BOOL bSearchAddress, SRouteComputeSettings *lpCompSettings, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function starts navigate to taken location. More...
 
static int StopNavigation (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function stops navigation, cancels the route and returns Drive application to main screen. More...
 
static int NavigateToAddress (LpError lpError, LPCTSTR lpszAddress, BOOL bPostal, DWORD dwFlags, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function computes route from actual GPS position to taken target and starts navigate to taken address. More...
 
static int NavigateToAddress (LpError lpError, LPCTSTR lpszAddress, BOOL bPostal, DWORD dwFlags, BOOL bCloseDelivery, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function computes route from actual GPS position to taken target and starts navigate to taken address. More...
 
static int LoadComputedRoute (LpError lpError, LPCTSTR lpszRoutePath, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function loads a pre-computed route from a file and starts navigation following that route. More...
 
static int LoadComputedRoute (LpError lpError, LPCTSTR lpszRoutePath, DWORD dwStartWaypointID, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function loads a pre-computed route from a file and starts navigation following that route. More...
 
static int SaveComputedRoute (LpError lpError, LPCTSTR lpszRoutePath, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function saves the current route in navigation to a file. More...
 
static int GetFavoritesList (LpError lpError, SFavorite *&lstFavoriteArr, int &nSize, BOOL bSearchAddress, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns list of POIs in Favorites category. More...
 
static int AddStopOffPointsToFavorites (LpError lpError, SPoi *lpStopOffPoint, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function adds user defined POI to Favorites category. More...
 
static int RemoveFavoriteFromList (LpError lpError, SFavorite *lpFavorite, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function removes POI from list of Favorites. More...
 
static int AddStopOffPointToHistory (LpError lpError, SHistoryRecord *lpStopOffPoint, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function adds new item to History list. More...
 
static int GetHistoryList (LpError lpError, SHistoryRecord *&lstHistoryArr, int &nSize, BOOL bSearchAddress, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns the list of items in History. More...
 
static int AddPoi (LpError lpError, SPoi *lpPoi, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function adds user POI to custom category. More...
 
static int AddPoiCategory (LpError lpError, LPCTSTR lpszCategory, LPCTSTR lpszBitmapPath, LPCTSTR lpszIsoCode, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function adds custom POI category. More...
 
static int DeletePoiCategory (LpError lpError, LPCTSTR lpszCategory, LPCTSTR lpszIso, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function deletes custom POI category. More...
 
static int DeletePoi (LpError lpError, SPoi *lpPoi, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function deletes custom POI from custom category. More...
 
static int MakeUserPoiVisible (LpError lpError, DWORD dwCategory, LPCTSTR lpszCategory, BOOL bShow, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows or hides POI category in POI category list. More...
 
static int GetPoiList (LpError lpError, SPoi *&lstPoiArr, int &nSize, LPCTSTR lpszCategory, BOOL bSearchAddress, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns list of POIs from selected category. More...
 
static int GetPoiOnRoute (LpError lpError, int nGroup, int nCategory, int minDriveTime, int maxDriveTime, SPoiOnRoute *&lstPoiArr, int &nSize, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 
static int FindNearbyPoi (LpError lpError, SPoi *&lpPoi, DWORD dwCategoryNumber, LPCTSTR lpszCategoryName, long lX, long lY, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function finds the nearest POI around given position. The POI may be from the original map POIs or it may be a custom POI. More...
 
static int FindNearbyPoi (LpError lpError, SPoi *&lpPoiList, int &nListSize, DWORD dwCategoryNumber, LPCTSTR lpszCategoryName, LONG lX, LONG lY, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function finds the defined number of nearest POIs around given position. The POIs may be from the original map POIs or they may be some custom POIs. More...
 
static int GetPoiCategoryList (LpError lpError, SPoiCategory *&lpPoiCategories, int &nSize, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns the list of POI categories. More...
 
static int SetPoiWarning (LpError lpError, SPoiCategory *lpPoiCategory, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function set the POI warning based on the attributes of the SPoiCategory instance. More...
 
static int HighlightPoi (LpError lpError, LPCTSTR lpszPoiCategory, LPCTSTR lpszPoiName, LPCTSTR lpszSound, LONGPOSITION cpPoiLocation, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Highlight the POI. More...
 
static int GetLocationInfo (LpError lpError, LONGPOSITION cpLocation, LPTSTR lpszAddress, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns address corresponding to given location. More...
 
static int GetLocationInfo (LpError lpError, LONGPOSITION cpLocation, LPTSTR lpszAddress, SRoadInfo *lpRoadInfo, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This overloaded function returns address and road information corresponding to given location. More...
 
static int LocationFromAddress (LpError lpError, LONGPOSITION &cpLocation, LPCTSTR lpszAddress, BOOL bPostal, BOOL bValueMatch, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns location corresponding to taken address. More...
 
static int LocationFromAddressEx (LpError lpError, LPCTSTR lpszAddress, BOOL bPostal, SWayPoint *&lpPositions, int &nCount, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns location corresponding to taken address. More...
 
static int LocationFromAddressEx (LpError lpError, LPCTSTR lpszAddress, BOOL bPostal, BOOL bFuzzySearch, SWayPoint *&lpPositions, int &nCount, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns location corresponding to taken address. More...
 
static int ShowHierarchyDialog (LpError lpError, LPCTSTR lpszIso, LPCTSTR lpszCity, LPCTSTR lpszStreet, BOOL bPostal, SWayPoint *&lpPosition, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows hierarchy dialog and returns location of taken address. More...
 
static int GetAddressList (LpError lpError, LPCTSTR lpszAddress, BOOL bPostal, int nMaxCount, SWayPoint *&lpList, int &nCount, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns list of founded items from NameHierarchy. More...
 
static int GetCoordinatesFromOffset (LpError lpError, LPCTSTR lpszIso, LONG lRoadOffset, LONGPOSITION &cpPosition, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Get coordinates of road given by map iso code and offset. More...
 
static int SwitchMap (LpError lpError, LPCTSTR lpszLoadPath, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function loads map from .mlm file. More...
 
static int ShowCoordinatesOnMap (LpError lpError, LONGPOSITION cpLocation, LONG lZoom, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows taken location on BrowseMap. More...
 
static int ShowRectangleOnMap (LpError lpError, LONGRECT rcRect, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows specific piece of map on the BrowseMap according to your selected coordinates of top left and bottom right corner. More...
 
static int AddBitmapToMap (LpError lpError, LPCTSTR lpszBitmapPath, long lX, long lY, UINT &nBitmapID, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows picture on BrowseMap. More...
 
static int RemoveBitmap (LpError lpError, UINT nBitmapID, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function removes picture from BrowseMap. More...
 
static int RemoveAllBitmaps (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function removes all pictures from BrowseMap. More...
 
static int ShowBitmap (LpError lpError, UINT nBitmapID, BOOL bShow, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows or hides picture on BrowseMap. More...
 
static int MoveBitmap (LpError lpError, UINT nBitmapID, long lX, long lY, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function moves picture on BrowseMap. More...
 
static int ShowMessage (LpError lpError, LPCTSTR lpszMessage, int nButtons, BOOL bWaitForFeedback, BOOL bShowApplication, int &nUserFeedback, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows a dialog with a specified message. More...
 
static int OnMenuCommand (LpError lpError, int nID, int nSubID, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function provides direct access to menu items. More...
 
static int FlashMessage (LpError lpError, LPCTSTR lpszMessage, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function shows flash message. More...
 
static int CloseDialogs (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Close dialogs in Drive application. More...
 
static int ErrorReport (LpError lpError, DWORD &dwID, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 
static int AddItinerary (LpError lpError, SStopOffPoint *lstPointArr, int nSize, LPCTSTR lpszItineraryName, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function creates itinerary and fills it with items from PointArr. More...
 
static int AddItinerary (LpError lpError, LPCTSTR lpszItineraryJson, LPCTSTR lpszItineraryName, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function creates itinerary from the JSON string. More...
 
static int SetRoute (LpError lpError, LPCTSTR lpszItineraryName, DWORD dwFlags, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function computes route based on taken itinerary. If Drive has valid GPS signal it starts navigation. More...
 
static int SetRoute (LpError lpError, LPCTSTR lpszItineraryName, DWORD dwFlags, BOOL bCloseDelivery, BOOL bShowApplication, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function computes route based on taken itinerary. If Drive has valid GPS signal it starts navigation. More...
 
static int SetRoute (LpError lpError, LPCTSTR lpszItineraryName, DWORD dwFlags, BOOL bCloseDelivery, BOOL bShowApplication, int &nWrongWaypointsCount, int *&lpWrongWaypoints, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function computes route based on taken itinerary. If Drive has valid GPS signal it starts navigation. More...
 
static int AddEntryToItinerary (LpError lpError, LPCTSTR lpszItineraryName, SStopOffPoint *lpStopOffPoint, UINT nIndex, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function adds new waypoint to taken itinerary. More...
 
static int DeleteEntryInItinerary (LpError lpError, LPCTSTR lpszItineraryName, UINT nIndex, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function deletes waypoint from itinerary at taken position. More...
 
static int DeleteItinerary (LpError lpError, LPCTSTR lpszItineraryName, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function deletes taken itinerary. More...
 
static int GetItineraryList (LpError lpError, LPCTSTR lpszItineraryName, SStopOffPoint *&PointsArr, int &nWayPointsCount, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns list of waypoints in itinerary. More...
 
static int OptimizeItinerary (LpError lpError, LPCTSTR lpszItineraryName, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function optimizes taken itinerary. More...
 
static int OptimizeRoute (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function optimizes current route. More...
 
static int SkipNextWaypoint (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function skips the waypoint, which is next when the function is called. More...
 
static int EnableExternalGpsInput (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function enables to send GPS data by SendGpsData SDK function. More...
 
static int DisableExternalGpsInput (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function disables to send GPS data by SendGpsData SDK function. More...
 
static BOOL SendGpsData (LPCTSTR lpszData, int nSize)
 The function sends GPS data to Drive. More...
 
static int GpsSwitchOn (LpError lpError, LPCTSTR lpszPort, DWORD dwBaudRate, BOOL bSwitchOn, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function turns Drive GPS module ON and OFF. More...
 
static int GetCurrentSpeedLimit (LpError lpError, int &nSpeedLimit, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function returns the speed limit of the current road. More...
 
static int GetNextInstruction (LpError lpError, SRouteInstruction *lpInstruction, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 This function returns the next turn instruction while navigating. More...
 
static int GoOnline (LpError lpError, BOOL bOnline, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Defines if the navigation has to connect to or disconnect from online services. The online services include functions as live traffic from the server and other. More...
 
static int OnlineServicesLogin (LpError lpError, LPCTSTR lpszUserName, LPCTSTR lpszPassword, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Enters login credentials for online services, such as life traffic. If not credentials are given, the application logs in anonymously. More...
 
static int AddTMCEvent (LpError lpError, STmcEvent *lpTmcEvent, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Adds a custom TMC event. This event is independent on the events received online. More...
 
static int RemoveTMCEvent (LpError lpError, WORD wTmcEventId, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Removes a custom TMC event. Each custom event has an ID given to it by the navigation during creation.
However, TMC events should be defined so that they expire with their validity time. More...
 
static int ClearTMCTable (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Erases all the custom TMC events defined with AddTMCEvent function. More...
 
static int OnlineServicesSettings (LpError lpError, SOnlineServicesSettings *lpSettings, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Sets/gets online services settings. More...
 
static int PlaySoundTTS (LpError lpError, LPCTSTR lpszText, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 Uses the TTS engine, if installed, to speak the given text message. More...
 
static int LoadGFFile (LpError lpError, LPCTSTR lpszPath, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function loads GF file then draws GF data on map. See specification of GF files here GF Files specification More...
 
static int UnloadGFFile (LpError lpError, LPCTSTR lpszPath, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function unloads GF file and erases all the lines drawn before. See specification of GF files here GF Files specification More...
 
static int LoadExternalFile (LpError lpError, LPCTSTR lpszPath, int nFileType, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function loads external file GF or TMC data. More...
 
static int UnloadExternalFile (LpError lpError, LPCTSTR lpszPath, int nFileType, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function unloads external file GF or TMC data. More...
 
static int ReloadExternalFiles (LpError lpError, DWORD dwMaxTime=DEFAULT_MAX_TIME)
 The function reloads all external files stored in geofiles folder. More...
 
static int LoadOFGRoute (LpError lpError, LPCTSTR lpszFileName, int nStartFromIndex, int nFlags, DWORD dwMaxTime)
 Loads an offroad guided route (OFG) and starts navigation following that route. More...
 
static int GetOFGRouteStatus (LpError lpError, LPTSTR lpszStatus, DWORD dwMaxTime)
 
static int SaveOFGRoute (LpError lpError, LPCTSTR lpszFileName, int nFromIndex, LONGPOSITION cpFrom, int nToIndex, LONGPOSITION cpTo, DWORD dwMaxTime)
 
static BOOL TimeGetTime (LONG lTime, USHORT *nYear, BYTE *nMonth, BYTE *nDay, BYTE *nHour, BYTE *nMinute, BYTE *nSecond)
 This function transform actual time from milliseconds to year, month, day, hour, minute second type. More...
 

Detailed Description

Basic class providing set of functions to command Drive.