[MODIF] Remove settings on cloud dependency
This feature got a lot of regression due to its dependency on dropbox, google drive and one drive implementation. This modification removes such dependecy and allow users to set their settings location - any cloud location path and even customized local location.
This commit is contained in:
parent
c64f434a83
commit
5e240147c5
|
@ -792,9 +792,7 @@
|
|||
<Cloud title="Cloud">
|
||||
<Item id="6262" name="Settings on cloud"/>
|
||||
<Item id="6263" name="No Cloud"/>
|
||||
<Item id="6264" name="Dropbox"/>
|
||||
<Item id="6265" name="OneDrive"/>
|
||||
<Item id="6266" name="Google Drive"/>
|
||||
<Item id="6267" name="Set your cloud location path here:"/>
|
||||
<!--Item id="6261" name="Please restart Notepad++ to take effect."/-->
|
||||
</Cloud>
|
||||
|
||||
|
@ -868,6 +866,7 @@
|
|||
|
||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<NbFileToOpenImportantWarning title="Amount of files to open is too large" message="$INT_REPLACE$ files are about to be opened.\rAre you sure to open them?"/>
|
||||
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,\ror on a folder needed privilege right for writting access.\rYour settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
||||
</MessageBox>
|
||||
<ClipboardHistory>
|
||||
<PanelTitle name="Clipboard History"/>
|
||||
|
|
|
@ -1572,9 +1572,18 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||
saveSession(currentSession);
|
||||
|
||||
// write settings on cloud if enabled, if the settings files don't exist
|
||||
if (nppgui._cloudChoice != noCloud)
|
||||
if (nppgui._cloudPath != TEXT("") && pNppParam->isCloudPathChanged())
|
||||
{
|
||||
pNppParam->writeSettingsFilesOnCloudForThe1stTime(nppgui._cloudChoice);
|
||||
bool isOK = pNppParam->writeSettingsFilesOnCloudForThe1stTime(nppgui._cloudPath);
|
||||
if (!isOK)
|
||||
{
|
||||
_nativeLangSpeaker.messageBox("SettingsOnCloudError",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("It seems the path of settings on cloud is set on a read only drive,\ror on a folder needed privilege right for writting access.\rYour settings on cloud will be canceled. Please reset a coherent value via Preference dialog."),
|
||||
TEXT("Settings on Cloud"),
|
||||
MB_OK | MB_APPLMODAL);
|
||||
pNppParam->removeCloudChoice();
|
||||
}
|
||||
}
|
||||
|
||||
//Sends WM_DESTROY, Notepad++ will end
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "localization.h"
|
||||
#include "localizationString.h"
|
||||
#include "UserDefineDialog.h"
|
||||
#include "../src/sqlite/sqlite3.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -667,7 +666,7 @@ NppParameters::NppParameters() : _pXmlDoc(NULL),_pXmlUserDoc(NULL), _pXmlUserSty
|
|||
_pXmlSessionDoc(NULL), _pXmlBlacklistDoc(NULL), _nbUserLang(0), _nbExternalLang(0),\
|
||||
_hUXTheme(NULL), _transparentFuncAddr(NULL), _enableThemeDialogTextureFuncAddr(NULL),\
|
||||
_pNativeLangSpeaker(NULL), _isTaskListRBUTTONUP_Active(false), _fileSaveDlgFilterIndex(-1),\
|
||||
_asNotepadStyle(false), _isFindReplacing(false)
|
||||
_asNotepadStyle(false), _isFindReplacing(false), _initialCloudChoice(TEXT(""))
|
||||
{
|
||||
// init import UDL array
|
||||
_nbImportedULD = 0;
|
||||
|
@ -893,255 +892,6 @@ int base64ToAscii(char *dest, const char *base64Str)
|
|||
return k;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Spec for settings on cloud (dropbox, oneDrive and googleDrive)
|
||||
ON LOAD:
|
||||
1. if doLocalConf.xml, check nppInstalled/cloud/choice
|
||||
2. check the validity of 3 cloud and get the npp_cloud_folder according the choice.
|
||||
3. Set npp_cloud_folder as user_dir.
|
||||
|
||||
Attention: settings files in cloud_folder should never be removed or erased.
|
||||
|
||||
ON SET:
|
||||
1. write "dropbox", "oneDrive" or "googleDrive" in nppInstalled/cloud/choice file, if choice file doesn't exist, create it.
|
||||
2. ask user to restart Notepad++
|
||||
3. if no settings files in npp_cloud_folder , write settings before exiting.
|
||||
|
||||
ON UNSET:
|
||||
1. remove nppInstalled/cloud/choice file
|
||||
2. ask user to restart Notepad++
|
||||
|
||||
Here are the list of xml settings used by Notepad++:
|
||||
1. config.xml: saveed on exit
|
||||
2. stylers.xml: saved on modified
|
||||
3. langs.xml: no save
|
||||
4. session.xml: saveed on exit or : all the time, if session snapshot is enabled.
|
||||
5. shortcuts.xml: saveed on exit
|
||||
6. userDefineLang.xml: saveed on exit
|
||||
7. functionlist.xml: no save
|
||||
8. contextMenu.xml: no save
|
||||
9. nativeLang.xml: no save
|
||||
*/
|
||||
|
||||
generic_string NppParameters::getCloudSettingsPath(CloudChoice cloudChoice)
|
||||
{
|
||||
generic_string cloudSettingsPath = TEXT("");
|
||||
|
||||
//
|
||||
// check if dropbox is present
|
||||
//
|
||||
generic_string settingsPath4dropbox = TEXT("");
|
||||
|
||||
ITEMIDLIST *pidl;
|
||||
|
||||
const HRESULT specialFolderLocationResult_1 = SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, &pidl);
|
||||
if ( !SUCCEEDED( specialFolderLocationResult_1 ) )
|
||||
{
|
||||
return cloudSettingsPath;
|
||||
}
|
||||
TCHAR tmp[MAX_PATH];
|
||||
SHGetPathFromIDList(pidl, tmp);
|
||||
generic_string dropboxInfoDB = tmp;
|
||||
|
||||
PathAppend(dropboxInfoDB, TEXT("Dropbox\\host.db"));
|
||||
try {
|
||||
if (::PathFileExists(dropboxInfoDB.c_str()))
|
||||
{
|
||||
// get whole content
|
||||
std::string content = getFileContent(dropboxInfoDB.c_str());
|
||||
if (content != "")
|
||||
{
|
||||
// get the second line
|
||||
const char *pB64 = content.c_str();
|
||||
for (size_t i = 0; i < content.length(); ++i)
|
||||
{
|
||||
++pB64;
|
||||
if (*pB64 == '\n')
|
||||
{
|
||||
++pB64;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// decode base64
|
||||
size_t b64Len = strlen(pB64);
|
||||
size_t asciiLen = getAsciiLenFromBase64Len(b64Len);
|
||||
if (asciiLen)
|
||||
{
|
||||
char * pAsciiText = new char[asciiLen + 1];
|
||||
int len = base64ToAscii(pAsciiText, pB64);
|
||||
if (len)
|
||||
{
|
||||
//::MessageBoxA(NULL, pAsciiText, "", MB_OK);
|
||||
const size_t maxLen = 2048;
|
||||
wchar_t dest[maxLen];
|
||||
mbstowcs(dest, pAsciiText, maxLen);
|
||||
if (::PathFileExists(dest))
|
||||
{
|
||||
settingsPath4dropbox = dest;
|
||||
_nppGUI._availableClouds |= DROPBOX_AVAILABLE;
|
||||
}
|
||||
}
|
||||
delete[] pAsciiText;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
//printStr(TEXT("JsonCpp exception captured"));
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: check if OneDrive is present
|
||||
//
|
||||
|
||||
// Get value from registry
|
||||
generic_string settingsPath4OneDrive = TEXT("");
|
||||
HKEY hOneDriveKey;
|
||||
LRESULT res = ::RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\SkyDrive"), 0, KEY_READ, &hOneDriveKey);
|
||||
if (res != ERROR_SUCCESS)
|
||||
{
|
||||
res = ::RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\SkyDrive"), 0, KEY_READ, &hOneDriveKey);
|
||||
}
|
||||
|
||||
if (res == ERROR_SUCCESS)
|
||||
{
|
||||
TCHAR valData[MAX_PATH];
|
||||
int valDataLen = MAX_PATH * sizeof(TCHAR);
|
||||
int valType;
|
||||
::RegQueryValueEx(hOneDriveKey, TEXT("UserFolder"), NULL, (LPDWORD)&valType, (LPBYTE)valData, (LPDWORD)&valDataLen);
|
||||
|
||||
if (::PathFileExists(valData))
|
||||
{
|
||||
settingsPath4OneDrive = valData;
|
||||
_nppGUI._availableClouds |= ONEDRIVE_AVAILABLE;
|
||||
}
|
||||
::RegCloseKey(hOneDriveKey);
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: check if google drive is present
|
||||
//
|
||||
generic_string googleDriveInfoDB = TEXT("");
|
||||
|
||||
HKEY hGoogleDriveKey;
|
||||
res = ::RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Google\\Drive"), 0, KEY_READ, &hGoogleDriveKey);
|
||||
|
||||
if (res == ERROR_SUCCESS)
|
||||
{
|
||||
TCHAR valData[MAX_PATH];
|
||||
int valDataLen = MAX_PATH * sizeof(TCHAR);
|
||||
int valType;
|
||||
::RegQueryValueEx(hGoogleDriveKey, TEXT("Path"), NULL, (LPDWORD)&valType, (LPBYTE)valData, (LPDWORD)&valDataLen);
|
||||
|
||||
if (::PathFileExists(valData)) // Windows 8
|
||||
{
|
||||
googleDriveInfoDB = valData;
|
||||
PathAppend(googleDriveInfoDB, TEXT("\\user_default\\sync_config.db"));
|
||||
}
|
||||
else // Windows 7
|
||||
{
|
||||
// try to guess google drive info path
|
||||
ITEMIDLIST *pidl2;
|
||||
SHGetSpecialFolderLocation(NULL, CSIDL_LOCAL_APPDATA, &pidl2);
|
||||
TCHAR tmp2[MAX_PATH];
|
||||
SHGetPathFromIDList(pidl2, tmp2);
|
||||
googleDriveInfoDB = tmp2;
|
||||
|
||||
PathAppend(googleDriveInfoDB, TEXT("Google\\Drive\\sync_config.db"));
|
||||
}
|
||||
::RegCloseKey(hGoogleDriveKey);
|
||||
}
|
||||
|
||||
generic_string settingsPath4GoogleDrive = TEXT("");
|
||||
|
||||
if (::PathFileExists(googleDriveInfoDB.c_str()))
|
||||
{
|
||||
try {
|
||||
sqlite3 *handle;
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
// try to create the database. If it doesnt exist, it would be created
|
||||
// pass a pointer to the pointer to sqlite3, in short sqlite3**
|
||||
char dest[MAX_PATH];
|
||||
wcstombs(dest, googleDriveInfoDB.c_str(), sizeof(dest));
|
||||
int retval = sqlite3_open(dest, &handle);
|
||||
|
||||
// If connection failed, handle returns NULL
|
||||
if (retval == SQLITE_OK)
|
||||
{
|
||||
char query[] = "select * from data where entry_key='local_sync_root_path'";
|
||||
|
||||
retval = sqlite3_prepare_v2(handle, query, -1, &stmt, 0); //sqlite3_prepare_v2() interfaces use UTF-8
|
||||
if (retval == SQLITE_OK)
|
||||
{
|
||||
// fetch a row’s status
|
||||
retval = sqlite3_step(stmt);
|
||||
|
||||
if (retval == SQLITE_ROW)
|
||||
{
|
||||
const unsigned char *text;
|
||||
text = sqlite3_column_text(stmt, 2);
|
||||
|
||||
const size_t maxLen = 2048;
|
||||
wchar_t googleFolder[maxLen];
|
||||
mbstowcs(googleFolder, (char *)(text + 4), maxLen);
|
||||
if (::PathFileExists(googleFolder))
|
||||
{
|
||||
settingsPath4GoogleDrive = googleFolder;
|
||||
_nppGUI._availableClouds |= GOOGLEDRIVE_AVAILABLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
sqlite3_close(handle);
|
||||
}
|
||||
|
||||
} catch(...) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (cloudChoice == dropbox && (_nppGUI._availableClouds & DROPBOX_AVAILABLE))
|
||||
{
|
||||
cloudSettingsPath = settingsPath4dropbox;
|
||||
PathAppend(cloudSettingsPath, TEXT("Notepad++"));
|
||||
|
||||
// The folder cloud_folder\Notepad++ should exist.
|
||||
// if it doesn't, it means this folder was removed by user, we create it anyway
|
||||
if (!PathFileExists(cloudSettingsPath.c_str()))
|
||||
{
|
||||
::CreateDirectory(cloudSettingsPath.c_str(), NULL);
|
||||
}
|
||||
_nppGUI._cloudChoice = dropbox;
|
||||
}
|
||||
else if (cloudChoice == oneDrive)
|
||||
{
|
||||
cloudSettingsPath = settingsPath4OneDrive;
|
||||
PathAppend(cloudSettingsPath, TEXT("Notepad++"));
|
||||
|
||||
if (!PathFileExists(cloudSettingsPath.c_str()))
|
||||
{
|
||||
::CreateDirectory(cloudSettingsPath.c_str(), NULL);
|
||||
}
|
||||
_nppGUI._cloudChoice = oneDrive;
|
||||
}
|
||||
else if (cloudChoice == googleDrive)
|
||||
{
|
||||
cloudSettingsPath = settingsPath4GoogleDrive;
|
||||
PathAppend(cloudSettingsPath, TEXT("Notepad++"));
|
||||
|
||||
if (!PathFileExists(cloudSettingsPath.c_str()))
|
||||
{
|
||||
::CreateDirectory(cloudSettingsPath.c_str(), NULL);
|
||||
}
|
||||
_nppGUI._cloudChoice = googleDrive;
|
||||
}
|
||||
//else if (cloudChoice == noCloud)
|
||||
// cloudSettingsPath is always empty
|
||||
|
||||
return cloudSettingsPath;
|
||||
}
|
||||
|
||||
generic_string NppParameters::getSettingsFolder()
|
||||
{
|
||||
generic_string settingsFolderPath;
|
||||
|
@ -1230,37 +980,25 @@ bool NppParameters::load()
|
|||
_sessionPath = _userPath; // Session stock the absolute file path, it should never be on cloud
|
||||
|
||||
// Detection cloud settings
|
||||
//bool isCloud = false;
|
||||
generic_string cloudChoicePath = _userPath;
|
||||
cloudChoicePath += TEXT("\\cloud\\choice");
|
||||
|
||||
CloudChoice cloudChoice = noCloud;
|
||||
// cloudChoicePath doesn't exist, just quit
|
||||
if (::PathFileExists(cloudChoicePath.c_str()))
|
||||
{
|
||||
// Read cloud choice
|
||||
std::string cloudChoiceStr = getFileContent(cloudChoicePath.c_str());
|
||||
if (cloudChoiceStr == "dropbox")
|
||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
||||
std::wstring cloudChoiceStrW = wmc->char2wchar(cloudChoiceStr.c_str(), SC_CP_UTF8);
|
||||
|
||||
if (cloudChoiceStrW != TEXT("") && ::PathFileExists(cloudChoiceStrW.c_str()))
|
||||
{
|
||||
cloudChoice = dropbox;
|
||||
}
|
||||
else if (cloudChoiceStr == "oneDrive")
|
||||
{
|
||||
cloudChoice = oneDrive;
|
||||
}
|
||||
else if (cloudChoiceStr == "googleDrive")
|
||||
{
|
||||
cloudChoice = googleDrive;
|
||||
_userPath = cloudChoiceStrW;
|
||||
_nppGUI._cloudPath = cloudChoiceStrW;
|
||||
_initialCloudChoice = _nppGUI._cloudPath;
|
||||
}
|
||||
}
|
||||
|
||||
generic_string cloudPath = getCloudSettingsPath(cloudChoice);
|
||||
if (cloudPath != TEXT("") && ::PathFileExists(cloudPath.c_str()))
|
||||
{
|
||||
_userPath = cloudPath;
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
//-------------------------------------//
|
||||
// Transparent function for w2k and xp //
|
||||
|
@ -2691,12 +2429,66 @@ LangType NppParameters::getLangFromExt(const TCHAR *ext)
|
|||
return L_TEXT;
|
||||
}
|
||||
|
||||
void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
||||
void NppParameters::setCloudChoice(const TCHAR *pathChoice)
|
||||
{
|
||||
generic_string cloudSettingsPath = getCloudSettingsPath(choice);
|
||||
generic_string cloudChoicePath = getSettingsFolder();
|
||||
cloudChoicePath += TEXT("\\cloud\\");
|
||||
|
||||
if (!PathFileExists(cloudChoicePath.c_str()))
|
||||
{
|
||||
::CreateDirectory(cloudChoicePath.c_str(), NULL);
|
||||
}
|
||||
cloudChoicePath += TEXT("choice");
|
||||
|
||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
||||
std::string cloudPathA = wmc->wchar2char(pathChoice, SC_CP_UTF8);
|
||||
|
||||
writeFileContent(cloudChoicePath.c_str(), cloudPathA.c_str());
|
||||
}
|
||||
|
||||
void NppParameters::removeCloudChoice()
|
||||
{
|
||||
generic_string cloudChoicePath = getSettingsFolder();
|
||||
|
||||
cloudChoicePath += TEXT("\\cloud\\choice");
|
||||
if (PathFileExists(cloudChoicePath.c_str()))
|
||||
{
|
||||
::DeleteFile(cloudChoicePath.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool NppParameters::isCloudPathChanged() const
|
||||
{
|
||||
if (_initialCloudChoice == _nppGUI._cloudPath)
|
||||
return false;
|
||||
else if (_initialCloudChoice.size() - _nppGUI._cloudPath.size() == 1)
|
||||
{
|
||||
TCHAR c = _initialCloudChoice.at(_initialCloudChoice.size()-1);
|
||||
if (c == '\\' || c == '/')
|
||||
{
|
||||
if (_initialCloudChoice.find(_nppGUI._cloudPath) == 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (_nppGUI._cloudPath.size() - _initialCloudChoice.size() == 1)
|
||||
{
|
||||
TCHAR c = _nppGUI._cloudPath.at(_nppGUI._cloudPath.size() - 1);
|
||||
if (c == '\\' || c == '/')
|
||||
{
|
||||
if (_nppGUI._cloudPath.find(_initialCloudChoice) == 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NppParameters::writeSettingsFilesOnCloudForThe1stTime(const generic_string & cloudSettingsPath)
|
||||
{
|
||||
bool isOK = false;
|
||||
|
||||
if (cloudSettingsPath == TEXT(""))
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// config.xml
|
||||
|
@ -2704,7 +2496,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudConfigPath, TEXT("config.xml"));
|
||||
if (!::PathFileExists(cloudConfigPath.c_str()) && _pXmlUserDoc)
|
||||
{
|
||||
_pXmlUserDoc->SaveFile(cloudConfigPath.c_str());
|
||||
isOK = _pXmlUserDoc->SaveFile(cloudConfigPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
|
||||
// stylers.xml
|
||||
|
@ -2712,7 +2506,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudStylersPath, TEXT("stylers.xml"));
|
||||
if (!::PathFileExists(cloudStylersPath.c_str()) && _pXmlUserStylerDoc)
|
||||
{
|
||||
_pXmlUserStylerDoc->SaveFile(cloudStylersPath.c_str());
|
||||
isOK = _pXmlUserStylerDoc->SaveFile(cloudStylersPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
|
||||
// langs.xml
|
||||
|
@ -2720,7 +2516,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudLangsPath, TEXT("langs.xml"));
|
||||
if (!::PathFileExists(cloudLangsPath.c_str()) && _pXmlUserDoc)
|
||||
{
|
||||
_pXmlDoc->SaveFile(cloudLangsPath.c_str());
|
||||
isOK = _pXmlDoc->SaveFile(cloudLangsPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
// session.xml: Session stock the absolute file path, it should never be on cloud
|
||||
|
@ -2736,7 +2534,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudUserLangsPath, TEXT("userDefineLang.xml"));
|
||||
if (!::PathFileExists(cloudUserLangsPath.c_str()) && _pXmlUserLangDoc)
|
||||
{
|
||||
_pXmlUserLangDoc->SaveFile(cloudUserLangsPath.c_str());
|
||||
isOK = _pXmlUserLangDoc->SaveFile(cloudUserLangsPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
|
||||
// shortcuts.xml
|
||||
|
@ -2744,7 +2544,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudShortcutsPath, TEXT("shortcuts.xml"));
|
||||
if (!::PathFileExists(cloudShortcutsPath.c_str()) && _pXmlShortcutDoc)
|
||||
{
|
||||
_pXmlShortcutDoc->SaveFile(cloudShortcutsPath.c_str());
|
||||
isOK = _pXmlShortcutDoc->SaveFile(cloudShortcutsPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
|
||||
// contextMenu.xml
|
||||
|
@ -2752,7 +2554,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudContextMenuPath, TEXT("contextMenu.xml"));
|
||||
if (!::PathFileExists(cloudContextMenuPath.c_str()) && _pXmlContextMenuDocA)
|
||||
{
|
||||
_pXmlContextMenuDocA->SaveUnicodeFilePath(cloudContextMenuPath.c_str());
|
||||
isOK = _pXmlContextMenuDocA->SaveUnicodeFilePath(cloudContextMenuPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
|
||||
// nativeLang.xml
|
||||
|
@ -2760,7 +2564,9 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
PathAppend(cloudNativeLangPath, TEXT("nativeLang.xml"));
|
||||
if (!::PathFileExists(cloudNativeLangPath.c_str()) && _pXmlNativeLangDocA)
|
||||
{
|
||||
_pXmlNativeLangDocA->SaveUnicodeFilePath(cloudNativeLangPath.c_str());
|
||||
isOK = _pXmlNativeLangDocA->SaveUnicodeFilePath(cloudNativeLangPath.c_str());
|
||||
if (!isOK)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2772,6 +2578,7 @@ void NppParameters::writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice)
|
|||
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ enum ChangeDetect {cdDisabled=0, cdEnabled=1, cdAutoUpdate=2, cdGo2end=3, cdAuto
|
|||
enum BackupFeature {bak_none = 0, bak_simple = 1, bak_verbose = 2};
|
||||
enum OpenSaveDirSetting {dir_followCurrent = 0, dir_last = 1, dir_userDef = 2};
|
||||
enum MultiInstSetting {monoInst = 0, multiInstOnSession = 1, multiInst = 2};
|
||||
enum CloudChoice {noCloud = 0, dropbox = 1, oneDrive = 2, googleDrive = 3};
|
||||
//enum CloudChoice {noCloud = 0, dropbox = 1, oneDrive = 2, googleDrive = 3};
|
||||
|
||||
const int LANG_INDEX_INSTR = 0;
|
||||
const int LANG_INDEX_INSTR2 = 1;
|
||||
|
@ -671,7 +671,7 @@ struct NppGUI
|
|||
_checkHistoryFiles(true) ,_enableSmartHilite(true), _disableSmartHiliteTmp(false), _enableTagsMatchHilite(true), _enableTagAttrsHilite(true), _enableHiliteNonHTMLZone(false),\
|
||||
_isMaximized(false), _isMinimizedToTray(false), _rememberLastSession(true), _isCmdlineNosessionActivated(false), _detectEncoding(true), _backup(bak_none), _useDir(false), _backupDir(TEXT("")),\
|
||||
_doTaskList(true), _maitainIndent(true), _openSaveDir(dir_followCurrent), _styleMRU(true), _styleURL(0),\
|
||||
_autocStatus(autoc_both), _autocFromLen(1), _funcParams(false), _definedSessionExt(TEXT("")), _cloudChoice(noCloud), _availableClouds(0),\
|
||||
_autocStatus(autoc_both), _autocFromLen(1), _funcParams(false), _definedSessionExt(TEXT("")), _cloudPath(TEXT("")), _availableClouds(0),\
|
||||
_doesExistUpdater(false), _caretBlinkRate(250), _caretWidth(1), _enableMultiSelection(false), _shortTitlebar(false), _themeName(TEXT("")), _isLangMenuCompact(false),\
|
||||
_smartHiliteCaseSensitive(false), _leftmostDelimiter('('), _rightmostDelimiter(')'), _delimiterSelectionOnEntireDocument(false), _multiInstSetting(monoInst),\
|
||||
_fileSwitcherWithoutExtColumn(false), _isSnapshotMode(true), _snapshotBackupTiming(7000), _backSlashIsEscapeCharacterForSql(true) {
|
||||
|
@ -780,7 +780,7 @@ struct NppGUI
|
|||
bool isSnapshotMode() const {return _isSnapshotMode && _rememberLastSession && !_isCmdlineNosessionActivated;};
|
||||
bool _isSnapshotMode;
|
||||
size_t _snapshotBackupTiming;
|
||||
CloudChoice _cloudChoice; // this option will never be read/written from/to config.xml
|
||||
generic_string _cloudPath; // this option will never be read/written from/to config.xml
|
||||
unsigned char _availableClouds; // this option will never be read/written from/to config.xml
|
||||
};
|
||||
|
||||
|
@ -1159,7 +1159,6 @@ public:
|
|||
bool reloadLang();
|
||||
bool reloadStylers(TCHAR *stylePath = NULL);
|
||||
void destroyInstance();
|
||||
generic_string getCloudSettingsPath(CloudChoice cloudChoice);
|
||||
generic_string getSettingsFolder();
|
||||
|
||||
bool _isTaskListRBUTTONUP_Active;
|
||||
|
@ -1374,7 +1373,8 @@ public:
|
|||
};
|
||||
|
||||
void removeTransparent(HWND hwnd) {
|
||||
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, ::GetWindowLongPtr(hwnd, GWL_EXSTYLE) & ~0x00080000);
|
||||
if (hwnd != NULL)
|
||||
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, ::GetWindowLongPtr(hwnd, GWL_EXSTYLE) & ~0x00080000);
|
||||
};
|
||||
|
||||
void setCmdlineParam(const CmdLineParams & cmdLineParams) {
|
||||
|
@ -1497,7 +1497,10 @@ public:
|
|||
return _userPath;
|
||||
};
|
||||
|
||||
void writeSettingsFilesOnCloudForThe1stTime(CloudChoice choice);
|
||||
bool writeSettingsFilesOnCloudForThe1stTime(const generic_string & cloudSettingsPath);
|
||||
void setCloudChoice(const TCHAR *pathChoice);
|
||||
void removeCloudChoice();
|
||||
bool isCloudPathChanged() const;
|
||||
|
||||
COLORREF getCurrentDefaultBgColor() const {
|
||||
return _currentDefaultBgColor;
|
||||
|
@ -1618,6 +1621,8 @@ private:
|
|||
COLORREF _currentDefaultBgColor;
|
||||
COLORREF _currentDefaultFgColor;
|
||||
|
||||
generic_string _initialCloudChoice;
|
||||
|
||||
static int CALLBACK EnumFontFamExProc(const LOGFONT* lpelfe, const TEXTMETRIC *, DWORD, LPARAM lParam) {
|
||||
std::vector<generic_string>& strVect = *(std::vector<generic_string> *)lParam;
|
||||
const size_t vectSize = strVect.size();
|
||||
|
|
|
@ -2388,14 +2388,10 @@ void FindReplaceDlg::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
|
|||
{
|
||||
ptStr = TEXT("");
|
||||
}
|
||||
|
||||
//printInt(fgColor);
|
||||
|
||||
SetTextColor(lpDrawItemStruct->hDC, fgColor);
|
||||
COLORREF bgColor = getCtrlBgColor(_statusBar.getHSelf());
|
||||
::SetBkColor(lpDrawItemStruct->hDC, bgColor);
|
||||
//::SetBkColor(lpDrawItemStruct->hDC, ::GetSysColor(COLOR_3DFACE));
|
||||
//ExtTextOut(lpDIS->hDC, 0, 0, 0 , &lpDIS->rcItem,ptStr, _tcslen(ptStr), NULL);
|
||||
RECT rect;
|
||||
_statusBar.getClientRect(rect);
|
||||
::DrawText(lpDrawItemStruct->hDC, ptStr, lstrlen(ptStr), &rect, DT_SINGLELINE | DT_VCENTER | DT_LEFT);
|
||||
|
|
|
@ -380,9 +380,9 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
|||
BEGIN
|
||||
GROUPBOX "Settings on cloud",IDC_SETTINGSONCLOUD_GB_STATIC,89,44,268,89,BS_CENTER
|
||||
CONTROL "No Cloud",IDC_NOCLOUD_RADIO,"Button",BS_AUTORADIOBUTTON,125,57,92,10
|
||||
CONTROL "Dropbox",IDC_DROPBOX_RADIO,"Button",BS_AUTORADIOBUTTON,125,72,92,10
|
||||
CONTROL "OneDrive",IDC_ONEDRIVE_RADIO,"Button",BS_AUTORADIOBUTTON,125,87,92,10
|
||||
CONTROL "Google Drive",IDC_GOOGLEDRIVE_RADIO,"Button",BS_AUTORADIOBUTTON,125,102,92,10
|
||||
CONTROL "Set your cloud location path here:",IDC_WITHCLOUD_RADIO,"Button",BS_AUTORADIOBUTTON,125,72,180,10
|
||||
EDITTEXT IDC_CLOUDPATH_EDIT,134,88,179,14,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "...",IDD_CLOUDPATH_BROWSE_BUTTON,320,87,16,14
|
||||
LTEXT "",IDC_SETTINGSONCLOUD_WARNING_STATIC,131,117,135,8
|
||||
END
|
||||
|
||||
|
|
|
@ -2809,109 +2809,111 @@ INT_PTR CALLBACK DelimiterSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam,
|
|||
|
||||
INT_PTR CALLBACK SettingsOnCloudDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
||||
{
|
||||
NppGUI & nppGUI = (NppGUI &)((NppParameters::getInstance())->getNppGUI());
|
||||
switch (Message)
|
||||
NppParameters * nppParams = NppParameters::getInstance();
|
||||
NppGUI & nppGUI = (NppGUI &)(nppParams->getNppGUI());
|
||||
|
||||
if (HIWORD(wParam) == EN_CHANGE)
|
||||
{
|
||||
case WM_INITDIALOG :
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
CloudChoice cloudChoice = nppGUI._cloudChoice;
|
||||
_initialCloudChoice = nppGUI._cloudChoice;
|
||||
/*
|
||||
COLORREF bgColor = getCtrlBgColor(_hSelf);
|
||||
SetTextColor(hdcStatic, RGB(255, 0, 0));
|
||||
SetBkColor(hdcStatic, RGB(GetRValue(bgColor) - 30, GetGValue(bgColor) - 30, GetBValue(bgColor) - 30));
|
||||
*/
|
||||
::SendDlgItemMessage(_hSelf, IDC_NOCLOUD_RADIO, BM_SETCHECK, cloudChoice == noCloud?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
case IDC_CLOUDPATH_EDIT:
|
||||
{
|
||||
TCHAR inputDir[MAX_PATH] = {'\0'};
|
||||
TCHAR inputDirExpanded[MAX_PATH] = {'\0'};
|
||||
::SendDlgItemMessage(_hSelf, IDC_CLOUDPATH_EDIT, WM_GETTEXT, MAX_PATH, (LPARAM)inputDir);
|
||||
::ExpandEnvironmentStrings(inputDir, inputDirExpanded, MAX_PATH);
|
||||
if (::PathFileExists(inputDirExpanded))
|
||||
{
|
||||
nppGUI._cloudPath = inputDirExpanded;
|
||||
nppParams->setCloudChoice(inputDirExpanded);
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_DROPBOX_RADIO, BM_SETCHECK, cloudChoice == dropbox?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_DROPBOX_RADIO), (nppGUI._availableClouds & DROPBOX_AVAILABLE) != 0);
|
||||
generic_string message = nppParams->isCloudPathChanged() ? TEXT("Please restart Notepad++ to take effect.") : TEXT("");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
bool isChecked = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_WITHCLOUD_RADIO, BM_GETCHECK, 0, 0));
|
||||
if (isChecked)
|
||||
{
|
||||
generic_string message = TEXT("Invalid path.");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
nppParams->removeCloudChoice();
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_ONEDRIVE_RADIO, BM_SETCHECK, cloudChoice == oneDrive?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_ONEDRIVE_RADIO), (nppGUI._availableClouds & ONEDRIVE_AVAILABLE) != 0);
|
||||
switch (Message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// Default settings: no cloud
|
||||
bool withCloud = false;
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_GOOGLEDRIVE_RADIO, BM_SETCHECK, cloudChoice == googleDrive?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_GOOGLEDRIVE_RADIO), (nppGUI._availableClouds & GOOGLEDRIVE_AVAILABLE) != 0);
|
||||
generic_string message = TEXT("");
|
||||
|
||||
withCloud = nppGUI._cloudPath != TEXT("");
|
||||
if (withCloud)
|
||||
{
|
||||
// detect validation of path
|
||||
if (!::PathFileExists(nppGUI._cloudPath.c_str()))
|
||||
message = TEXT("Invalid path");
|
||||
}
|
||||
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_NOCLOUD_RADIO, BM_SETCHECK, !withCloud ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_WITHCLOUD_RADIO, BM_SETCHECK, withCloud ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_CLOUDPATH_EDIT, WM_SETTEXT, 0, (LPARAM)nppGUI._cloudPath.c_str());
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CLOUDPATH_EDIT), withCloud);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_CLOUDPATH_BROWSE_BUTTON), withCloud);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND :
|
||||
case WM_COMMAND:
|
||||
{
|
||||
switch (wParam)
|
||||
{
|
||||
case IDC_NOCLOUD_RADIO :
|
||||
case IDC_NOCLOUD_RADIO:
|
||||
{
|
||||
nppGUI._cloudChoice = noCloud;
|
||||
removeCloudChoice();
|
||||
|
||||
generic_string message = _initialCloudChoice != nppGUI._cloudChoice?TEXT("Please restart Notepad++ to take effect."):TEXT("");
|
||||
nppGUI._cloudPath = TEXT("");
|
||||
nppParams->removeCloudChoice();
|
||||
|
||||
generic_string message = nppParams->isCloudPathChanged() ? TEXT("Please restart Notepad++ to take effect.") : TEXT("");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_CLOUDPATH_EDIT, WM_SETTEXT, 0, (LPARAM)nppGUI._cloudPath.c_str());
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CLOUDPATH_EDIT), false);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_CLOUDPATH_BROWSE_BUTTON), false);
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_DROPBOX_RADIO :
|
||||
case IDC_WITHCLOUD_RADIO:
|
||||
{
|
||||
nppGUI._cloudChoice = dropbox;
|
||||
setCloudChoice("dropbox");
|
||||
|
||||
generic_string message = _initialCloudChoice != nppGUI._cloudChoice?TEXT("Please restart Notepad++ to take effect."):TEXT("");
|
||||
generic_string message = TEXT("Invalid path.");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CLOUDPATH_EDIT), true);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_CLOUDPATH_BROWSE_BUTTON), true);
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_ONEDRIVE_RADIO :
|
||||
case IDD_CLOUDPATH_BROWSE_BUTTON:
|
||||
{
|
||||
nppGUI._cloudChoice = oneDrive;
|
||||
setCloudChoice("oneDrive");
|
||||
|
||||
generic_string message = _initialCloudChoice != nppGUI._cloudChoice?TEXT("Please restart Notepad++ to take effect."):TEXT("");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
folderBrowser(_hSelf, IDC_CLOUDPATH_EDIT);
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_GOOGLEDRIVE_RADIO :
|
||||
{
|
||||
nppGUI._cloudChoice = googleDrive;
|
||||
setCloudChoice("googleDrive");
|
||||
|
||||
generic_string message = _initialCloudChoice != nppGUI._cloudChoice?TEXT("Please restart Notepad++ to take effect."):TEXT("");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
}
|
||||
break;
|
||||
|
||||
default :
|
||||
default:
|
||||
return FALSE;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void SettingsOnCloudDlg::setCloudChoice(const char *choice)
|
||||
{
|
||||
generic_string cloudChoicePath = (NppParameters::getInstance())->getSettingsFolder();
|
||||
cloudChoicePath += TEXT("\\cloud\\");
|
||||
|
||||
if (!PathFileExists(cloudChoicePath.c_str()))
|
||||
{
|
||||
::CreateDirectory(cloudChoicePath.c_str(), NULL);
|
||||
}
|
||||
cloudChoicePath += TEXT("choice");
|
||||
writeFileContent(cloudChoicePath.c_str(), choice);
|
||||
|
||||
}
|
||||
|
||||
void SettingsOnCloudDlg::removeCloudChoice()
|
||||
{
|
||||
generic_string cloudChoicePath = (NppParameters::getInstance())->getSettingsFolder();
|
||||
//NppParameters *nppParams = ;
|
||||
|
||||
cloudChoicePath += TEXT("\\cloud\\choice");
|
||||
if (PathFileExists(cloudChoicePath.c_str()))
|
||||
{
|
||||
::DeleteFile(cloudChoicePath.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,14 +216,10 @@ private :
|
|||
class SettingsOnCloudDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
SettingsOnCloudDlg(): _initialCloudChoice(noCloud) {};
|
||||
SettingsOnCloudDlg() {};
|
||||
|
||||
private :
|
||||
CloudChoice _initialCloudChoice;
|
||||
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
void setCloudChoice(const char *choice);
|
||||
void removeCloudChoice();
|
||||
};
|
||||
|
||||
class PreferenceDlg : public StaticDialog
|
||||
|
|
|
@ -127,10 +127,12 @@
|
|||
#define IDC_SETTINGSONCLOUD_WARNING_STATIC (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 1)
|
||||
#define IDC_SETTINGSONCLOUD_GB_STATIC (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 2)
|
||||
#define IDC_NOCLOUD_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 3)
|
||||
#define IDC_DROPBOX_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 4)
|
||||
#define IDC_ONEDRIVE_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 5)
|
||||
#define IDC_GOOGLEDRIVE_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 6)
|
||||
|
||||
//#define IDC_DROPBOX_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 4)
|
||||
//#define IDC_ONEDRIVE_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 5)
|
||||
//#define IDC_GOOGLEDRIVE_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 6)
|
||||
#define IDC_WITHCLOUD_RADIO (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 7)
|
||||
#define IDC_CLOUDPATH_EDIT (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 8)
|
||||
#define IDD_CLOUDPATH_BROWSE_BUTTON (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 9)
|
||||
|
||||
#define IDD_PREFERENCE_SETTING_BOX 6300 //(IDD_PREFERENCE_BOX + 300)
|
||||
#define IDC_TABSETTING_GB_STATIC (IDD_PREFERENCE_SETTING_BOX + 1)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,487 +0,0 @@
|
|||
/*
|
||||
** 2006 June 7
|
||||
**
|
||||
** The author disclaims copyright to this source code. In place of
|
||||
** a legal notice, here is a blessing:
|
||||
**
|
||||
** May you do good and not evil.
|
||||
** May you find forgiveness for yourself and forgive others.
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** This header file defines the SQLite interface for use by
|
||||
** shared libraries that want to be imported as extensions into
|
||||
** an SQLite instance. Shared libraries that intend to be loaded
|
||||
** as extensions by SQLite should #include this file instead of
|
||||
** sqlite3.h.
|
||||
*/
|
||||
#ifndef _SQLITE3EXT_H_
|
||||
#define _SQLITE3EXT_H_
|
||||
#include "sqlite3.h"
|
||||
|
||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
||||
|
||||
/*
|
||||
** The following structure holds pointers to all of the SQLite API
|
||||
** routines.
|
||||
**
|
||||
** WARNING: In order to maintain backwards compatibility, add new
|
||||
** interfaces to the end of this structure only. If you insert new
|
||||
** interfaces in the middle of this structure, then older different
|
||||
** versions of SQLite will not be able to load each others' shared
|
||||
** libraries!
|
||||
*/
|
||||
struct sqlite3_api_routines {
|
||||
void * (*aggregate_context)(sqlite3_context*,int nBytes);
|
||||
int (*aggregate_count)(sqlite3_context*);
|
||||
int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
|
||||
int (*bind_double)(sqlite3_stmt*,int,double);
|
||||
int (*bind_int)(sqlite3_stmt*,int,int);
|
||||
int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
|
||||
int (*bind_null)(sqlite3_stmt*,int);
|
||||
int (*bind_parameter_count)(sqlite3_stmt*);
|
||||
int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
|
||||
const char * (*bind_parameter_name)(sqlite3_stmt*,int);
|
||||
int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
|
||||
int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
|
||||
int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
|
||||
int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
|
||||
int (*busy_timeout)(sqlite3*,int ms);
|
||||
int (*changes)(sqlite3*);
|
||||
int (*close)(sqlite3*);
|
||||
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const char*));
|
||||
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const void*));
|
||||
const void * (*column_blob)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes16)(sqlite3_stmt*,int iCol);
|
||||
int (*column_count)(sqlite3_stmt*pStmt);
|
||||
const char * (*column_database_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_database_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_decltype)(sqlite3_stmt*,int i);
|
||||
const void * (*column_decltype16)(sqlite3_stmt*,int);
|
||||
double (*column_double)(sqlite3_stmt*,int iCol);
|
||||
int (*column_int)(sqlite3_stmt*,int iCol);
|
||||
sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
|
||||
const char * (*column_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_origin_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_origin_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_table_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_table_name16)(sqlite3_stmt*,int);
|
||||
const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
|
||||
const void * (*column_text16)(sqlite3_stmt*,int iCol);
|
||||
int (*column_type)(sqlite3_stmt*,int iCol);
|
||||
sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
|
||||
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
|
||||
int (*complete)(const char*sql);
|
||||
int (*complete16)(const void*sql);
|
||||
int (*create_collation)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_collation16)(sqlite3*,const void*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_function)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_function16)(sqlite3*,const void*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
|
||||
int (*data_count)(sqlite3_stmt*pStmt);
|
||||
sqlite3 * (*db_handle)(sqlite3_stmt*);
|
||||
int (*declare_vtab)(sqlite3*,const char*);
|
||||
int (*enable_shared_cache)(int);
|
||||
int (*errcode)(sqlite3*db);
|
||||
const char * (*errmsg)(sqlite3*);
|
||||
const void * (*errmsg16)(sqlite3*);
|
||||
int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
|
||||
int (*expired)(sqlite3_stmt*);
|
||||
int (*finalize)(sqlite3_stmt*pStmt);
|
||||
void (*free)(void*);
|
||||
void (*free_table)(char**result);
|
||||
int (*get_autocommit)(sqlite3*);
|
||||
void * (*get_auxdata)(sqlite3_context*,int);
|
||||
int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
|
||||
int (*global_recover)(void);
|
||||
void (*interruptx)(sqlite3*);
|
||||
sqlite_int64 (*last_insert_rowid)(sqlite3*);
|
||||
const char * (*libversion)(void);
|
||||
int (*libversion_number)(void);
|
||||
void *(*malloc)(int);
|
||||
char * (*mprintf)(const char*,...);
|
||||
int (*open)(const char*,sqlite3**);
|
||||
int (*open16)(const void*,sqlite3**);
|
||||
int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||
int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
|
||||
void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
|
||||
void *(*realloc)(void*,int);
|
||||
int (*reset)(sqlite3_stmt*pStmt);
|
||||
void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_double)(sqlite3_context*,double);
|
||||
void (*result_error)(sqlite3_context*,const char*,int);
|
||||
void (*result_error16)(sqlite3_context*,const void*,int);
|
||||
void (*result_int)(sqlite3_context*,int);
|
||||
void (*result_int64)(sqlite3_context*,sqlite_int64);
|
||||
void (*result_null)(sqlite3_context*);
|
||||
void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
|
||||
void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_value)(sqlite3_context*,sqlite3_value*);
|
||||
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
|
||||
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
||||
const char*,const char*),void*);
|
||||
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
||||
char * (*snprintf)(int,char*,const char*,...);
|
||||
int (*step)(sqlite3_stmt*);
|
||||
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
||||
char const**,char const**,int*,int*,int*);
|
||||
void (*thread_cleanup)(void);
|
||||
int (*total_changes)(sqlite3*);
|
||||
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
|
||||
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
|
||||
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
|
||||
sqlite_int64),void*);
|
||||
void * (*user_data)(sqlite3_context*);
|
||||
const void * (*value_blob)(sqlite3_value*);
|
||||
int (*value_bytes)(sqlite3_value*);
|
||||
int (*value_bytes16)(sqlite3_value*);
|
||||
double (*value_double)(sqlite3_value*);
|
||||
int (*value_int)(sqlite3_value*);
|
||||
sqlite_int64 (*value_int64)(sqlite3_value*);
|
||||
int (*value_numeric_type)(sqlite3_value*);
|
||||
const unsigned char * (*value_text)(sqlite3_value*);
|
||||
const void * (*value_text16)(sqlite3_value*);
|
||||
const void * (*value_text16be)(sqlite3_value*);
|
||||
const void * (*value_text16le)(sqlite3_value*);
|
||||
int (*value_type)(sqlite3_value*);
|
||||
char *(*vmprintf)(const char*,va_list);
|
||||
/* Added ??? */
|
||||
int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
|
||||
/* Added by 3.3.13 */
|
||||
int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
int (*clear_bindings)(sqlite3_stmt*);
|
||||
/* Added by 3.4.1 */
|
||||
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
|
||||
void (*xDestroy)(void *));
|
||||
/* Added by 3.5.0 */
|
||||
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
|
||||
int (*blob_bytes)(sqlite3_blob*);
|
||||
int (*blob_close)(sqlite3_blob*);
|
||||
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
|
||||
int,sqlite3_blob**);
|
||||
int (*blob_read)(sqlite3_blob*,void*,int,int);
|
||||
int (*blob_write)(sqlite3_blob*,const void*,int,int);
|
||||
int (*create_collation_v2)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*),
|
||||
void(*)(void*));
|
||||
int (*file_control)(sqlite3*,const char*,int,void*);
|
||||
sqlite3_int64 (*memory_highwater)(int);
|
||||
sqlite3_int64 (*memory_used)(void);
|
||||
sqlite3_mutex *(*mutex_alloc)(int);
|
||||
void (*mutex_enter)(sqlite3_mutex*);
|
||||
void (*mutex_free)(sqlite3_mutex*);
|
||||
void (*mutex_leave)(sqlite3_mutex*);
|
||||
int (*mutex_try)(sqlite3_mutex*);
|
||||
int (*open_v2)(const char*,sqlite3**,int,const char*);
|
||||
int (*release_memory)(int);
|
||||
void (*result_error_nomem)(sqlite3_context*);
|
||||
void (*result_error_toobig)(sqlite3_context*);
|
||||
int (*sleep)(int);
|
||||
void (*soft_heap_limit)(int);
|
||||
sqlite3_vfs *(*vfs_find)(const char*);
|
||||
int (*vfs_register)(sqlite3_vfs*,int);
|
||||
int (*vfs_unregister)(sqlite3_vfs*);
|
||||
int (*xthreadsafe)(void);
|
||||
void (*result_zeroblob)(sqlite3_context*,int);
|
||||
void (*result_error_code)(sqlite3_context*,int);
|
||||
int (*test_control)(int, ...);
|
||||
void (*randomness)(int,void*);
|
||||
sqlite3 *(*context_db_handle)(sqlite3_context*);
|
||||
int (*extended_result_codes)(sqlite3*,int);
|
||||
int (*limit)(sqlite3*,int,int);
|
||||
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
|
||||
const char *(*sql)(sqlite3_stmt*);
|
||||
int (*status)(int,int*,int*,int);
|
||||
int (*backup_finish)(sqlite3_backup*);
|
||||
sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
|
||||
int (*backup_pagecount)(sqlite3_backup*);
|
||||
int (*backup_remaining)(sqlite3_backup*);
|
||||
int (*backup_step)(sqlite3_backup*,int);
|
||||
const char *(*compileoption_get)(int);
|
||||
int (*compileoption_used)(const char*);
|
||||
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*),
|
||||
void(*xDestroy)(void*));
|
||||
int (*db_config)(sqlite3*,int,...);
|
||||
sqlite3_mutex *(*db_mutex)(sqlite3*);
|
||||
int (*db_status)(sqlite3*,int,int*,int*,int);
|
||||
int (*extended_errcode)(sqlite3*);
|
||||
void (*log)(int,const char*,...);
|
||||
sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
|
||||
const char *(*sourceid)(void);
|
||||
int (*stmt_status)(sqlite3_stmt*,int,int);
|
||||
int (*strnicmp)(const char*,const char*,int);
|
||||
int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
|
||||
int (*wal_autocheckpoint)(sqlite3*,int);
|
||||
int (*wal_checkpoint)(sqlite3*,const char*);
|
||||
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
|
||||
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
|
||||
int (*vtab_config)(sqlite3*,int op,...);
|
||||
int (*vtab_on_conflict)(sqlite3*);
|
||||
/* Version 3.7.16 and later */
|
||||
int (*close_v2)(sqlite3*);
|
||||
const char *(*db_filename)(sqlite3*,const char*);
|
||||
int (*db_readonly)(sqlite3*,const char*);
|
||||
int (*db_release_memory)(sqlite3*);
|
||||
const char *(*errstr)(int);
|
||||
int (*stmt_busy)(sqlite3_stmt*);
|
||||
int (*stmt_readonly)(sqlite3_stmt*);
|
||||
int (*stricmp)(const char*,const char*);
|
||||
int (*uri_boolean)(const char*,const char*,int);
|
||||
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
||||
const char *(*uri_parameter)(const char*,const char*);
|
||||
char *(*vsnprintf)(int,char*,const char*,va_list);
|
||||
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
||||
};
|
||||
|
||||
/*
|
||||
** The following macros redefine the API routines so that they are
|
||||
** redirected throught the global sqlite3_api structure.
|
||||
**
|
||||
** This header file is also used by the loadext.c source file
|
||||
** (part of the main SQLite library - not an extension) so that
|
||||
** it can get access to the sqlite3_api_routines structure
|
||||
** definition. But the main library does not want to redefine
|
||||
** the API. So the redefinition macros are only valid if the
|
||||
** SQLITE_CORE macros is undefined.
|
||||
*/
|
||||
#ifndef SQLITE_CORE
|
||||
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
|
||||
#endif
|
||||
#define sqlite3_bind_blob sqlite3_api->bind_blob
|
||||
#define sqlite3_bind_double sqlite3_api->bind_double
|
||||
#define sqlite3_bind_int sqlite3_api->bind_int
|
||||
#define sqlite3_bind_int64 sqlite3_api->bind_int64
|
||||
#define sqlite3_bind_null sqlite3_api->bind_null
|
||||
#define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
|
||||
#define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
|
||||
#define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
|
||||
#define sqlite3_bind_text sqlite3_api->bind_text
|
||||
#define sqlite3_bind_text16 sqlite3_api->bind_text16
|
||||
#define sqlite3_bind_value sqlite3_api->bind_value
|
||||
#define sqlite3_busy_handler sqlite3_api->busy_handler
|
||||
#define sqlite3_busy_timeout sqlite3_api->busy_timeout
|
||||
#define sqlite3_changes sqlite3_api->changes
|
||||
#define sqlite3_close sqlite3_api->close
|
||||
#define sqlite3_collation_needed sqlite3_api->collation_needed
|
||||
#define sqlite3_collation_needed16 sqlite3_api->collation_needed16
|
||||
#define sqlite3_column_blob sqlite3_api->column_blob
|
||||
#define sqlite3_column_bytes sqlite3_api->column_bytes
|
||||
#define sqlite3_column_bytes16 sqlite3_api->column_bytes16
|
||||
#define sqlite3_column_count sqlite3_api->column_count
|
||||
#define sqlite3_column_database_name sqlite3_api->column_database_name
|
||||
#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
|
||||
#define sqlite3_column_decltype sqlite3_api->column_decltype
|
||||
#define sqlite3_column_decltype16 sqlite3_api->column_decltype16
|
||||
#define sqlite3_column_double sqlite3_api->column_double
|
||||
#define sqlite3_column_int sqlite3_api->column_int
|
||||
#define sqlite3_column_int64 sqlite3_api->column_int64
|
||||
#define sqlite3_column_name sqlite3_api->column_name
|
||||
#define sqlite3_column_name16 sqlite3_api->column_name16
|
||||
#define sqlite3_column_origin_name sqlite3_api->column_origin_name
|
||||
#define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
|
||||
#define sqlite3_column_table_name sqlite3_api->column_table_name
|
||||
#define sqlite3_column_table_name16 sqlite3_api->column_table_name16
|
||||
#define sqlite3_column_text sqlite3_api->column_text
|
||||
#define sqlite3_column_text16 sqlite3_api->column_text16
|
||||
#define sqlite3_column_type sqlite3_api->column_type
|
||||
#define sqlite3_column_value sqlite3_api->column_value
|
||||
#define sqlite3_commit_hook sqlite3_api->commit_hook
|
||||
#define sqlite3_complete sqlite3_api->complete
|
||||
#define sqlite3_complete16 sqlite3_api->complete16
|
||||
#define sqlite3_create_collation sqlite3_api->create_collation
|
||||
#define sqlite3_create_collation16 sqlite3_api->create_collation16
|
||||
#define sqlite3_create_function sqlite3_api->create_function
|
||||
#define sqlite3_create_function16 sqlite3_api->create_function16
|
||||
#define sqlite3_create_module sqlite3_api->create_module
|
||||
#define sqlite3_create_module_v2 sqlite3_api->create_module_v2
|
||||
#define sqlite3_data_count sqlite3_api->data_count
|
||||
#define sqlite3_db_handle sqlite3_api->db_handle
|
||||
#define sqlite3_declare_vtab sqlite3_api->declare_vtab
|
||||
#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
|
||||
#define sqlite3_errcode sqlite3_api->errcode
|
||||
#define sqlite3_errmsg sqlite3_api->errmsg
|
||||
#define sqlite3_errmsg16 sqlite3_api->errmsg16
|
||||
#define sqlite3_exec sqlite3_api->exec
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_expired sqlite3_api->expired
|
||||
#endif
|
||||
#define sqlite3_finalize sqlite3_api->finalize
|
||||
#define sqlite3_free sqlite3_api->free
|
||||
#define sqlite3_free_table sqlite3_api->free_table
|
||||
#define sqlite3_get_autocommit sqlite3_api->get_autocommit
|
||||
#define sqlite3_get_auxdata sqlite3_api->get_auxdata
|
||||
#define sqlite3_get_table sqlite3_api->get_table
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_global_recover sqlite3_api->global_recover
|
||||
#endif
|
||||
#define sqlite3_interrupt sqlite3_api->interruptx
|
||||
#define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
|
||||
#define sqlite3_libversion sqlite3_api->libversion
|
||||
#define sqlite3_libversion_number sqlite3_api->libversion_number
|
||||
#define sqlite3_malloc sqlite3_api->malloc
|
||||
#define sqlite3_mprintf sqlite3_api->mprintf
|
||||
#define sqlite3_open sqlite3_api->open
|
||||
#define sqlite3_open16 sqlite3_api->open16
|
||||
#define sqlite3_prepare sqlite3_api->prepare
|
||||
#define sqlite3_prepare16 sqlite3_api->prepare16
|
||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||
#define sqlite3_profile sqlite3_api->profile
|
||||
#define sqlite3_progress_handler sqlite3_api->progress_handler
|
||||
#define sqlite3_realloc sqlite3_api->realloc
|
||||
#define sqlite3_reset sqlite3_api->reset
|
||||
#define sqlite3_result_blob sqlite3_api->result_blob
|
||||
#define sqlite3_result_double sqlite3_api->result_double
|
||||
#define sqlite3_result_error sqlite3_api->result_error
|
||||
#define sqlite3_result_error16 sqlite3_api->result_error16
|
||||
#define sqlite3_result_int sqlite3_api->result_int
|
||||
#define sqlite3_result_int64 sqlite3_api->result_int64
|
||||
#define sqlite3_result_null sqlite3_api->result_null
|
||||
#define sqlite3_result_text sqlite3_api->result_text
|
||||
#define sqlite3_result_text16 sqlite3_api->result_text16
|
||||
#define sqlite3_result_text16be sqlite3_api->result_text16be
|
||||
#define sqlite3_result_text16le sqlite3_api->result_text16le
|
||||
#define sqlite3_result_value sqlite3_api->result_value
|
||||
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
|
||||
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
|
||||
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
|
||||
#define sqlite3_snprintf sqlite3_api->snprintf
|
||||
#define sqlite3_step sqlite3_api->step
|
||||
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
|
||||
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
|
||||
#define sqlite3_total_changes sqlite3_api->total_changes
|
||||
#define sqlite3_trace sqlite3_api->trace
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
|
||||
#endif
|
||||
#define sqlite3_update_hook sqlite3_api->update_hook
|
||||
#define sqlite3_user_data sqlite3_api->user_data
|
||||
#define sqlite3_value_blob sqlite3_api->value_blob
|
||||
#define sqlite3_value_bytes sqlite3_api->value_bytes
|
||||
#define sqlite3_value_bytes16 sqlite3_api->value_bytes16
|
||||
#define sqlite3_value_double sqlite3_api->value_double
|
||||
#define sqlite3_value_int sqlite3_api->value_int
|
||||
#define sqlite3_value_int64 sqlite3_api->value_int64
|
||||
#define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
|
||||
#define sqlite3_value_text sqlite3_api->value_text
|
||||
#define sqlite3_value_text16 sqlite3_api->value_text16
|
||||
#define sqlite3_value_text16be sqlite3_api->value_text16be
|
||||
#define sqlite3_value_text16le sqlite3_api->value_text16le
|
||||
#define sqlite3_value_type sqlite3_api->value_type
|
||||
#define sqlite3_vmprintf sqlite3_api->vmprintf
|
||||
#define sqlite3_overload_function sqlite3_api->overload_function
|
||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||
#define sqlite3_clear_bindings sqlite3_api->clear_bindings
|
||||
#define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
|
||||
#define sqlite3_blob_bytes sqlite3_api->blob_bytes
|
||||
#define sqlite3_blob_close sqlite3_api->blob_close
|
||||
#define sqlite3_blob_open sqlite3_api->blob_open
|
||||
#define sqlite3_blob_read sqlite3_api->blob_read
|
||||
#define sqlite3_blob_write sqlite3_api->blob_write
|
||||
#define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
|
||||
#define sqlite3_file_control sqlite3_api->file_control
|
||||
#define sqlite3_memory_highwater sqlite3_api->memory_highwater
|
||||
#define sqlite3_memory_used sqlite3_api->memory_used
|
||||
#define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
|
||||
#define sqlite3_mutex_enter sqlite3_api->mutex_enter
|
||||
#define sqlite3_mutex_free sqlite3_api->mutex_free
|
||||
#define sqlite3_mutex_leave sqlite3_api->mutex_leave
|
||||
#define sqlite3_mutex_try sqlite3_api->mutex_try
|
||||
#define sqlite3_open_v2 sqlite3_api->open_v2
|
||||
#define sqlite3_release_memory sqlite3_api->release_memory
|
||||
#define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
|
||||
#define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
|
||||
#define sqlite3_sleep sqlite3_api->sleep
|
||||
#define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
|
||||
#define sqlite3_vfs_find sqlite3_api->vfs_find
|
||||
#define sqlite3_vfs_register sqlite3_api->vfs_register
|
||||
#define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
|
||||
#define sqlite3_threadsafe sqlite3_api->xthreadsafe
|
||||
#define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
|
||||
#define sqlite3_result_error_code sqlite3_api->result_error_code
|
||||
#define sqlite3_test_control sqlite3_api->test_control
|
||||
#define sqlite3_randomness sqlite3_api->randomness
|
||||
#define sqlite3_context_db_handle sqlite3_api->context_db_handle
|
||||
#define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
|
||||
#define sqlite3_limit sqlite3_api->limit
|
||||
#define sqlite3_next_stmt sqlite3_api->next_stmt
|
||||
#define sqlite3_sql sqlite3_api->sql
|
||||
#define sqlite3_status sqlite3_api->status
|
||||
#define sqlite3_backup_finish sqlite3_api->backup_finish
|
||||
#define sqlite3_backup_init sqlite3_api->backup_init
|
||||
#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
|
||||
#define sqlite3_backup_remaining sqlite3_api->backup_remaining
|
||||
#define sqlite3_backup_step sqlite3_api->backup_step
|
||||
#define sqlite3_compileoption_get sqlite3_api->compileoption_get
|
||||
#define sqlite3_compileoption_used sqlite3_api->compileoption_used
|
||||
#define sqlite3_create_function_v2 sqlite3_api->create_function_v2
|
||||
#define sqlite3_db_config sqlite3_api->db_config
|
||||
#define sqlite3_db_mutex sqlite3_api->db_mutex
|
||||
#define sqlite3_db_status sqlite3_api->db_status
|
||||
#define sqlite3_extended_errcode sqlite3_api->extended_errcode
|
||||
#define sqlite3_log sqlite3_api->log
|
||||
#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
|
||||
#define sqlite3_sourceid sqlite3_api->sourceid
|
||||
#define sqlite3_stmt_status sqlite3_api->stmt_status
|
||||
#define sqlite3_strnicmp sqlite3_api->strnicmp
|
||||
#define sqlite3_unlock_notify sqlite3_api->unlock_notify
|
||||
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
|
||||
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
|
||||
#define sqlite3_wal_hook sqlite3_api->wal_hook
|
||||
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
|
||||
#define sqlite3_vtab_config sqlite3_api->vtab_config
|
||||
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
|
||||
/* Version 3.7.16 and later */
|
||||
#define sqlite3_close_v2 sqlite3_api->close_v2
|
||||
#define sqlite3_db_filename sqlite3_api->db_filename
|
||||
#define sqlite3_db_readonly sqlite3_api->db_readonly
|
||||
#define sqlite3_db_release_memory sqlite3_api->db_release_memory
|
||||
#define sqlite3_errstr sqlite3_api->errstr
|
||||
#define sqlite3_stmt_busy sqlite3_api->stmt_busy
|
||||
#define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
|
||||
#define sqlite3_stricmp sqlite3_api->stricmp
|
||||
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
||||
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
||||
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
||||
#define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
|
||||
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
||||
#endif /* SQLITE_CORE */
|
||||
|
||||
#ifndef SQLITE_CORE
|
||||
/* This case when the file really is being compiled as a loadable
|
||||
** extension */
|
||||
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
||||
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
||||
# define SQLITE_EXTENSION_INIT3 \
|
||||
extern const sqlite3_api_routines *sqlite3_api;
|
||||
#else
|
||||
/* This case when the file is being statically linked into the
|
||||
** application */
|
||||
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
||||
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
||||
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||
#endif
|
||||
|
||||
#endif /* _SQLITE3EXT_H_ */
|
|
@ -339,20 +339,6 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
|
|||
<ClCompile Include="..\src\ScitillaComponent\SmartHighlighter.cpp" />
|
||||
<ClCompile Include="..\src\WinControls\SplitterContainer\Splitter.cpp" />
|
||||
<ClCompile Include="..\src\WinControls\SplitterContainer\SplitterContainer.cpp" />
|
||||
<ClCompile Include="..\src\sqlite\sqlite3.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Unicode Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Unicode Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Unicode Release|x64'">
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Unicode Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Unicode Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\WinControls\StaticDialog\StaticDialog.cpp" />
|
||||
<ClCompile Include="..\src\WinControls\StatusBar\StatusBar.cpp" />
|
||||
<ClCompile Include="..\src\WinControls\TabBar\TabBar.cpp" />
|
||||
|
@ -626,7 +612,6 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
|
|||
<ClInclude Include="..\src\ScitillaComponent\SmartHighlighter.h" />
|
||||
<ClInclude Include="..\src\WinControls\SplitterContainer\Splitter.h" />
|
||||
<ClInclude Include="..\src\WinControls\SplitterContainer\SplitterContainer.h" />
|
||||
<ClInclude Include="..\src\sqlite\sqlite3.h" />
|
||||
<ClInclude Include="..\src\WinControls\StaticDialog\StaticDialog.h" />
|
||||
<ClInclude Include="..\src\WinControls\StatusBar\StatusBar.h" />
|
||||
<ClInclude Include="..\src\WinControls\TabBar\TabBar.h" />
|
||||
|
|
Loading…
Reference in New Issue