diff options
-rw-r--r-- | include/m_contacts.h | 6 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 272870 -> 273396 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 272104 -> 272630 bytes | |||
-rw-r--r-- | src/mir_app/src/contacts.cpp | 15 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 2 |
6 files changed, 25 insertions, 0 deletions
diff --git a/include/m_contacts.h b/include/m_contacts.h index 3cea1e17d6..3435fe19e4 100644 --- a/include/m_contacts.h +++ b/include/m_contacts.h @@ -96,6 +96,12 @@ namespace Contact MIR_APP_DLL(void) Hide(MCONTACT hContact, bool bHidden = true);
/////////////////////////////////////////////////////////////////////////////////////////
+ // gets / sets read-only status for a contact
+
+ MIR_APP_DLL(bool) IsReadonly(MCONTACT hContact);
+ MIR_APP_DLL(void) Readonly(MCONTACT hContact, bool bReadOnly = true);
+
+ /////////////////////////////////////////////////////////////////////////////////////////
// checks / adds / removes a contact from list of contacts
// removed contacts would be physically deleted after restart
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex e3fa4aed2e..db0f15fec3 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex e2288c68aa..72e66630fd 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp index 94d6313df8..a486cc988c 100644 --- a/src/mir_app/src/contacts.cpp +++ b/src/mir_app/src/contacts.cpp @@ -306,6 +306,21 @@ MIR_APP_DLL(void) Contact::Hide(MCONTACT hContact, bool bHidden) ///////////////////////////////////////////////////////////////////////////////
+MIR_APP_DLL(bool) Contact::IsReadonly(MCONTACT hContact)
+{
+ return db_get_b(hContact, "CList", "ReadOnly") != 0;
+}
+
+MIR_APP_DLL(void) Contact::Readonly(MCONTACT hContact, bool bReadOnly)
+{
+ if (bReadOnly)
+ db_set_b(hContact, "CList", "ReadOnly", 1);
+ else
+ db_unset(hContact, "CList", "ReadOnly");
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
MIR_APP_DLL(bool) Contact::OnList(MCONTACT hContact)
{
return db_get_b(hContact, "CList", "NotOnList", 0) == 0;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index c670d01805..bd9234ca7e 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -909,3 +909,5 @@ Clist_GroupSaveExpanded @1003 NONAME ?Srmm_GetWindowClass@@YGPAUSrmmLogWindowClass@@PAVCMsgDialog@@@Z @1027 NONAME
?addColor@CMPluginBase@@QAEHPBD0PB_W1K@Z @1028 NONAME
?addFont@CMPluginBase@@QAEHPBD0PB_W111HHPAUtagLOGFONTW@@K@Z @1029 NONAME
+?IsReadonly@Contact@@YG_NI@Z @1030 NONAME
+?Readonly@Contact@@YGXI_N@Z @1031 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index fd393985c3..478cde2493 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -909,3 +909,5 @@ Clist_GroupSaveExpanded @1003 NONAME ?Srmm_GetWindowClass@@YAPEAUSrmmLogWindowClass@@PEAVCMsgDialog@@@Z @1027 NONAME
?addColor@CMPluginBase@@QEAAHPEBD0PEB_W1K@Z @1028 NONAME
?addFont@CMPluginBase@@QEAAHPEBD0PEB_W111HHPEAUtagLOGFONTW@@K@Z @1029 NONAME
+?IsReadonly@Contact@@YA_NI@Z @1030 NONAME
+?Readonly@Contact@@YAXI_N@Z @1031 NONAME
|