diff options
Diffstat (limited to 'plugins/WinterSpeak/src')
-rw-r--r-- | plugins/WinterSpeak/src/ConfigDatabase.cpp | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/ConfigDatabase.h | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigActive.cpp | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigActive.h | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakAnnounce.cpp | 10 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakAnnounce.h | 10 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakConfig.cpp | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakConfig.h | 6 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/UserInformation.cpp | 10 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/UserInformation.h | 12 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/main.cpp | 8 |
11 files changed, 41 insertions, 41 deletions
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.cpp b/plugins/WinterSpeak/src/ConfigDatabase.cpp index 0184e7e5d0..863dd62a71 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.cpp +++ b/plugins/WinterSpeak/src/ConfigDatabase.cpp @@ -47,7 +47,7 @@ void ConfigDatabase::setActiveFlag(ActiveFlag flag, bool state) }
//------------------------------------------------------------------------------
-ConfigDatabase::act ConfigDatabase::getActiveUser(HCONTACT user) const
+ConfigDatabase::act ConfigDatabase::getActiveUser(MCONTACT user) const
{
ActiveUsersMap::const_iterator iter = m_active_users.find(user);
@@ -69,7 +69,7 @@ ConfigDatabase::act ConfigDatabase::getActiveUser(HCONTACT user) const }
//------------------------------------------------------------------------------
-void ConfigDatabase::setActiveUser(HCONTACT user, act state)
+void ConfigDatabase::setActiveUser(MCONTACT user, act state)
{
m_active_users[user].status = state.status;
m_active_users[user].message = state.message;
@@ -89,7 +89,7 @@ void ConfigDatabase::load() m_welcome_msg = DBGetContactSettingString(SPEAK, WELCOME_MSG, L"Welcome to Miranda");
// iterate through all the users and add them to the list if active
- HCONTACT contact = db_find_first();
+ MCONTACT contact = db_find_first();
while (NULL != contact) {
m_active_users[contact].status = (db_get_b(contact, SPEAK, ACTIVE_STATE, true) != 0);
m_active_users[contact].message = (db_get_b(contact, SPEAK, ACTIVE_MSG, true) != 0);
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.h b/plugins/WinterSpeak/src/ConfigDatabase.h index da8b46dc8f..4e7f546aa1 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.h +++ b/plugins/WinterSpeak/src/ConfigDatabase.h @@ -26,7 +26,7 @@ public: bool message;
};
- typedef std::map<HCONTACT, act> ActiveUsersMap;
+ typedef std::map<MCONTACT, act> ActiveUsersMap;
//--------------------------------------------------------------------------
// Description : get/set the voice description
@@ -49,8 +49,8 @@ public: //--------------------------------------------------------------------------
// Description : get/set the user active flag
//--------------------------------------------------------------------------
- act getActiveUser(HCONTACT user) const;
- void setActiveUser(HCONTACT user, act state);
+ act getActiveUser(MCONTACT user) const;
+ void setActiveUser(MCONTACT user, act state);
ActiveUsersMap getActiveUsers() const { return m_active_users; }
//--------------------------------------------------------------------------
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index 8c59b83fca..00487967f5 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -255,7 +255,7 @@ void DialogConfigActive::SetAllContactIcons(HWND hwndList, HWND window) { ConfigDatabase::ActiveUsersMap::const_iterator iter;
for (iter = active_users.begin(); iter != active_users.end(); ++iter)
{
- HCONTACT hContact = iter->first;
+ MCONTACT hContact = iter->first;
if(hContact == 0) {
} else {
@@ -331,7 +331,7 @@ void DialogConfigActive::save(HWND window) m_db.setActiveFlag(ConfigDatabase::ActiveFlag_FreeForChat, (IsDlgButtonChecked(window, IDC_ACTIVE_FREEFORCHAT) != 0));
m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Invisible, (IsDlgButtonChecked(window, IDC_ACTIVE_INVISIBLE) != 0));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(window, IDC_ACTIVE_USERS), hContact, hItem);
@@ -342,7 +342,7 @@ void DialogConfigActive::save(HWND window) m_db.save();
}
-void DialogConfigActive::SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem) {
+void DialogConfigActive::SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem) {
ConfigDatabase::act mask;
mask.message = true;
mask.status = true;
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.h b/plugins/WinterSpeak/src/DialogConfigActive.h index f1b428972b..d0ece06792 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.h +++ b/plugins/WinterSpeak/src/DialogConfigActive.h @@ -38,7 +38,7 @@ class DialogConfigActive : public MirandaDialog void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int iColumn, int iImage);
void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int iImage);
void SetListGroupIcons(HWND hwndList, HANDLE hFirstItem, HANDLE hParentItem, int *groupChildCount);
- void SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem);
+ void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem);
static DialogConfigActive *m_instance;
ConfigDatabase &m_db;
diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.cpp b/plugins/WinterSpeak/src/SpeakAnnounce.cpp index 1d95b743f6..766e2e90eb 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.cpp +++ b/plugins/WinterSpeak/src/SpeakAnnounce.cpp @@ -12,7 +12,7 @@ SpeakAnnounce::~SpeakAnnounce() }
//------------------------------------------------------------------------------
-void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, HCONTACT user)
+void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, MCONTACT user)
{
const std::string STATUS = "Status";
@@ -66,7 +66,7 @@ void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, HCONTACT }
//------------------------------------------------------------------------------
-void SpeakAnnounce::incomingEvent(HCONTACT user, HANDLE event)
+void SpeakAnnounce::incomingEvent(MCONTACT user, HANDLE event)
{
if (!m_event_info.isValidEvent(event))
return;
@@ -131,18 +131,18 @@ void SpeakAnnounce::protocolAck(ACKDATA *ack) }
//------------------------------------------------------------------------------
-void SpeakAnnounce::message(const std::wstring &sentence, HCONTACT user)
+void SpeakAnnounce::message(const std::wstring &sentence, MCONTACT user)
{
CallService(MS_SPEAK_MESSAGE, LPARAM(user), reinterpret_cast<WPARAM>(sentence.c_str()));
}
-void SpeakAnnounce::status(const std::wstring &sentence, HCONTACT user)
+void SpeakAnnounce::status(const std::wstring &sentence, MCONTACT user)
{
CallService(MS_SPEAK_STATUS, LPARAM(user), reinterpret_cast<WPARAM>(sentence.c_str()));
}
//------------------------------------------------------------------------------
-bool SpeakAnnounce::readMessage(HCONTACT contact)
+bool SpeakAnnounce::readMessage(MCONTACT contact)
{
std::wstring title = m_user_info.nameString(contact) + L" (" + m_user_info.statusModeString(contact) + L"): ";
diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.h b/plugins/WinterSpeak/src/SpeakAnnounce.h index cb1a53f8bf..c49223b86a 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.h +++ b/plugins/WinterSpeak/src/SpeakAnnounce.h @@ -12,12 +12,12 @@ public: //--------------------------------------------------------------------------
// Description : handle a status change
//--------------------------------------------------------------------------
- void statusChange(DBCONTACTWRITESETTING *write_setting, HCONTACT user);
+ void statusChange(DBCONTACTWRITESETTING *write_setting, MCONTACT user);
//--------------------------------------------------------------------------
// Description : handle an event
//--------------------------------------------------------------------------
- void incomingEvent(HCONTACT user, HANDLE event);
+ void incomingEvent(MCONTACT user, HANDLE event);
//--------------------------------------------------------------------------
// Description : handle a protocol state change
@@ -31,8 +31,8 @@ public: // Returns : true - speak successful
// false - speak failed
//--------------------------------------------------------------------------
- void message(const std::wstring &sentence, HCONTACT user);
- void status(const std::wstring &sentence, HCONTACT user);
+ void message(const std::wstring &sentence, MCONTACT user);
+ void status(const std::wstring &sentence, MCONTACT user);
private:
//--------------------------------------------------------------------------
@@ -41,7 +41,7 @@ private: // Returns : true = message window is open
// false = message window not open
//--------------------------------------------------------------------------
- bool readMessage(HCONTACT contact);
+ bool readMessage(MCONTACT contact);
HINSTANCE m_instance;
diff --git a/plugins/WinterSpeak/src/SpeakConfig.cpp b/plugins/WinterSpeak/src/SpeakConfig.cpp index 605b120f92..20b86b05f2 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.cpp +++ b/plugins/WinterSpeak/src/SpeakConfig.cpp @@ -33,13 +33,13 @@ void SpeakConfig::update(Subject &subject) }
//------------------------------------------------------------------------------
-bool SpeakConfig::status(const std::wstring &sentence, HCONTACT user) {
+bool SpeakConfig::status(const std::wstring &sentence, MCONTACT user) {
return say(sentence, user, false);
}
-bool SpeakConfig::message(const std::wstring &sentence, HCONTACT user) {
+bool SpeakConfig::message(const std::wstring &sentence, MCONTACT user) {
return say(sentence, user, true);
}
-bool SpeakConfig::say(const std::wstring &sentence, HCONTACT user, bool message)
+bool SpeakConfig::say(const std::wstring &sentence, MCONTACT user, bool message)
{
if (!m_tts.get()){
return false;
diff --git a/plugins/WinterSpeak/src/SpeakConfig.h b/plugins/WinterSpeak/src/SpeakConfig.h index 6894eecfb3..be86fa4409 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.h +++ b/plugins/WinterSpeak/src/SpeakConfig.h @@ -27,9 +27,9 @@ public: // Returns : true - speak successful
// false - speak failed
//--------------------------------------------------------------------------
- bool status(const std::wstring &sentence, HCONTACT user = NULL);
- bool message(const std::wstring &sentence, HCONTACT user = NULL);
- bool say(const std::wstring &sentence, HCONTACT user, bool message);
+ bool status(const std::wstring &sentence, MCONTACT user = NULL);
+ bool message(const std::wstring &sentence, MCONTACT user = NULL);
+ bool say(const std::wstring &sentence, MCONTACT user, bool message);
private:
HINSTANCE m_instance;
diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp index ba081d2b95..9b24734afe 100644 --- a/plugins/WinterSpeak/src/UserInformation.cpp +++ b/plugins/WinterSpeak/src/UserInformation.cpp @@ -20,7 +20,7 @@ UserInformation::~UserInformation() }
//------------------------------------------------------------------------------
-bool UserInformation::updateStatus(HCONTACT user, int status)
+bool UserInformation::updateStatus(MCONTACT user, int status)
{
bool ret = false;
@@ -38,13 +38,13 @@ bool UserInformation::updateStatus(HCONTACT user, int status) }
//------------------------------------------------------------------------------
-std::wstring UserInformation::statusString(HCONTACT user)
+std::wstring UserInformation::statusString(MCONTACT user)
{
return m_status_strings[m_status_info[user]];
}
//------------------------------------------------------------------------------
-std::wstring UserInformation::statusModeString(HCONTACT user)
+std::wstring UserInformation::statusModeString(MCONTACT user)
{
int status = CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, m_status_info[user], 0);
@@ -57,14 +57,14 @@ std::wstring UserInformation::statusModeString(HCONTACT user) }
//------------------------------------------------------------------------------
-void UserInformation::insertName(std::wstring &str, HCONTACT user) const
+void UserInformation::insertName(std::wstring &str, MCONTACT user) const
{
// insert the user's name into the string
str.replace(str.find(L"%u"), 2, nameString(user));
}
//------------------------------------------------------------------------------
-std::wstring UserInformation::nameString(HCONTACT user) const
+std::wstring UserInformation::nameString(MCONTACT user) const
{
//WCHAR *ret = reinterpret_cast<WCHAR *>(CallService(MS_CLIST_GETCONTACTDISPLAYNAME, reinterpret_cast<unsigned int>(user), 0));
char* ret = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(user), 0);
diff --git a/plugins/WinterSpeak/src/UserInformation.h b/plugins/WinterSpeak/src/UserInformation.h index 7ab11ecddc..c184e2ae59 100644 --- a/plugins/WinterSpeak/src/UserInformation.h +++ b/plugins/WinterSpeak/src/UserInformation.h @@ -16,38 +16,38 @@ public: // Returns : true - the status changed
// false - the status stayed the same
//--------------------------------------------------------------------------
- bool updateStatus(HCONTACT user, int status);
+ bool updateStatus(MCONTACT user, int status);
//--------------------------------------------------------------------------
// Description : get a string containing the users current status string
// Parameters : user - the current user
// Returns : the string containing the users status
//--------------------------------------------------------------------------
- std::wstring statusString(HCONTACT user);
+ std::wstring statusString(MCONTACT user);
//--------------------------------------------------------------------------
// Description : return the status mode of the user
// Parameters : user - the current user
// Returns : the string containing the users status mode
//--------------------------------------------------------------------------
- std::wstring statusModeString(HCONTACT user);
+ std::wstring statusModeString(MCONTACT user);
//--------------------------------------------------------------------------
// Description : insert the name into the string at the %u location
// Parameters : str - the string to have the username inserted into
// user - the current user
//--------------------------------------------------------------------------
- void insertName(std::wstring &str, HCONTACT user) const;
+ void insertName(std::wstring &str, MCONTACT user) const;
//--------------------------------------------------------------------------
// Description : get the name string for the user
// Parameters : user - the current user
// Returns : a string containing the user's name
//--------------------------------------------------------------------------
- std::wstring nameString(HCONTACT user) const;
+ std::wstring nameString(MCONTACT user) const;
private:
- std::map<HCONTACT, int> m_status_info;
+ std::map<MCONTACT, int> m_status_info;
std::map<int, std::wstring> m_status_strings;
};
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp index f218b87f43..d6c7d9bbcc 100644 --- a/plugins/WinterSpeak/src/main.cpp +++ b/plugins/WinterSpeak/src/main.cpp @@ -31,12 +31,12 @@ PLUGININFOEX pluginInfo={ //-----------------------------------------------------------------------------
INT_PTR status(WPARAM wParam, LPARAM lParam)
{
- return g_speak_config->status(reinterpret_cast<WCHAR *>(lParam), HCONTACT(wParam));
+ return g_speak_config->status(reinterpret_cast<WCHAR *>(lParam), MCONTACT(wParam));
}
INT_PTR message(WPARAM wParam, LPARAM lParam)
{
- return g_speak_config->message(reinterpret_cast<WCHAR *>(lParam), HCONTACT(wParam));
+ return g_speak_config->message(reinterpret_cast<WCHAR *>(lParam), MCONTACT(wParam));
}
//-----------------------------------------------------------------------------
@@ -44,7 +44,7 @@ INT_PTR message(WPARAM wParam, LPARAM lParam) //-----------------------------------------------------------------------------
int eventStatusChange(WPARAM wParam, LPARAM lParam)
{
- g_speak_announce->statusChange(reinterpret_cast<DBCONTACTWRITESETTING *>(lParam), HCONTACT(wParam));
+ g_speak_announce->statusChange(reinterpret_cast<DBCONTACTWRITESETTING *>(lParam), MCONTACT(wParam));
return 0;
}
@@ -53,7 +53,7 @@ int eventStatusChange(WPARAM wParam, LPARAM lParam) //-----------------------------------------------------------------------------
int eventMessageAdded(WPARAM wParam, LPARAM lParam)
{
- g_speak_announce->incomingEvent(HCONTACT(wParam), reinterpret_cast<HANDLE>(lParam));
+ g_speak_announce->incomingEvent(MCONTACT(wParam), reinterpret_cast<HANDLE>(lParam));
return 0;
}
|