diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/contacts.cpp | 13 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp index b53fb0bcd5..2f52b6ca91 100644 --- a/src/mir_app/src/contacts.cpp +++ b/src/mir_app/src/contacts.cpp @@ -285,6 +285,19 @@ MIR_APP_DLL(wchar_t*) Contact_GetInfo(int type, MCONTACT hContact, const char *s return nullptr;
}
+MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact)
+{
+ if (hContact == 0)
+ return ID_STATUS_OFFLINE;
+
+ const char *szProto = GetContactProto(hContact);
+ if (szProto == nullptr)
+ return ID_STATUS_OFFLINE;
+
+ return db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+}
+
+
/////////////////////////////////////////////////////////////////////////////////////////
// Options dialog
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index ec0240613f..f8b2c787d4 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -583,3 +583,4 @@ Proto_GetStatus @601 ?IsReadyToExit@PROTO_INTERFACE@@UAE_NXZ @606 NONAME
?OnModulesLoaded@PROTO_INTERFACE@@UAEXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UAEXXZ @608 NONAME
+Contact_GetStatus @609
|