summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classMAnnivDate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/classMAnnivDate.cpp')
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp
index 794af36cc8..2731b85bca 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp
@@ -255,7 +255,7 @@ MZodiac MAnnivDate::Zodiac()
* param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetReminderOpts(HANDLE hContact)
+int MAnnivDate::DBGetReminderOpts(HCONTACT hContact)
{
if (!hContact || hContact == INVALID_HANDLE_VALUE)
return 1;
@@ -287,7 +287,7 @@ int MAnnivDate::DBGetReminderOpts(HANDLE hContact)
* param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteReminderOpts(HANDLE hContact)
+int MAnnivDate::DBWriteReminderOpts(HCONTACT hContact)
{
if (!hContact || hContact == INVALID_HANDLE_VALUE)
return 1;
@@ -336,7 +336,7 @@ int MAnnivDate::DBWriteReminderOpts(HANDLE hContact)
* szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
ZeroDate();
@@ -371,7 +371,7 @@ int MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCST
* szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
return
db_set_b(hContact, pszModule, szDay, (BYTE)Day()) ||
@@ -390,7 +390,7 @@ int MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPC
* szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
+int MAnnivDate::DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
{
int ret;
@@ -413,7 +413,7 @@ int MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LP
* pszSetting - key used to identify the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIs(hContact, pszModule, pszSetting, &dbv))
@@ -436,7 +436,7 @@ int MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSett
* pszSetting - key used to save the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
if (hContact == INVALID_HANDLE_VALUE || pszModule == 0 || *pszModule == 0 || pszSetting == 0 || *pszSetting == 0)
return 1;
@@ -457,7 +457,7 @@ int MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSe
* pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
+int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto)
{
Clear();
@@ -482,7 +482,7 @@ int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
// try to get setting from the default subcontact first
const int def = DB::MetaContact::SubDefNum(hContact);
if (def > -1 && def < INT_MAX) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, def);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, def);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -496,7 +496,7 @@ int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
if (cnt < INT_MAX) {
for (int i = 0; i < cnt; i++) {
if (i != def) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -521,7 +521,7 @@ int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew)
+int MAnnivDate::DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew)
{
Clear();
switch(bOld) {
@@ -556,7 +556,7 @@ int MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteBirthDate(HANDLE hContact)
+int MAnnivDate::DBWriteBirthDate(HCONTACT hContact)
{
LPCSTR pszModule = SvcReminderGetMyBirthdayModule();
@@ -599,7 +599,7 @@ int MAnnivDate::DBWriteBirthDate(HANDLE hContact)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteBirthDate(HANDLE hContact)
+int MAnnivDate::DBDeleteBirthDate(HCONTACT hContact)
{
return DBDeleteDate(hContact, Module(), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
}
@@ -617,7 +617,7 @@ int MAnnivDate::DBDeleteBirthDate(HANDLE hContact)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex)
+int MAnnivDate::DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex)
{
Clear();
@@ -649,7 +649,7 @@ int MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex)
* pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex)
+int MAnnivDate::DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex)
{
// date can only be written to db as anniversary if it is not marked as birthday
if (wIndex <= ANID_LAST && _wID != ANID_BIRTHDAY) {
@@ -673,7 +673,7 @@ int MAnnivDate::DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex)
* automatic backup service
***********************************************************************************************************/
-static WORD AskUser(HANDLE hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
+static WORD AskUser(HCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
{
MSGBOX MB;
TCHAR szMsg[MAXDATASIZE];
@@ -707,7 +707,7 @@ static WORD AskUser(HANDLE hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNe
* return: 0 if backup was done, 1 otherwise
**/
-int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
+int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
{
if (!hContact)
return 1;
@@ -742,7 +742,7 @@ int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDont
// allow backup only, if the custom setting differs from all meta subcontacts' protocol based settings, too.
for (int i = 0; (i < nSubContactCount) && bWantBackup && bIsMeta; i++) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact && !mdbIgnore.DBGetDate(hSubContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
bWantBackup = bWantBackup
&& !IsEqual(mdbIgnore.SystemTime())
@@ -767,7 +767,7 @@ int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDont
// update metasubcontacts
for (int i = 0; i < nSubContactCount; i++) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL) {
if (!mdbIgnore.DBGetDate(hSubContact, DB::Contact::Proto(hSubContact), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
mdbIgnore.DBWriteDateStamp(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED);