diff options
Diffstat (limited to 'protocols/AimOscar/src')
27 files changed, 100 insertions, 132 deletions
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp index 8586de414e..3809b86ae6 100644 --- a/protocols/AimOscar/src/aim.cpp +++ b/protocols/AimOscar/src/aim.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
char AIM_CAP_MIRANDA[16] = "MirandaA";
@@ -75,10 +75,9 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO ////////////////////////////////////////////////////////////////////////////////////////
// OnModulesLoaded - finalizes plugin's configuration on load
-static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
+static int OnModulesLoaded(WPARAM, LPARAM)
{
aim_links_init();
-
return 0;
}
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index f36cd8c11d..2d6de87415 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void __cdecl CAimProto::avatar_request_thread(void* param)
{
@@ -74,7 +74,7 @@ void CAimProto::avatar_request_handler(MCONTACT hContact, char* hash, unsigned c char* saved_hash = getStringA(hContact, AIM_KEY_AH);
if (hash && _stricmp(hash, "0201d20472") && _stricmp(hash, "2b00003341")) //gaim default icon fix- we don't want their blank icon displaying.
{
- if (_strcmps(saved_hash, hash))
+ if (mir_strcmp(saved_hash, hash))
{
setByte(hContact, AIM_KEY_AHT, type);
setString(hContact, AIM_KEY_AH, hash);
@@ -95,7 +95,7 @@ void CAimProto::avatar_request_handler(MCONTACT hContact, char* hash, unsigned c mir_free(saved_hash);
}
-void CAimProto::avatar_retrieval_handler(const char* sn, const char* hash, const char* data, int data_len)
+void CAimProto::avatar_retrieval_handler(const char* sn, const char* /*hash*/, const char* data, int data_len)
{
bool res = false;
PROTO_AVATAR_INFORMATIONT AI = {0};
@@ -115,7 +115,7 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* hash, const res = true;
char *my_sn = getStringA(AIM_KEY_SN);
- if (!_strcmps(sn, my_sn))
+ if (!mir_strcmp(sn, my_sn))
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
mir_free(my_sn);
}
diff --git a/protocols/AimOscar/src/away.cpp b/protocols/AimOscar/src/away.cpp index 45ed0097cd..3b1665e2c9 100644 --- a/protocols/AimOscar/src/away.cpp +++ b/protocols/AimOscar/src/away.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
char** CAimProto::get_status_msg_loc(int status)
{
@@ -41,7 +41,7 @@ char** CAimProto::get_status_msg_loc(int status) int CAimProto::aim_set_away(HANDLE hServerConn, unsigned short &seqno, const char *amsg, bool set)//user info
{
- unsigned short offset=0;
+ unsigned short offset = 0;
char* html_msg = NULL;
size_t msg_size = 0;
if (set)
@@ -59,67 +59,62 @@ int CAimProto::aim_set_away(HANDLE hServerConn, unsigned short &seqno, const cha const char* msg = str.getBuf();
const unsigned short msg_len = str.getSize();
- char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*3+charset_len+msg_len+1);
+ char* buf = (char*)alloca(SNAC_SIZE + TLV_HEADER_SIZE * 3 + charset_len + msg_len + 1);
- aim_writesnac(0x02,0x04,offset,buf);
- aim_writetlv(0x03,charset_len,charset,offset,buf);
- aim_writetlv(0x04,(unsigned short)msg_len,msg,offset,buf);
+ aim_writesnac(0x02, 0x04, offset, buf);
+ aim_writetlv(0x03, charset_len, charset, offset, buf);
+ aim_writetlv(0x04, (unsigned short)msg_len, msg, offset, buf);
-// aim_writetlvchar(0x0f,2,offset,buf);
-
mir_free(html_msg);
- return aim_sendflap(hServerConn,0x02,offset,buf,seqno);
+ return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_status(HANDLE hServerConn,unsigned short &seqno,unsigned long status_type)
+int CAimProto::aim_set_status(HANDLE hServerConn, unsigned short &seqno, unsigned long status_type)
{
- unsigned short offset=0;
- char buf[SNAC_SIZE+TLV_HEADER_SIZE*2];
- aim_writesnac(0x01,0x1E,offset,buf);
- aim_writetlvlong(0x06,status_type,offset,buf);
- return aim_sendflap(hServerConn,0x02,offset,buf,seqno);
+ unsigned short offset = 0;
+ char buf[SNAC_SIZE + TLV_HEADER_SIZE * 2];
+ aim_writesnac(0x01, 0x1E, offset, buf);
+ aim_writetlvlong(0x06, status_type, offset, buf);
+ return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_statusmsg(HANDLE hServerConn,unsigned short &seqno,const char *msg)//user info
+int CAimProto::aim_set_statusmsg(HANDLE hServerConn, unsigned short &seqno, const char *msg)//user info
{
- size_t msg_size =_strlens(msg);
+ size_t msg_size = mir_strlen(msg);
+
+ unsigned short msgoffset = 0;
+ char* msgbuf = (char*)alloca(10 + msg_size);
+ if (msg_size) {
+ char* msgb = (char*)alloca(4 + msg_size);
+ msgb[0] = (unsigned char)(msg_size >> 8);
+ msgb[1] = (unsigned char)(msg_size & 0xff);
+ memcpy(&msgb[2], msg, msg_size);
+ msgb[msg_size + 2] = 0;
+ msgb[msg_size + 3] = 0;
+
+ aim_writebartid(2, 4, (unsigned short)(msg_size + 4), msgb, msgoffset, msgbuf);
+ }
+ else aim_writebartid(2, 0, 0, NULL, msgoffset, msgbuf);
- unsigned short msgoffset=0;
- char* msgbuf=(char*)alloca(10+msg_size);
+ unsigned short offset = 0;
+ char* buf = (char*)alloca(SNAC_SIZE + TLV_HEADER_SIZE + msgoffset + 8);
+ aim_writesnac(0x01, 0x1e, offset, buf);
+ aim_writetlv(0x1d, msgoffset, msgbuf, offset, buf);
- if (msg_size)
- {
- char* msgb=(char*)alloca(4+msg_size);
- msgb[0]=(unsigned char)(msg_size >> 8);
- msgb[1]=(unsigned char)(msg_size & 0xff);
- memcpy(&msgb[2],msg,msg_size);
- msgb[msg_size+2]=0;
- msgb[msg_size+3]=0;
-
- aim_writebartid(2,4,(unsigned short)(msg_size+4),msgb,msgoffset,msgbuf);
- }
- else
- aim_writebartid(2,0,0,NULL,msgoffset,msgbuf);
-
- unsigned short offset=0;
- char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE+msgoffset+8);
- aim_writesnac(0x01,0x1e,offset,buf);
- aim_writetlv(0x1d,msgoffset,msgbuf,offset,buf);
-
- return aim_sendflap(hServerConn,0x02,offset,buf,seqno);
+ return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_query_away_message(HANDLE hServerConn,unsigned short &seqno,const char* sn)
+int CAimProto::aim_query_away_message(HANDLE hServerConn, unsigned short &seqno, const char* sn)
{
- unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
- char* buf=(char*)alloca(SNAC_SIZE+5+sn_length);
- aim_writesnac(0x02,0x15,offset,buf);
- aim_writegeneric(4,"\0\0\0\x02",offset,buf);
- aim_writegeneric(1,(char*)&sn_length,offset,buf);
- aim_writegeneric(sn_length,sn,offset,buf);
- int res=aim_sendflap(hServerConn,0x02,offset,buf,seqno)==0;
+ unsigned short offset = 0;
+ unsigned short sn_length = (unsigned short)strlen(sn);
+ char *buf = (char*)alloca(SNAC_SIZE + 5 + sn_length);
+ aim_writesnac(0x02, 0x15, offset, buf);
+ aim_writegeneric(4, "\0\0\0\x02", offset, buf);
+ aim_writegeneric(1, (char*)&sn_length, offset, buf);
+ aim_writegeneric(sn_length, sn, offset, buf);
+ int res = aim_sendflap(hServerConn, 0x02, offset, buf, seqno) == 0;
return res;
}
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp index d1b4bb900f..384a08fa18 100644 --- a/protocols/AimOscar/src/chat.cpp +++ b/protocols/AimOscar/src/chat.cpp @@ -15,7 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
static const COLORREF crCols[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
@@ -102,7 +102,7 @@ void CAimProto::chat_leave(const char* id) }
-int CAimProto::OnGCEvent(WPARAM wParam,LPARAM lParam)
+int CAimProto::OnGCEvent(WPARAM, LPARAM lParam)
{
GCHOOK *gch = (GCHOOK*) lParam;
if (!gch) return 1;
@@ -188,9 +188,9 @@ int CAimProto::OnGCEvent(WPARAM wParam,LPARAM lParam) return 0;
}
-int CAimProto::OnGCMenuHook(WPARAM wParam,LPARAM lParam)
+int CAimProto::OnGCMenuHook(WPARAM, LPARAM lParam)
{
- GCMENUITEMS *gcmi= (GCMENUITEMS*) lParam;
+ GCMENUITEMS *gcmi= (GCMENUITEMS*)lParam;
if ( gcmi == NULL || _stricmp(gcmi->pszModule, m_szModuleName )) return 0;
diff --git a/protocols/AimOscar/src/client.cpp b/protocols/AimOscar/src/client.cpp index 69577e8cc2..a766db7187 100644 --- a/protocols/AimOscar/src/client.cpp +++ b/protocols/AimOscar/src/client.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
int CAimProto::aim_send_connection_packet(HANDLE hServerConn,unsigned short &seqno,char *buf)
{
@@ -414,8 +414,8 @@ int CAimProto::aim_add_contact(HANDLE hServerConn, unsigned short &seqno, const {
unsigned short offset=0;
unsigned short sn_length=(unsigned short)strlen(sn);
- unsigned short nick_length = (unsigned short)_strlens(nick);
- unsigned short note_length = (unsigned short)_strlens(note);
+ unsigned short nick_length = (unsigned short)mir_strlen(nick);
+ unsigned short note_length = (unsigned short)mir_strlen(note);
unsigned short tlv_len = nick || note ? TLV_HEADER_SIZE * 2 + nick_length + note_length : 0;
char* buf=(char*)alloca(SNAC_SIZE + sn_length + 10 + tlv_len);
@@ -458,8 +458,8 @@ int CAimProto::aim_mod_buddy(HANDLE hServerConn, unsigned short &seqno, const ch {
unsigned short offset=0;
unsigned short sn_length = (unsigned short)strlen(sn);
- unsigned short nick_length = (unsigned short)_strlens(nick);
- unsigned short note_length = (unsigned short)_strlens(note);
+ unsigned short nick_length = (unsigned short)mir_strlen(nick);
+ unsigned short note_length = (unsigned short)mir_strlen(note);
unsigned short tlv_len = TLV_HEADER_SIZE * 2 + nick_length + note_length;
char* buf=(char*)alloca(SNAC_SIZE+sn_length+10+tlv_len);
@@ -625,7 +625,7 @@ int CAimProto::aim_send_file(HANDLE hServerConn, unsigned short &seqno, }
-int CAimProto::aim_file_ad(HANDLE hServerConn,unsigned short &seqno,char* sn, char* icbm_cookie, bool deny, unsigned short max_ver)
+int CAimProto::aim_file_ad(HANDLE hServerConn,unsigned short &seqno,char* sn, char* icbm_cookie, bool deny, unsigned short)
{
unsigned short frag_offset=0;
char msg_frag[10+AIM_CAPS_LENGTH+TLV_HEADER_SIZE*2+6];
@@ -742,7 +742,7 @@ int CAimProto::aim_set_avatar_hash(HANDLE hServerConn, unsigned short &seqno, ch return aim_sendflap(hServerConn,0x02,offset,buf,seqno);
}
-int CAimProto::aim_delete_avatar_hash(HANDLE hServerConn, unsigned short &seqno, char flags, unsigned short bart_type, unsigned short & id)
+int CAimProto::aim_delete_avatar_hash(HANDLE hServerConn, unsigned short &seqno, char /*flags*/, unsigned short bart_type, unsigned short & id)
{
unsigned short offset=0;
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index d9acb8d542..d813cb5646 100644 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
HANDLE CAimProto::aim_connect(const char* server, unsigned short port, bool use_ssl, const char* host)
{
diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp index 96aff9e2e5..faa4bdc01c 100644 --- a/protocols/AimOscar/src/conv.cpp +++ b/protocols/AimOscar/src/conv.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
#pragma warning( disable: 4706 )
@@ -610,8 +610,8 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) BOOL Italic=false;
BOOL Underline=false;
char Face[32]="";
- COLORREF Color;
- COLORREF BackColor;
+ COLORREF Color=0;
+ COLORREF BackColor=0;
int Size=0;
GETTEXTLENGTHEX tl;
tl.flags=GTL_DEFAULT;
@@ -703,7 +703,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) }
}
}
- if ( Size != isSize || Color != isColor || BackColor != isBackColor || mir_strcmp( Face, cfOld.szFaceName ))
+ if (Size != isSize || Color != isColor || BackColor != isBackColor || mir_strcmp(Face, cfOld.szFaceName))
{
Size=isSize;
Color=isColor;
diff --git a/protocols/AimOscar/src/direct_connect.cpp b/protocols/AimOscar/src/direct_connect.cpp index 982d56fe7d..0ed07c535c 100644 --- a/protocols/AimOscar/src/direct_connect.cpp +++ b/protocols/AimOscar/src/direct_connect.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are initiating a direct connection with someone else
{
diff --git a/protocols/AimOscar/src/error.cpp b/protocols/AimOscar/src/error.cpp index cfd5f3e26d..f9ecf33108 100644 --- a/protocols/AimOscar/src/error.cpp +++ b/protocols/AimOscar/src/error.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void CAimProto::login_error(unsigned short error)
{
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index 03871937f8..300561e408 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
#pragma pack(push, 1)
struct oft2//oscar file transfer 2 class- See On_Sending_Files_via_OSCAR.pdf
diff --git a/protocols/AimOscar/src/flap.cpp b/protocols/AimOscar/src/flap.cpp index 9d5186da47..96b164fa9c 100644 --- a/protocols/AimOscar/src/flap.cpp +++ b/protocols/AimOscar/src/flap.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
FLAP::FLAP(char* buf,int num_bytes)
{
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp index 12f69bd9fc..ee4709ac0c 100644 --- a/protocols/AimOscar/src/links.cpp +++ b/protocols/AimOscar/src/links.cpp @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
static HANDLE hServiceParseLink;
diff --git a/protocols/AimOscar/src/packets.cpp b/protocols/AimOscar/src/packets.cpp index f4f44ab8bf..4c5964d293 100644 --- a/protocols/AimOscar/src/packets.cpp +++ b/protocols/AimOscar/src/packets.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
int aim_writesnac(unsigned short service, unsigned short subgroup,unsigned short &offset, char* out, unsigned short id)
{
diff --git a/protocols/AimOscar/src/popup.cpp b/protocols/AimOscar/src/popup.cpp index c561994451..82ded8680c 100644 --- a/protocols/AimOscar/src/popup.cpp +++ b/protocols/AimOscar/src/popup.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
struct CAimPopupData
{
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 0b468f1dba..fcf9c2e86b 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -15,7 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
CAimProto::CAimProto(const char* aProtoName, const TCHAR* aUserName) :
PROTO<CAimProto>(aProtoName, aUserName),
@@ -105,11 +105,11 @@ CAimProto::~CAimProto() ////////////////////////////////////////////////////////////////////////////////////////
// OnModulesLoadedEx - performs hook registration
-int CAimProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
+int CAimProto::OnModulesLoaded(WPARAM, LPARAM)
{
- HookProtoEvent(ME_USERINFO_INITIALISE, &CAimProto::OnUserInfoInit);
- HookProtoEvent(ME_IDLE_CHANGED, &CAimProto::OnIdleChanged);
- HookProtoEvent(ME_MSG_WINDOWEVENT, &CAimProto::OnWindowEvent);
+ HookProtoEvent(ME_IDLE_CHANGED, &CAimProto::OnIdleChanged);
+ HookProtoEvent(ME_MSG_WINDOWEVENT, &CAimProto::OnWindowEvent);
+ HookProtoEvent(ME_USERINFO_INITIALISE, &CAimProto::OnUserInfoInit);
chat_register();
InitContactMenus();
@@ -131,25 +131,9 @@ MCONTACT CAimProto::AddToList(int flags, PROTOSEARCHRESULT* psr) }
////////////////////////////////////////////////////////////////////////////////////////
-// AuthAllow - processes the successful authorization
-
-int CAimProto::Authorize(MEVENT hDbEvent)
-{
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// AuthDeny - handles the unsuccessful authorization
-
-int CAimProto::AuthDeny(MEVENT hDbEvent, const TCHAR* szReason)
-{
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CAimProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
+int __cdecl CAimProto::AuthRequest(MCONTACT hContact, const TCHAR*)
{
//Not a real authrequest- only used b/c we don't know the group until now.
if (state != 1)
@@ -169,7 +153,7 @@ int __cdecl CAimProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage) ////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CAimProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CAimProto::FileAllow(MCONTACT, HANDLE hTransfer, const PROTOCHAR* szPath)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (ft && ft_list.find_by_ft(ft))
@@ -197,7 +181,7 @@ HANDLE __cdecl CAimProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const P ////////////////////////////////////////////////////////////////////////////////////////
// FileCancel - cancels a file transfer
-int __cdecl CAimProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
+int __cdecl CAimProto::FileCancel(MCONTACT, HANDLE hTransfer)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
@@ -220,7 +204,7 @@ int __cdecl CAimProto::FileCancel(MCONTACT hContact, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CAimProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
+int __cdecl CAimProto::FileDeny(MCONTACT, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
@@ -239,8 +223,7 @@ int __cdecl CAimProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
- switch (*action)
- {
+ switch (*action) {
case FILERESUME_RESUME:
{
struct _stati64 statbuf;
@@ -275,10 +258,9 @@ int __cdecl CAimProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CAimProto::GetCaps(int type, MCONTACT hContact)
+DWORD_PTR __cdecl CAimProto::GetCaps(int type, MCONTACT)
{
- switch (type)
- {
+ switch (type) {
case PFLAGNUM_1:
return PF1_IM | PF1_MODEMSG | PF1_BASICSEARCH | PF1_SEARCHBYEMAIL | PF1_FILE;
@@ -645,7 +627,7 @@ HANDLE __cdecl CAimProto::GetAwayMsg(MCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CAimProto::RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* pre)
+int __cdecl CAimProto::RecvAwayMsg(MCONTACT hContact, int, PROTORECVEVENT* pre)
{
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pre->szMessage);
return 0;
@@ -684,7 +666,7 @@ int __cdecl CAimProto::SetAwayMsg(int status, const TCHAR* msg) if (state == 1 && status == m_iStatus)
{
- if (!_strcmps(last_status_msg, nmsg))
+ if (!mir_strcmp(last_status_msg, nmsg))
return 0;
mir_free(last_status_msg);
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h index e92f9f34e1..b5e77ed9bc 100644 --- a/protocols/AimOscar/src/proto.h +++ b/protocols/AimOscar/src/proto.h @@ -30,8 +30,6 @@ struct CAimProto : public PROTO<CAimProto> virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual int __cdecl Authorize( MEVENT hDbEvent );
- virtual int __cdecl AuthDeny( MEVENT hDbEvent, const TCHAR* szReason );
virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
diff --git a/protocols/AimOscar/src/proxy.cpp b/protocols/AimOscar/src/proxy.cpp index d24f34f8f2..7cfaa76e19 100644 --- a/protocols/AimOscar/src/proxy.cpp +++ b/protocols/AimOscar/src/proxy.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void __cdecl CAimProto::aim_proxy_helper(void* param)
{
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index 743966c18a..9256800a9d 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void CAimProto::snac_md5_authkey(SNAC &snac,HANDLE hServerConn,unsigned short &seqno, const char* username, const char* password)//family 0x0017
{
@@ -758,7 +758,7 @@ void CAimProto::process_ssi_list(SNAC &snac, int &offset) break;
case 0x0014: //avatar record
- if (!_strcmps(name, "1") || !_strcmps(name, "12")) {
+ if (!mir_strcmp(name, "1") || !mir_strcmp(name, "12")) {
if (name_length == 1)
avatar_id_sm = item_id;
else
@@ -768,7 +768,6 @@ void CAimProto::process_ssi_list(SNAC &snac, int &offset) TLV tlv(snac.val(tlv_base + tlv_offset));
if (tlv.cmp(0x00d5) && tlv.len() > 2) {
- unsigned char type = tlv.ubyte(0);
if (name_length == 1) {
mir_free(hash_sm);
hash_sm = bytes_to_string(tlv.val() + 2, tlv.ubyte(1));
@@ -899,7 +898,7 @@ void CAimProto::modify_ssi_list(SNAC &snac, int &offset) break;
case 0x0014: //avatar record
- if (!_strcmps(name, "1") || !_strcmps(name, "12"))
+ if (!mir_strcmp(name, "1") || !mir_strcmp(name, "12"))
{
if (name_length == 1)
avatar_id_sm = item_id;
@@ -969,13 +968,13 @@ void CAimProto::delete_ssi_list(SNAC &snac, int &offset) break;
case 0x0014: //avatar record
- if (_strcmps(name, "1"))
+ if (mir_strcmp(name, "1"))
{
avatar_id_sm = 0;
mir_free(hash_sm);
hash_sm = NULL;
}
- else if (!_strcmps(name, "12"))
+ else if (!mir_strcmp(name, "12"))
{
avatar_id_lg = 0;
mir_free(hash_lg);
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index e21396f34c..8e7c2c75db 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
INT_PTR CAimProto::GetMyAwayMsg(WPARAM wParam,LPARAM lParam)
{
diff --git a/protocols/AimOscar/src/snac.cpp b/protocols/AimOscar/src/snac.cpp index 8c893b58e0..0dd1c12d3f 100644 --- a/protocols/AimOscar/src/snac.cpp +++ b/protocols/AimOscar/src/snac.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
SNAC::SNAC(char* buf,unsigned short length)
{
diff --git a/protocols/AimOscar/src/stdafx.cpp b/protocols/AimOscar/src/stdafx.cxx index a53e8c03ae..6fb37564b7 100644 --- a/protocols/AimOscar/src/stdafx.cpp +++ b/protocols/AimOscar/src/stdafx.cxx @@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
\ No newline at end of file +#include "stdafx.h"
\ No newline at end of file diff --git a/protocols/AimOscar/src/aim.h b/protocols/AimOscar/src/stdafx.h index ddf2d6d60c..371dffa66f 100644 --- a/protocols/AimOscar/src/aim.h +++ b/protocols/AimOscar/src/stdafx.h @@ -317,9 +317,4 @@ extern char AIM_CAP_MIRANDA[]; //Miranda cap EXTERN extern HINSTANCE hInstance; //plugin dll instance
-#define _strlens(a) (a ? strlen(a) : 0)
-#define _strcmps(a,b) (a != b && (!a || !b || strcmp(a, b)))
-
-//#define ALLOW_BUSY
-
#endif
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 0e4b6b69b5..36acbcef17 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
/////////////////////////////////////////////////////////////////////////////////////////
// Icons init
diff --git a/protocols/AimOscar/src/thread.cpp b/protocols/AimOscar/src/thread.cpp index 04b0991333..8c03fab0a0 100644 --- a/protocols/AimOscar/src/thread.cpp +++ b/protocols/AimOscar/src/thread.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void __cdecl CAimProto::accept_file_thread(void* param)//buddy sending file
{
diff --git a/protocols/AimOscar/src/tlv.cpp b/protocols/AimOscar/src/tlv.cpp index f35fbac50e..717ef5d4b5 100644 --- a/protocols/AimOscar/src/tlv.cpp +++ b/protocols/AimOscar/src/tlv.cpp @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
TLV::TLV(char* buf)
{
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index 02294d8587..c846ab9574 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
HANDLE hThemeButton = NULL;
COLORREF foreground=0;
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index dfd9677ca3..7480917b4c 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "aim.h"
+#include "stdafx.h"
void CAimProto::broadcast_status(int status)
{
|