diff options
-rw-r--r-- | include/m_database.h | 2 | ||||
-rw-r--r-- | include/m_protocols.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/m_database.h b/include/m_database.h index 90ebd63b93..c9eeb2247e 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -720,10 +720,12 @@ namespace DB __forceinline int64_t getSize() const { return m_iFileSize; }
__forceinline int64_t getTransferred() const { return m_iTransferred; }
+ __forceinline void complete(int64_t iSize) { m_iFileSize = m_iTransferred = iSize; }
bool isCompleted() const;
__forceinline bool isOffline() const { return m_szProtoString != nullptr; }
__forceinline void setUrl(const char *pszUrl) { m_szProtoString = mir_strdup(pszUrl); }
+ __forceinline void setName(const wchar_t *pszFileName) { m_wszFileName = mir_wstrdup(pszFileName); }
__forceinline void setSize(int64_t iSize) { m_iFileSize = iSize; }
__forceinline void setLocalName(const wchar_t *pszFileName) { m_wszLocalName = mir_wstrdup(pszFileName); }
};
diff --git a/include/m_protocols.h b/include/m_protocols.h index 927443bb69..31720e1f56 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -298,12 +298,18 @@ EXTERN_C MIR_APP_DLL(int) Proto_GetAverageStatus(int *pAccountNumber = nullptr); EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetAccount(const char *pszModuleName);
/////////////////////////////////////////////////////////////////////////////////////////
-// retrieves an account's interface associated with a contact's id
+// retrieves an account associated with a contact's id
// returns PROTOACCOUNT* or NULL on error
EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetContactAccount(MCONTACT hContact);
/////////////////////////////////////////////////////////////////////////////////////////
+// retrieves an account's interface associated with a contact's id
+// returns PROTOACCOUNT* or NULL on error
+
+MIR_APP_DLL(PROTO_INTERFACE*) Proto_GetContactInstance(MCONTACT hContact);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// returns last status reported by a protocol
EXTERN_C MIR_APP_DLL(int) Proto_GetStatus(const char *pszModuleName);
|