本文整理汇总了C++中db_set_ts函数的典型用法代码示例。如果您正苦于以下问题:C++ db_set_ts函数的具体用法?C++ db_set_ts怎么用?C++ db_set_ts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_set_ts函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveSettingsConnections
void saveSettingsConnections(struct CONNECTION *connHead)
{
char buff[128];
int i=0;
struct CONNECTION *tmp=connHead;
while(tmp!=NULL)
{
mir_snprintf(buff,sizeof(buff), "%dFilterIntIp", i);
db_set_ts(NULL, PLUGINNAME, buff, tmp->strIntIp);
mir_snprintf(buff,sizeof(buff), "%dFilterExtIp", i);
db_set_ts(NULL, PLUGINNAME, buff, tmp->strExtIp);
mir_snprintf(buff,sizeof(buff), "%dFilterPName", i);
db_set_ws(NULL, PLUGINNAME, buff, tmp->PName);
mir_snprintf(buff,sizeof(buff), "%dFilterIntPort", i);
db_set_dw(NULL, PLUGINNAME, buff, tmp->intIntPort);
mir_snprintf(buff,sizeof(buff), "%dFilterExtPort", i);
db_set_dw(NULL, PLUGINNAME, buff, tmp->intExtPort);
mir_snprintf(buff,sizeof(buff), "%dFilterAction", i);
db_set_dw(NULL, PLUGINNAME, buff, tmp->Pid);
i++;
tmp=tmp->next;
}
settingFiltersCount=i;
db_set_dw(NULL, PLUGINNAME, "FiltersCount", settingFiltersCount );
}
示例2: write_ping_address
void write_ping_address(PINGADDRESS &i)
{
char buff[16];
mir_snprintf(buff, "PING_DEST_%d", i.index);
if (i.item_id == 0) {
i.item_id = NextID++;
db_set_dw(0, PLUG, "NextID", NextID);
}
db_set_dw(0, buff, "Id", i.item_id);
db_set_ts(0, buff, "Address", i.pszName);
db_set_ts(0, buff, "Label", i.pszLabel);
db_set_w(0, buff, "Status", i.status);
db_set_dw(0, buff, "Port", i.port);
db_set_s(0, buff, "Proto", i.pszProto);
if (mir_tstrlen(i.pszCommand))
db_set_ts(0, buff, "Command", i.pszCommand);
else
db_unset(0, buff, "Command");
if (mir_tstrlen(i.pszParams))
db_set_ts(0, buff, "CommandParams", i.pszParams);
else
db_unset(0, buff, "CommandParams");
db_set_w(0, buff, "SetStatus", i.set_status);
db_set_w(0, buff, "GetStatus", i.get_status);
db_set_w(0, buff, "Index", i.index);
}
示例3: __declspec
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
Icon_Register(g_hInstance, MOD_NAME, iconList, _countof(iconList), "nas");
InitCommonControls();
InitOptions(); // must be called before we hook CallService
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before
TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", _T(""));
if (Str.GetLen())
db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(_T("nas_message"), _T("extratext")));
Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", _T(""));
if (Str.GetLen())
db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(_T("nas_message"), _T("extratext")));
}
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot
db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0);
db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 2);
}
return 0;
}
示例4: make_contact_name
bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri,
bool bWatch)
{
TContracts::const_iterator i = std::find_if(m_aContacts.begin(), m_aContacts.end(),
boost::bind(is_rate_watched, _1, ri.m_from, ri.m_to));
if ((true == bWatch) && (i == m_aContacts.end())) {
tstring sName = make_contact_name(ri.m_from.GetSymbol(), ri.m_to.GetSymbol());
MCONTACT hContact = CreateNewContact(sName);
if (hContact) {
db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_FROM_ID, ri.m_from.GetID().c_str());
db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_TO_ID, ri.m_to.GetID().c_str());
if (false == ri.m_from.GetName().empty()) {
db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_FROM_DESCRIPTION, ri.m_from.GetName().c_str());
}
if (false == ri.m_to.GetName().empty()) {
db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_TO_DESCRIPTION, ri.m_to.GetName().c_str());
}
return true;
}
}
else if ((false == bWatch) && (i != m_aContacts.end())) {
MCONTACT hContact = *i;
{// for CCritSection
mir_cslock lck(m_cs);
m_aContacts.erase(i);
}
CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
return true;
}
return false;
}
示例5: CreateGroup
int CreateGroup(const TCHAR *group, MCONTACT hContact)
{
if (group == NULL)
return 0;
size_t cbName = mir_tstrlen(group);
TCHAR *tszGrpName = (TCHAR*)_alloca((cbName + 2)*sizeof(TCHAR));
tszGrpName[0] = 1 | GROUPF_EXPANDED;
mir_tstrcpy(tszGrpName + 1, group);
// Check for duplicate & find unused id
char groupIdStr[11];
for (int groupId = 0;; groupId++) {
itoa(groupId, groupIdStr, 10);
ptrT tszDbGroup(db_get_tsa(NULL, "CListGroups", groupIdStr));
if (tszDbGroup == NULL)
break;
if (!mir_tstrcmp((TCHAR*)tszDbGroup+1, tszGrpName+1)) {
if (hContact)
db_set_ts(hContact, "CList", "Group", tszGrpName + 1);
else
AddMessage(LPGENT("Skipping duplicate group %s."), tszGrpName + 1);
return 0;
}
}
db_set_ts(NULL, "CListGroups", groupIdStr, tszGrpName);
if (hContact)
db_set_ts(hContact, "CList", "Group", tszGrpName + 1);
return 1;
}
示例6: SaveOptions
int SaveOptions(void)
{
TCHAR prof_dir[MAX_PATH];
db_set_b(0, "AutoBackups", "BackupType", (BYTE)options.backup_types);
if (options.period < 1)
options.period = 1;
db_set_w(0, "AutoBackups", "Period", (WORD)options.period);
db_set_b(0, "AutoBackups", "PeriodType", (BYTE)options.period_type);
mir_sntprintf(prof_dir, _countof(prof_dir), _T("%s\\"), profilePath);
size_t prof_len = mir_tstrlen(prof_dir);
size_t opt_len = mir_tstrlen(options.folder);
if (opt_len > prof_len && _tcsncmp(options.folder, prof_dir, prof_len) == 0) {
db_set_ts(0, "AutoBackups", "Folder", (options.folder + prof_len));
}
else
db_set_ts(0, "AutoBackups", "Folder", options.folder);
TCHAR *tmp = Utils_ReplaceVarsT(options.folder);
if (mir_tstrlen(tmp) < 2 || tmp[1] != ':') {
_tcsncpy_s(prof_dir, options.folder, _TRUNCATE);
mir_sntprintf(options.folder, _countof(options.folder), _T("%s\\%s"), profilePath, prof_dir);
}
mir_free(tmp);
db_set_w(0, "AutoBackups", "NumBackups", options.num_backups);
db_set_b(0, "AutoBackups", "NoProgress", (BYTE)options.disable_progress);
db_set_b(0, "AutoBackups", "NoPopups", (BYTE)options.disable_popups);
db_set_b(0, "AutoBackups", "UseZip", (BYTE)options.use_zip);
SetBackupTimer();
return 0;
}
示例7: mir_snprintf
void CNudgeElement::Save(void)
{
char SectionName[512];
mir_snprintf(SectionName, _countof(SectionName), "%s-openMessageWindow", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->openMessageWindow);
mir_snprintf(SectionName, _countof(SectionName), "%s-openContactList", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->openContactList);
mir_snprintf(SectionName, _countof(SectionName), "%s-useIgnore", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->useIgnoreSettings);
mir_snprintf(SectionName, _countof(SectionName), "%s-showStatus", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->showStatus);
mir_snprintf(SectionName, _countof(SectionName), "%s-showPopup", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->showPopup);
mir_snprintf(SectionName, _countof(SectionName), "%s-shakeClist", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->shakeClist);
mir_snprintf(SectionName, _countof(SectionName), "%s-shakeChat", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->shakeChat);
mir_snprintf(SectionName, _countof(SectionName), "%s-enabled", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->enabled);
mir_snprintf(SectionName, _countof(SectionName), "%s-autoResend", ProtocolName);
db_set_b(NULL, MODULENAME, SectionName, this->autoResend);
mir_snprintf(SectionName, _countof(SectionName), "%s-statusFlags", ProtocolName);
db_set_dw(NULL, MODULENAME, SectionName, this->statusFlags);
mir_snprintf(SectionName, _countof(SectionName), "%s-recText", ProtocolName);
db_set_ts(NULL, MODULENAME, SectionName, this->recText);
mir_snprintf(SectionName, _countof(SectionName), "%s-senText", ProtocolName);
db_set_ts(NULL, MODULENAME, SectionName, this->senText);
}
示例8: avSetAvatar
static INT_PTR avSetAvatar(MCONTACT hContact, TCHAR *tszPath)
{
TCHAR FileName[MAX_PATH];
TCHAR *szFinalName;
BYTE locking_request;
if (hContact == NULL || fei == NULL)
return 0;
int is_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
if (tszPath == NULL) {
OPENFILENAME ofn = { 0 };
TCHAR filter[256];
filter[0] = '\0';
CallService(MS_UTILS_GETBITMAPFILTERSTRINGST, SIZEOF(filter), (LPARAM)filter);
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
ofn.lpstrFilter = filter;
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK;
ofn.lpstrInitialDir = _T(".");
*FileName = '\0';
ofn.lpstrDefExt = _T("");
ofn.hInstance = g_hInst;
ofn.lpTemplateName = MAKEINTRESOURCE(IDD_OPENSUBCLASS);
ofn.lpfnHook = OpenFileSubclass;
locking_request = is_locked;
ofn.lCustData = (LPARAM)&locking_request;
if (!GetOpenFileName(&ofn))
return 0;
szFinalName = FileName;
is_locked = locking_request ? 1 : is_locked;
}
else szFinalName = tszPath;
// filename is now set, check it and perform all needed action
if (_taccess(szFinalName, 4) == -1)
return 0;
// file exists...
TCHAR szBackupName[MAX_PATH];
PathToRelativeT(szFinalName, szBackupName, g_szDataPath);
db_set_ts(hContact, "ContactPhoto", "Backup", szBackupName);
db_set_b(hContact, "ContactPhoto", "Locked", is_locked);
db_set_ts(hContact, "ContactPhoto", "File", szFinalName);
MakePathRelative(hContact, szFinalName);
// Fix cache
ChangeAvatar(hContact, true);
return 0;
}
示例9: AddToListByName
HANDLE AddToListByName(const CString& sName, WPARAM flags, LPCTSTR about, bool bInteractive, bool bGroup)
{
ip addr = INADDR_NONE;
CString sShortName( sName );
if ( ! bGroup )
{
// Попытка получить IP из имени
if ( addr == INADDR_NONE )
addr = ResolveToIP( sShortName );
// Поиск NetBIOS-имени
if ( addr == INADDR_NONE )
addr = pluginNetBIOS.FindNameIP( sName );
// Неизвестный контакт
if ( addr == INADDR_NONE && bInteractive )
{
if ( MessageBox( NULL,
TranslateT("Cannot resolve contacts IP-address. Add it anyway?"),
modname_t, MB_YESNO | MB_ICONQUESTION ) != IDYES )
{
return NULL;
}
}
}
// Поиск существующего контакта
HANDLE hContact = GetContact( sShortName );
if ( ! hContact )
{
// Добавление контакта
hContact = (HANDLE)CallService( MS_DB_CONTACT_ADD, 0, 0 );
if ( hContact )
{
CallService( MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)modname );
SetNick( hContact, sShortName );
SetGroup( hContact, bGroup );
db_set_ts( hContact, "CList", "MyHandle", sShortName );
db_set_b( hContact, "CList", "NotOnList", 1 );
db_set_b( hContact, "CList", "Hidden", 1 );
SetContactIP( hContact, addr );
SetElapsed( hContact, "IPTime" );
if ( about )
db_set_ts( hContact, modname, "About", about );
contact_scanner::ScanContact( hContact );
}
}
if ( hContact && ! ( flags & PALF_TEMPORARY ) &&
db_get_b( hContact, "CList", "NotOnList", 1 ) )
{
// Оставляем контакт
db_unset( hContact, "CList", "NotOnList" );
db_unset( hContact, "CList", "Hidden" );
}
return hContact;
}
示例10: CtrlContactWriteMyItemsToDB
/**
* name: CtrlContactWriteMyItemsToDB
* desc: write a list of custom items from combobox to database
* param: none
* return: always 0
**/
int CtrlContactWriteMyItemsToDB(
HWND hCtrl,
int iFirstItem,
MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
LPCSTR szFormatVal)
{
CHAR pszSetting[MAXSETTING];
TCHAR szCat[MAX_CAT];
TCHAR szVal[MAXDATASIZE];
LPTSTR pszOther;
CBEXITEM cbi;
INT_PTR ccOther;
int i = 0;
if (!CtrlContactWndProc(hCtrl, CBEXM_ISCHANGED, NULL, NULL)) return 1;
if (!hContact && !(pszModule = pszProto)) return 1;
pszOther = TranslateT("Other");
ccOther = mir_tstrlen(pszOther);
cbi.wMask = CBEXIM_CAT|CBEXIM_VAL|CBEXIM_FLAGS;
cbi.pszCat = szCat;
cbi.ccCat = MAX_CAT;
cbi.pszVal = szVal;
cbi.ccVal = MAXDATASIZE - 4;
cbi.iItem = iFirstItem;
cbi.dwID = 0;
while (CtrlContactWndProc(hCtrl, CBEXM_GETITEM, NULL, (LPARAM)&cbi) && cbi.iItem < 50) {
if (!(cbi.wFlags & CBEXIF_DELETED) && *szVal) {
if (cbi.wFlags & CBEXIF_SMS) {
mir_tstrncat(szVal, _T(" SMS"), _countof(szVal) - mir_tstrlen(szVal));
}
mir_snprintf(pszSetting, szFormatCat, i);
if (*szCat && _tcsncmp(szCat, pszOther, ccOther)) {
if (db_set_ts(hContact, pszModule, pszSetting, szCat)) return 1;
}
else
db_unset(hContact, pszModule, pszSetting);
mir_snprintf(pszSetting, szFormatVal, i);
if (db_set_ts(hContact, pszModule, pszSetting, szVal)) return 1;
cbi.wFlags &= ~CTRLF_CHANGED;
cbi.wMask = CBEXIM_FLAGS;
CtrlContactWndProc(hCtrl, CBEXM_SETITEM, NULL, (LPARAM)&cbi);
cbi.wMask = CBEXIM_CAT|CBEXIM_VAL|CBEXIM_FLAGS;
i++;
}
cbi.iItem++;
}
DB::Setting::DeleteArray(hContact, pszModule, szFormatCat, i);
DB::Setting::DeleteArray(hContact, pszModule, szFormatVal, i);
InvalidateRect(GetDlgItem(hCtrl, EDIT_VALUE), NULL, TRUE);
return 0;
}
示例11: token
void CDropbox::RequestAccountInfo()
{
MCONTACT hContact = CDropbox::GetDefaultContact();
ptrA token(db_get_sa(NULL, MODULE, "TokenSecret"));
GetAccountInfoRequest request(token);
NLHR_PTR response(request.Send(hNetlibConnection));
HandleHttpResponseError(response);
JSONNode root = JSONNode::parse(response->pData);
if (root.empty())
return;
JSONNode referral_link = root.at("referral_link");
if (!referral_link.empty())
db_set_s(hContact, MODULE, "Homepage", referral_link.as_string().c_str());
JSONNode display_name = root.at("display_name");
if (!display_name.empty())
{
ptrT display_name(mir_utf8decodeT(display_name.as_string().c_str()));
TCHAR *sep = _tcsrchr(display_name, _T(' '));
if (sep)
{
db_set_ts(hContact, MODULE, "LastName", sep + 1);
display_name[mir_tstrlen(display_name) - mir_tstrlen(sep)] = '\0';
db_set_ts(hContact, MODULE, "FirstName", display_name);
}
else
{
db_set_ts(hContact, MODULE, "FirstName", display_name);
db_unset(hContact, MODULE, "LastName");
}
}
JSONNode country = root.at("country");
if (!country.empty())
{
std::string isocode = country.as_string();
if (isocode.empty())
db_unset(hContact, MODULE, "Country");
else
{
char *country = (char *)CallService(MS_UTILS_GETCOUNTRYBYISOCODE, (WPARAM)isocode.c_str(), 0);
db_set_s(hContact, MODULE, "Country", country);
}
}
JSONNode quota_info = root.at("quota_info");
if (!quota_info.empty())
{
db_set_dw(hContact, MODULE, "SharedQuota", quota_info.at("shared").as_int());
db_set_dw(hContact, MODULE, "NormalQuota", quota_info.at("normal").as_int());
db_set_dw(hContact, MODULE, "TotalQuota", quota_info.at("quota").as_int());
}
}
示例12: token
void CDropbox::RequestAccountInfo()
{
MCONTACT hContact = CDropbox::GetDefaultContact();
ptrA token(db_get_sa(NULL, MODULE, "TokenSecret"));
GetAccountInfoRequest request(token);
NLHR_PTR response(request.Send(hNetlibConnection));
HandleHttpResponseError(response);
JSONNode root = JSONNode::parse(response->pData);
if (root.empty())
return;
JSONNode referral_link = root.at("referral_link");
if (!referral_link.empty())
db_set_s(hContact, MODULE, "Homepage", referral_link.as_string().c_str());
JSONNode display_name = root.at("display_name");
if (!display_name.empty())
{
CMString tszDisplayName(display_name.as_mstring());
int pos = tszDisplayName.ReverseFind(' ');
if (pos != -1)
{
db_set_ts(hContact, MODULE, "LastName", tszDisplayName.Mid(pos+1));
db_set_ts(hContact, MODULE, "FirstName", tszDisplayName.Left(pos));
}
else
{
db_set_ts(hContact, MODULE, "FirstName", tszDisplayName);
db_unset(hContact, MODULE, "LastName");
}
}
JSONNode country = root.at("country");
if (!country.empty())
{
std::string isocode = country.as_string();
if (isocode.empty())
db_unset(hContact, MODULE, "Country");
else
{
char *szCountry = (char *)CallService(MS_UTILS_GETCOUNTRYBYISOCODE, (WPARAM)isocode.c_str(), 0);
db_set_s(hContact, MODULE, "Country", szCountry);
}
}
JSONNode quota_info = root.at("quota_info");
if (!quota_info.empty())
{
db_set_dw(hContact, MODULE, "SharedQuota", quota_info.at("shared").as_int());
db_set_dw(hContact, MODULE, "NormalQuota", quota_info.at("normal").as_int());
db_set_dw(hContact, MODULE, "TotalQuota", quota_info.at("quota").as_int());
}
}
示例13: ChangeProtoMessages
void ChangeProtoMessages(char* szProto, int iMode, TCString &Msg)
{
TCString CurMsg(Msg);
if (szProto) {
if (Msg == NULL)
CurMsg = GetDynamicStatMsg(INVALID_CONTACT_ID, szProto);
CallAllowedPS_SETAWAYMSG(szProto, iMode, (char*)_T2A(CurMsg));
g_ProtoStates[szProto].CurStatusMsg = CurMsg;
}
else { // change message of all protocols
int numAccs;
PROTOACCOUNT **accs;
ProtoEnumAccounts(&numAccs, &accs);
for (int i = 0; i < numAccs; i++) {
PROTOACCOUNT *p = accs[i];
if (!db_get_b(NULL, p->szModuleName, "LockMainStatus", 0)) {
if (Msg == NULL)
CurMsg = GetDynamicStatMsg(INVALID_CONTACT_ID, p->szModuleName);
CallAllowedPS_SETAWAYMSG(p->szModuleName, iMode, (char*)_T2A(CurMsg));
g_ProtoStates[p->szModuleName].CurStatusMsg = CurMsg;
}
}
}
static struct
{
int Status;
char *Setting;
} StatusSettings[] = {
ID_STATUS_OFFLINE, "Off",
ID_STATUS_ONLINE, "On",
ID_STATUS_AWAY, "Away",
ID_STATUS_NA, "Na",
ID_STATUS_DND, "Dnd",
ID_STATUS_OCCUPIED, "Occupied",
ID_STATUS_FREECHAT, "FreeChat",
ID_STATUS_INVISIBLE, "Inv",
ID_STATUS_ONTHEPHONE, "Otp",
ID_STATUS_OUTTOLUNCH, "Otl",
ID_STATUS_IDLE, "Idl"
};
for (int i = 0; i < SIZEOF(StatusSettings); i++) {
if (iMode == StatusSettings[i].Status) {
db_set_ts(NULL, "SRAway", CString(StatusSettings[i].Setting) + "Msg", CurMsg);
db_set_ts(NULL, "SRAway", CString(StatusSettings[i].Setting) + "Default", CurMsg); // TODO: make it more accurate, and change not only here, but when changing status messages through UpdateMsgsTimerFunc too; and when changing messages through AutoAway() ?
break;
}
}
// InitUpdateMsgs();
}
示例14: db_set_ts
void ProtocolArray::SetStatusMsgs(int status, const TCHAR *message)
{
db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), message);
// Save default also
if (!db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, "UsePrev"), 0))
db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), message);
for (int i = 0; i < buffer_len; i++)
if (buffer[i]->status == status)
buffer[i]->SetStatusMsg(status, message);
}
示例15: MakePathRelative
void MakePathRelative(MCONTACT hContact, TCHAR *path)
{
TCHAR szFinalPath[MAX_PATH];
szFinalPath[0] = '\0';
size_t result = PathToRelativeT(path, szFinalPath, g_szDataPath);
if (result && szFinalPath[0] != '\0') {
db_set_ts(hContact, "ContactPhoto", "RFile", szFinalPath);
if (!db_get_b(hContact, "ContactPhoto", "Locked", 0))
db_set_ts(hContact, "ContactPhoto", "Backup", szFinalPath);
}
}