OpenCPN Partial API docs
Loading...
Searching...
No Matches
navobj_db.cpp File Reference

Implement navobj_db.h – MySQL based storage for routes, tracks, etc. More...

#include <cmath>
#include <iomanip>
#include <memory>
#include <string>
#include <vector>
#include <wx/dir.h>
#include <wx/filename.h>
#include "model/base_platform.h"
#include "model/comm_appmsg_bus.h"
#include "model/navobj_db.h"
#include "model/navobj_db_util.h"
#include "model/navutil_base.h"
#include "model/notification.h"
#include "model/notification_manager.h"
#include "model/routeman.h"

Go to the source code of this file.

Functions

bool CreateTables (sqlite3 *db)
bool TrackExists (sqlite3 *db, const std::string &track_guid)
bool TrackHtmlLinkExists (sqlite3 *db, const std::string &link_guid)
bool DeleteAllCommentsForTrack (sqlite3 *db, const std::string &track_guid)
bool InsertTrackPoint (sqlite3 *db, const std::string &track_guid, double lat, double lon, const std::string &timestamp, int i_point)
bool InsertTrackHTML (sqlite3 *db, const std::string &track_guid, const std::string &link_guid, const std::string &descrText, const std::string &link, const std::string &ltype)
bool DeleteAllCommentsForRoute (sqlite3 *db, const std::string &route_guid)
bool RouteHtmlLinkExists (sqlite3 *db, const std::string &link_guid)
bool RoutePointHtmlLinkExists (sqlite3 *db, const std::string &link_guid)
bool RouteExistsDB (sqlite3 *db, const std::string &route_guid)
bool InsertRouteHTML (sqlite3 *db, const std::string &route_guid, const std::string &link_guid, const std::string &descrText, const std::string &link, const std::string &ltype)
bool RoutePointExists (sqlite3 *db, const std::string &routepoint_guid)
bool InsertRoutePointHTML (sqlite3 *db, const std::string &point_guid, const std::string &link_guid, const std::string &descrText, const std::string &link, const std::string &ltype)
bool DeleteAllCommentsForRoutePoint (sqlite3 *db, const std::string &routepoint_guid)
bool InsertRoutePointDB (sqlite3 *db, RoutePoint *point)
bool InsertRoutePointLink (sqlite3 *db, Route *route, RoutePoint *point, int point_order)
void DeleteOrphanedRoutepoint (sqlite3 *db)
void errorLogCallback (void *pArg, int iErrCode, const char *zMsg)

Detailed Description

Implement navobj_db.h – MySQL based storage for routes, tracks, etc.

Definition in file navobj_db.cpp.

Function Documentation

◆ CreateTables()

bool CreateTables ( sqlite3 * db)

Definition at line 62 of file navobj_db.cpp.

◆ DeleteAllCommentsForRoute()

bool DeleteAllCommentsForRoute ( sqlite3 * db,
const std::string & route_guid )

Definition at line 179 of file navobj_db.cpp.

◆ DeleteAllCommentsForRoutePoint()

bool DeleteAllCommentsForRoutePoint ( sqlite3 * db,
const std::string & routepoint_guid )

Definition at line 321 of file navobj_db.cpp.

◆ DeleteAllCommentsForTrack()

bool DeleteAllCommentsForTrack ( sqlite3 * db,
const std::string & track_guid )

Definition at line 111 of file navobj_db.cpp.

◆ DeleteOrphanedRoutepoint()

void DeleteOrphanedRoutepoint ( sqlite3 * db)

Definition at line 385 of file navobj_db.cpp.

◆ errorLogCallback()

void errorLogCallback ( void * pArg,
int iErrCode,
const char * zMsg )

Definition at line 394 of file navobj_db.cpp.

◆ InsertRouteHTML()

bool InsertRouteHTML ( sqlite3 * db,
const std::string & route_guid,
const std::string & link_guid,
const std::string & descrText,
const std::string & link,
const std::string & ltype )

Definition at line 254 of file navobj_db.cpp.

◆ InsertRoutePointDB()

bool InsertRoutePointDB ( sqlite3 * db,
RoutePoint * point )

Definition at line 342 of file navobj_db.cpp.

◆ InsertRoutePointHTML()

bool InsertRoutePointHTML ( sqlite3 * db,
const std::string & point_guid,
const std::string & link_guid,
const std::string & descrText,
const std::string & link,
const std::string & ltype )

Definition at line 297 of file navobj_db.cpp.

◆ InsertRoutePointLink()

bool InsertRoutePointLink ( sqlite3 * db,
Route * route,
RoutePoint * point,
int point_order )

Definition at line 361 of file navobj_db.cpp.

◆ InsertTrackHTML()

bool InsertTrackHTML ( sqlite3 * db,
const std::string & track_guid,
const std::string & link_guid,
const std::string & descrText,
const std::string & link,
const std::string & ltype )

Definition at line 153 of file navobj_db.cpp.

◆ InsertTrackPoint()

bool InsertTrackPoint ( sqlite3 * db,
const std::string & track_guid,
double lat,
double lon,
const std::string & timestamp,
int i_point )

Definition at line 130 of file navobj_db.cpp.

◆ RouteExistsDB()

bool RouteExistsDB ( sqlite3 * db,
const std::string & route_guid )

Definition at line 235 of file navobj_db.cpp.

◆ RouteHtmlLinkExists()

bool RouteHtmlLinkExists ( sqlite3 * db,
const std::string & link_guid )

Definition at line 196 of file navobj_db.cpp.

◆ RoutePointExists()

bool RoutePointExists ( sqlite3 * db,
const std::string & routepoint_guid )

Definition at line 278 of file navobj_db.cpp.

◆ RoutePointHtmlLinkExists()

bool RoutePointHtmlLinkExists ( sqlite3 * db,
const std::string & link_guid )

Definition at line 215 of file navobj_db.cpp.

◆ TrackExists()

bool TrackExists ( sqlite3 * db,
const std::string & track_guid )

Definition at line 71 of file navobj_db.cpp.

◆ TrackHtmlLinkExists()

bool TrackHtmlLinkExists ( sqlite3 * db,
const std::string & link_guid )

Definition at line 91 of file navobj_db.cpp.