summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-14 01:22:55 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-14 01:22:55 +0300
commitd3cb19278d60ac6f7963379254546cdca36a90e2 (patch)
treef2fa018b343d5460419c1b323f5f3ce04a393d00 /protocols/AimOscar/src
parentd5a6c0666a8d8d2055a3f4402f67f91e8548ec3a (diff)
separate handle types for HNETLIBCONN & HNETLIBBIND
Diffstat (limited to 'protocols/AimOscar/src')
-rw-r--r--protocols/AimOscar/src/away.cpp8
-rw-r--r--protocols/AimOscar/src/chat.h26
-rwxr-xr-xprotocols/AimOscar/src/client.cpp110
-rwxr-xr-xprotocols/AimOscar/src/connection.cpp8
-rw-r--r--protocols/AimOscar/src/direct_connect.cpp4
-rw-r--r--protocols/AimOscar/src/direct_connect.h2
-rw-r--r--protocols/AimOscar/src/file.cpp1
-rw-r--r--protocols/AimOscar/src/file.h4
-rw-r--r--protocols/AimOscar/src/packets.cpp2
-rwxr-xr-xprotocols/AimOscar/src/proto.h181
-rw-r--r--protocols/AimOscar/src/proxy.cpp4
-rw-r--r--protocols/AimOscar/src/proxy.h4
-rw-r--r--protocols/AimOscar/src/server.cpp26
-rw-r--r--protocols/AimOscar/src/thread.cpp2
-rwxr-xr-xprotocols/AimOscar/src/utility.cpp6
15 files changed, 194 insertions, 194 deletions
diff --git a/protocols/AimOscar/src/away.cpp b/protocols/AimOscar/src/away.cpp
index 057e55a1b3..12c15f7a2e 100644
--- a/protocols/AimOscar/src/away.cpp
+++ b/protocols/AimOscar/src/away.cpp
@@ -41,7 +41,7 @@ char** CAimProto::get_status_msg_loc(int status)
return NULL;
}
-int CAimProto::aim_set_away(HANDLE hServerConn, unsigned short &seqno, const char *amsg, bool set)//user info
+int CAimProto::aim_set_away(HNETLIBCONN hServerConn, unsigned short &seqno, const char *amsg, bool set)//user info
{
unsigned short offset = 0;
char *html_msg = NULL;
@@ -71,7 +71,7 @@ int CAimProto::aim_set_away(HANDLE hServerConn, unsigned short &seqno, const cha
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(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned long status_type)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 2];
@@ -80,7 +80,7 @@ int CAimProto::aim_set_status(HANDLE hServerConn, unsigned short &seqno, unsigne
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(HNETLIBCONN hServerConn, unsigned short &seqno, const char *msg)//user info
{
size_t msg_size = mir_strlen(msg);
@@ -106,7 +106,7 @@ int CAimProto::aim_set_statusmsg(HANDLE hServerConn, unsigned short &seqno, cons
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(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn)
{
unsigned short offset = 0;
unsigned short sn_length = (unsigned short)mir_strlen(sn);
diff --git a/protocols/AimOscar/src/chat.h b/protocols/AimOscar/src/chat.h
index 5b819544aa..c10d0265da 100644
--- a/protocols/AimOscar/src/chat.h
+++ b/protocols/AimOscar/src/chat.h
@@ -32,22 +32,26 @@ struct chatnav_param
struct chat_list_item
{
- char* id;
- char* cookie;
- HANDLE hconn;
- unsigned short cid;
+ char* id;
+ char* cookie;
+ HNETLIBCONN hconn;
+ unsigned short cid;
unsigned short seqno;
- unsigned short exchange;
- unsigned short instance;
+ unsigned short exchange;
+ unsigned short instance;
char* CHAT_COOKIE;
int CHAT_COOKIE_LENGTH;
- chat_list_item(char* tid, char* tcookie, unsigned short ex, unsigned short in)
- { id = mir_strdup(tid); cid = get_random(); seqno = 0; hconn = NULL;
- cookie = mir_strdup(tcookie); exchange = ex; instance = in; }
+ chat_list_item(char* tid, char* tcookie, unsigned short ex, unsigned short in)
+ {
+ id = mir_strdup(tid); cid = get_random(); seqno = 0; hconn = NULL;
+ cookie = mir_strdup(tcookie); exchange = ex; instance = in;
+ }
- ~chat_list_item()
- { mir_free(id); mir_free(cookie); }
+ ~chat_list_item()
+ {
+ mir_free(id); mir_free(cookie);
+ }
};
#endif \ No newline at end of file
diff --git a/protocols/AimOscar/src/client.cpp b/protocols/AimOscar/src/client.cpp
index 839698bb96..2804ed52f7 100755
--- a/protocols/AimOscar/src/client.cpp
+++ b/protocols/AimOscar/src/client.cpp
@@ -19,12 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-int CAimProto::aim_send_connection_packet(HANDLE hServerConn, unsigned short &seqno, char *buf)
+int CAimProto::aim_send_connection_packet(HNETLIBCONN hServerConn, unsigned short &seqno, char *buf)
{
return aim_sendflap(hServerConn, 0x01, 4, buf, seqno);
}
-int CAimProto::aim_authkey_request(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_authkey_request(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char *buf = (char*)alloca(SNAC_SIZE + TLV_HEADER_SIZE * 3 + mir_strlen(m_username));
@@ -35,7 +35,7 @@ int CAimProto::aim_authkey_request(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_auth_request(HANDLE hServerConn, unsigned short &seqno, const char* key, const char* language,
+int CAimProto::aim_auth_request(HNETLIBCONN hServerConn, unsigned short &seqno, const char* key, const char* language,
const char* country, const char* username, const char* password)
{
unsigned short offset = 0;
@@ -79,7 +79,7 @@ int CAimProto::aim_auth_request(HANDLE hServerConn, unsigned short &seqno, const
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_send_cookie(HANDLE hServerConn, unsigned short &seqno, int cookie_size, char * cookie)
+int CAimProto::aim_send_cookie(HNETLIBCONN hServerConn, unsigned short &seqno, int cookie_size, char * cookie)
{
unsigned short offset = 0;
char* buf = (char*)alloca(TLV_HEADER_SIZE * 2 + cookie_size);
@@ -88,7 +88,7 @@ int CAimProto::aim_send_cookie(HANDLE hServerConn, unsigned short &seqno, int co
return aim_sendflap(hServerConn, 0x01, offset, buf, seqno);
}
-int CAimProto::aim_send_service_request(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_send_service_request(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 12];
@@ -108,7 +108,7 @@ int CAimProto::aim_send_service_request(HANDLE hServerConn, unsigned short &seqn
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_new_service_request(HANDLE hServerConn, unsigned short &seqno, unsigned short service)
+int CAimProto::aim_new_service_request(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned short service)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + 2 + TLV_HEADER_SIZE];
@@ -119,7 +119,7 @@ int CAimProto::aim_new_service_request(HANDLE hServerConn, unsigned short &seqno
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_request_rates(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_request_rates(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -127,7 +127,7 @@ int CAimProto::aim_request_rates(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_accept_rates(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_accept_rates(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE * 2];
@@ -136,7 +136,7 @@ int CAimProto::aim_accept_rates(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_request_icbm(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_request_icbm(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -144,7 +144,7 @@ int CAimProto::aim_request_icbm(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_icbm(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_set_icbm(HNETLIBCONN hServerConn, unsigned short &seqno)
{
const unsigned icbm_flags = ICBM_CHANNEL_MSGS_ALLOWED | ICBM_MISSED_CALLS_ENABLED |
ICBM_EVENTS_ALLOWED | ICBM_SMS_SUPPORTED | ICBM_OFFLINE_MSGS_ALLOWED;
@@ -162,7 +162,7 @@ int CAimProto::aim_set_icbm(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_request_offline_msgs(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_request_offline_msgs(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -170,7 +170,7 @@ int CAimProto::aim_request_offline_msgs(HANDLE hServerConn, unsigned short &seqn
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_request_list(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_request_list(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -178,7 +178,7 @@ int CAimProto::aim_request_list(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_activate_list(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_activate_list(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -191,7 +191,7 @@ int CAimProto::aim_activate_list(HANDLE hServerConn, unsigned short &seqno)
0010 01 00 00 08 00 01 01 00 0a 00 14 00 02 00 08 66 ...............f
0020 61 63 65 62 6f 6f 6b 00 06 67 6f 6f 67 6c 65 acebook..google
-int CAimProto::aim_request_rights(HANDLE hServerConn,unsigned short &seqno)
+int CAimProto::aim_request_rights(HNETLIBCONN hServerConn,unsigned short &seqno)
{
unsigned short offset=0;
char buf[SNAC_SIZE+50];
@@ -204,7 +204,7 @@ int CAimProto::aim_request_rights(HANDLE hServerConn,unsigned short &seqno)
return aim_sendflap(hServerConn,0x02,offset,buf,seqno);
}
*/
-int CAimProto::aim_set_caps(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_set_caps(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
int i = 1;
@@ -232,7 +232,7 @@ int CAimProto::aim_set_caps(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_profile(HANDLE hServerConn, unsigned short &seqno, char* amsg)//user info
+int CAimProto::aim_set_profile(HNETLIBCONN hServerConn, unsigned short &seqno, char* amsg)//user info
{
aimString str(amsg);
const char *charset = str.isUnicode() ? AIM_MSG_TYPE_UNICODE : AIM_MSG_TYPE;
@@ -251,7 +251,7 @@ int CAimProto::aim_set_profile(HANDLE hServerConn, unsigned short &seqno, char*
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_client_ready(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_client_ready(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
@@ -288,7 +288,7 @@ int CAimProto::aim_client_ready(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_mail_ready(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_mail_ready(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 4];
@@ -300,7 +300,7 @@ int CAimProto::aim_mail_ready(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_avatar_ready(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_avatar_ready(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 4];
@@ -312,7 +312,7 @@ int CAimProto::aim_avatar_ready(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chatnav_ready(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_chatnav_ready(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 4];
@@ -324,7 +324,7 @@ int CAimProto::aim_chatnav_ready(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chat_ready(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_chat_ready(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 4];
@@ -336,7 +336,7 @@ int CAimProto::aim_chat_ready(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_send_message(HANDLE hServerConn, unsigned short &seqno, const char* sn, char* amsg, bool auto_response, bool blast)
+int CAimProto::aim_send_message(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, char* amsg, bool auto_response, bool blast)
{
aimString str(amsg);
@@ -380,7 +380,7 @@ int CAimProto::aim_send_message(HANDLE hServerConn, unsigned short &seqno, const
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno) ? 0 : *(int*)icbm_cookie & 0x7fffffff;
}
-int CAimProto::aim_query_profile(HANDLE hServerConn, unsigned short &seqno, char* sn)
+int CAimProto::aim_query_profile(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn)
{
unsigned short offset = 0;
unsigned short sn_length = (unsigned short)mir_strlen(sn);
@@ -392,7 +392,7 @@ int CAimProto::aim_query_profile(HANDLE hServerConn, unsigned short &seqno, char
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno) == 0;
}
-int CAimProto::aim_delete_contact(HANDLE hServerConn, unsigned short &seqno, char* sn, unsigned short item_id,
+int CAimProto::aim_delete_contact(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, unsigned short item_id,
unsigned short group_id, unsigned short list, bool nil)
{
unsigned short offset = 0;
@@ -409,7 +409,7 @@ int CAimProto::aim_delete_contact(HANDLE hServerConn, unsigned short &seqno, cha
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_add_contact(HANDLE hServerConn, unsigned short &seqno, const char* sn, unsigned short item_id,
+int CAimProto::aim_add_contact(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, unsigned short item_id,
unsigned short group_id, unsigned short list, char* nick, char* note)
{
unsigned short offset = 0;
@@ -434,7 +434,7 @@ int CAimProto::aim_add_contact(HANDLE hServerConn, unsigned short &seqno, const
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_mod_group(HANDLE hServerConn, unsigned short &seqno, const char* name, unsigned short group_id,
+int CAimProto::aim_mod_group(HNETLIBCONN hServerConn, unsigned short &seqno, const char* name, unsigned short group_id,
char* members, unsigned short members_length)
{
unsigned short offset = 0;
@@ -451,7 +451,7 @@ int CAimProto::aim_mod_group(HANDLE hServerConn, unsigned short &seqno, const ch
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_mod_buddy(HANDLE hServerConn, unsigned short &seqno, const char* sn,
+int CAimProto::aim_mod_buddy(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn,
unsigned short buddy_id, unsigned short group_id,
char* nick, char* note)
{
@@ -475,7 +475,7 @@ int CAimProto::aim_mod_buddy(HANDLE hServerConn, unsigned short &seqno, const ch
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_pd_info(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_set_pd_info(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 3 + 20];
@@ -496,7 +496,7 @@ int CAimProto::aim_set_pd_info(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_ssi_update_preferences(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_ssi_update_preferences(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 4 + 100];
@@ -525,7 +525,7 @@ int CAimProto::aim_ssi_update_preferences(HANDLE hServerConn, unsigned short &se
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_ssi_update(HANDLE hServerConn, unsigned short &seqno, bool start)
+int CAimProto::aim_ssi_update(HNETLIBCONN hServerConn, unsigned short &seqno, bool start)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -533,13 +533,13 @@ int CAimProto::aim_ssi_update(HANDLE hServerConn, unsigned short &seqno, bool st
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno) == 0;
}
-int CAimProto::aim_keepalive(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_keepalive(HNETLIBCONN hServerConn, unsigned short &seqno)
{
return aim_sendflap(hServerConn, 0x05, 4, "\x0\x0\x0\xEE", seqno);
}
// used when requesting a regular file transfer
-int CAimProto::aim_send_file(HANDLE hServerConn, unsigned short &seqno,
+int CAimProto::aim_send_file(HNETLIBCONN hServerConn, unsigned short &seqno,
unsigned long ip, unsigned short port,
bool force_proxy, file_transfer *ft)
{
@@ -618,7 +618,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)
+int CAimProto::aim_file_ad(HNETLIBCONN 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];
@@ -644,7 +644,7 @@ int CAimProto::aim_file_ad(HANDLE hServerConn, unsigned short &seqno, char* sn,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno) == 0;
}
-int CAimProto::aim_typing_notification(HANDLE hServerConn, unsigned short &seqno, char* sn, unsigned short type)
+int CAimProto::aim_typing_notification(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, unsigned short type)
{
unsigned short offset = 0;
unsigned short sn_length = (unsigned short)mir_strlen(sn);
@@ -658,7 +658,7 @@ int CAimProto::aim_typing_notification(HANDLE hServerConn, unsigned short &seqno
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_idle(HANDLE hServerConn, unsigned short &seqno, unsigned long seconds)
+int CAimProto::aim_set_idle(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned long seconds)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + 4];
@@ -667,7 +667,7 @@ int CAimProto::aim_set_idle(HANDLE hServerConn, unsigned short &seqno, unsigned
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_request_mail(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_request_mail(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + 34];
@@ -680,7 +680,7 @@ int CAimProto::aim_request_mail(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_activate_mail(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_activate_mail(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + 17];
@@ -689,7 +689,7 @@ int CAimProto::aim_activate_mail(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_request_avatar(HANDLE hServerConn, unsigned short &seqno, const char* sn, unsigned short bart_type, const char* hash, unsigned short hash_size)
+int CAimProto::aim_request_avatar(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, unsigned short bart_type, const char* hash, unsigned short hash_size)
{
unsigned short offset = 0;
unsigned char sn_length = (unsigned char)mir_strlen(sn);
@@ -702,7 +702,7 @@ int CAimProto::aim_request_avatar(HANDLE hServerConn, unsigned short &seqno, con
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_set_avatar_hash(HANDLE hServerConn, unsigned short &seqno, char flags, unsigned short bart_type, unsigned short &id, char size, const char* hash)
+int CAimProto::aim_set_avatar_hash(HNETLIBCONN hServerConn, unsigned short &seqno, char flags, unsigned short bart_type, unsigned short &id, char size, const char* hash)
{
unsigned short offset = 0;
@@ -734,7 +734,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(HNETLIBCONN hServerConn, unsigned short &seqno, char /*flags*/, unsigned short bart_type, unsigned short & id)
{
unsigned short offset = 0;
@@ -757,7 +757,7 @@ int CAimProto::aim_delete_avatar_hash(HANDLE hServerConn, unsigned short &seqno,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_upload_avatar(HANDLE hServerConn, unsigned short &seqno, unsigned short bart_type, const char* avatar, unsigned short avatar_size)
+int CAimProto::aim_upload_avatar(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned short bart_type, const char* avatar, unsigned short avatar_size)
{
unsigned short offset = 0;
char* buf = (char*)alloca(SNAC_SIZE + 22 + avatar_size);
@@ -768,7 +768,7 @@ int CAimProto::aim_upload_avatar(HANDLE hServerConn, unsigned short &seqno, unsi
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_search_by_email(HANDLE hServerConn, unsigned short &seqno, const char* email)
+int CAimProto::aim_search_by_email(HNETLIBCONN hServerConn, unsigned short &seqno, const char* email)
{
unsigned short offset = 0;
char em_length = (char)mir_strlen(email);
@@ -778,7 +778,7 @@ int CAimProto::aim_search_by_email(HANDLE hServerConn, unsigned short &seqno, co
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chatnav_request_limits(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_chatnav_request_limits(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE];
@@ -786,7 +786,7 @@ int CAimProto::aim_chatnav_request_limits(HANDLE hServerConn, unsigned short &se
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno) ? -1 : 0;
}
-int CAimProto::aim_chatnav_create(HANDLE hServerConn, unsigned short &seqno, char* room, unsigned short exchage)
+int CAimProto::aim_chatnav_create(HNETLIBCONN hServerConn, unsigned short &seqno, char* room, unsigned short exchage)
{
//* Join Pseudo Room (Get's the info we need for the real connection)
unsigned short room_len = (unsigned short)mir_strlen(room);
@@ -807,7 +807,7 @@ int CAimProto::aim_chatnav_create(HANDLE hServerConn, unsigned short &seqno, cha
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chatnav_room_info(HANDLE hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance)
+int CAimProto::aim_chatnav_room_info(HNETLIBCONN hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance)
{
unsigned short offset = 0;
unsigned short chat_cookie_len = (unsigned short)mir_strlen(chat_cookie);
@@ -821,7 +821,7 @@ int CAimProto::aim_chatnav_room_info(HANDLE hServerConn, unsigned short &seqno,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chat_join_room(HANDLE hServerConn, unsigned short &seqno, char* chat_cookie,
+int CAimProto::aim_chat_join_room(HNETLIBCONN hServerConn, unsigned short &seqno, char* chat_cookie,
unsigned short exchange, unsigned short instance, unsigned short id)
{
unsigned short offset = 0;
@@ -843,7 +843,7 @@ int CAimProto::aim_chat_join_room(HANDLE hServerConn, unsigned short &seqno, cha
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chat_send_message(HANDLE hServerConn, unsigned short &seqno, char *amsg)
+int CAimProto::aim_chat_send_message(HNETLIBCONN hServerConn, unsigned short &seqno, char *amsg)
{
aimString str(amsg);
@@ -872,7 +872,7 @@ int CAimProto::aim_chat_send_message(HANDLE hServerConn, unsigned short &seqno,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chat_invite(HANDLE hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, char* sn, char* msg)
+int CAimProto::aim_chat_invite(HNETLIBCONN hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, char* sn, char* msg)
{
unsigned short offset = 0;
unsigned short chat_cookie_len = (unsigned short)mir_strlen(chat_cookie);
@@ -906,7 +906,7 @@ int CAimProto::aim_chat_invite(HANDLE hServerConn, unsigned short &seqno, char*
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_chat_deny(HANDLE hServerConn, unsigned short &seqno, char* sn, char* icbm_cookie)
+int CAimProto::aim_chat_deny(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, char* icbm_cookie)
{
unsigned short offset = 0;
unsigned short sn_length = (unsigned short)mir_strlen(sn);
@@ -922,7 +922,7 @@ int CAimProto::aim_chat_deny(HANDLE hServerConn, unsigned short &seqno, char* sn
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno) == 0;
}
-int CAimProto::aim_admin_ready(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_admin_ready(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE * 4];
@@ -934,7 +934,7 @@ int CAimProto::aim_admin_ready(HANDLE hServerConn, unsigned short &seqno)
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_admin_format_name(HANDLE hServerConn, unsigned short &seqno, const char* sn)
+int CAimProto::aim_admin_format_name(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn)
{
unsigned short offset = 0;
unsigned short sn_len = (unsigned short)mir_strlen(sn);
@@ -944,7 +944,7 @@ int CAimProto::aim_admin_format_name(HANDLE hServerConn, unsigned short &seqno,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_admin_change_email(HANDLE hServerConn, unsigned short &seqno, const char* email)
+int CAimProto::aim_admin_change_email(HNETLIBCONN hServerConn, unsigned short &seqno, const char* email)
{
unsigned short offset = 0;
unsigned short email_len = (unsigned short)mir_strlen(email);
@@ -954,7 +954,7 @@ int CAimProto::aim_admin_change_email(HANDLE hServerConn, unsigned short &seqno,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_admin_change_password(HANDLE hServerConn, unsigned short &seqno, const char* cur_pw, const char* new_pw)
+int CAimProto::aim_admin_change_password(HNETLIBCONN hServerConn, unsigned short &seqno, const char* cur_pw, const char* new_pw)
{
unsigned short offset = 0;
unsigned short cur_pw_len = (unsigned short)mir_strlen(cur_pw);
@@ -966,7 +966,7 @@ int CAimProto::aim_admin_change_password(HANDLE hServerConn, unsigned short &seq
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_admin_request_info(HANDLE hServerConn, unsigned short &seqno, const unsigned short &type)
+int CAimProto::aim_admin_request_info(HNETLIBCONN hServerConn, unsigned short &seqno, const unsigned short &type)
{
// types: 0x01 - nickname, 0x11 - email info, 0x13 - registration status
unsigned short offset = 0;
@@ -976,7 +976,7 @@ int CAimProto::aim_admin_request_info(HANDLE hServerConn, unsigned short &seqno,
return aim_sendflap(hServerConn, 0x02, offset, buf, seqno);
}
-int CAimProto::aim_admin_account_confirm(HANDLE hServerConn, unsigned short &seqno)
+int CAimProto::aim_admin_account_confirm(HNETLIBCONN hServerConn, unsigned short &seqno)
{
unsigned short offset = 0;
char buf[SNAC_SIZE + TLV_HEADER_SIZE];
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp
index 03b51e2577..3ac25b5256 100755
--- a/protocols/AimOscar/src/connection.cpp
+++ b/protocols/AimOscar/src/connection.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-HANDLE CAimProto::aim_connect(const char* server, unsigned short port, bool use_ssl, const char* host)
+HNETLIBCONN CAimProto::aim_connect(const char* server, unsigned short port, bool use_ssl, const char* host)
{
NETLIBOPENCONNECTION ncon = { 0 };
ncon.cbSize = sizeof(ncon);
@@ -28,7 +28,7 @@ HANDLE CAimProto::aim_connect(const char* server, unsigned short port, bool use_
ncon.timeout = 6;
ncon.flags = NLOCF_V2;
debugLogA("%s:%u", server, port);
- HANDLE con = Netlib_OpenConnection(m_hNetlibUser, &ncon);
+ HNETLIBCONN con = Netlib_OpenConnection(m_hNetlibUser, &ncon);
if (con && use_ssl) {
if (!Netlib_StartSsl(con, host)) {
Netlib_CloseHandle(con);
@@ -38,7 +38,7 @@ HANDLE CAimProto::aim_connect(const char* server, unsigned short port, bool use_
return con;
}
-HANDLE CAimProto::aim_peer_connect(const char* ip, unsigned short port)
+HNETLIBCONN CAimProto::aim_peer_connect(const char* ip, unsigned short port)
{
NETLIBOPENCONNECTION ncon = { 0 };
ncon.cbSize = sizeof(ncon);
@@ -49,7 +49,7 @@ HANDLE CAimProto::aim_peer_connect(const char* ip, unsigned short port)
return Netlib_OpenConnection(m_hNetlibPeer, &ncon);
}
-HANDLE CAimProto::aim_peer_connect(unsigned long ip, unsigned short port)
+HNETLIBCONN CAimProto::aim_peer_connect(unsigned long ip, unsigned short port)
{
char ips[20];
long_ip_to_char_ip(ip, ips);
diff --git a/protocols/AimOscar/src/direct_connect.cpp b/protocols/AimOscar/src/direct_connect.cpp
index 6f9eecf76b..b9cfab0508 100644
--- a/protocols/AimOscar/src/direct_connect.cpp
+++ b/protocols/AimOscar/src/direct_connect.cpp
@@ -45,7 +45,7 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini
else {
if (!ft->requester && result == 1 && !Miranda_IsTerminated()) {
ft->accepted = false;
- HANDLE hConn = aim_peer_connect(AIM_PROXY_SERVER, get_default_port());
+ HNETLIBCONN hConn = aim_peer_connect(AIM_PROXY_SERVER, get_default_port());
if (hConn) {
debugLogA("Connected to proxy ip because we want to use a proxy for the file transfer.");
ft->requester = true;
@@ -61,7 +61,7 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini
m_ft_list.remove_by_ft(ft);
}
-void aim_direct_connection_initiated(HANDLE hNewConnection, DWORD, void* extra)//for receiving stuff via dc
+void aim_direct_connection_initiated(HNETLIBCONN hNewConnection, DWORD, void* extra)//for receiving stuff via dc
{
CAimProto *ppro = (CAimProto*)extra;
diff --git a/protocols/AimOscar/src/direct_connect.h b/protocols/AimOscar/src/direct_connect.h
index 4b164f9181..4bdcab6a4d 100644
--- a/protocols/AimOscar/src/direct_connect.h
+++ b/protocols/AimOscar/src/direct_connect.h
@@ -19,6 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef DIRECT_CONNECT_H
#define DIRECT_CONNECT_H
-void aim_direct_connection_initiated(HANDLE hNewConnection, DWORD dwRemoteIP, void* extra);
+void aim_direct_connection_initiated(HNETLIBCONN hNewConnection, DWORD dwRemoteIP, void* extra);
#endif
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp
index 42c2ae2b8d..0a67bea54b 100644
--- a/protocols/AimOscar/src/file.cpp
+++ b/protocols/AimOscar/src/file.cpp
@@ -530,7 +530,6 @@ void file_transfer::listen(CAimProto* ppro)
if (hDirectBoundPort) return;
NETLIBBIND nlb = {};
- nlb.cbSize = sizeof(nlb);
nlb.pfnNewConnectionV2 = aim_direct_connection_initiated;
nlb.pExtra = ppro;
hDirectBoundPort = Netlib_BindPort(ppro->m_hNetlibPeer, &nlb);
diff --git a/protocols/AimOscar/src/file.h b/protocols/AimOscar/src/file.h
index 4577f2bb0e..faf6714284 100644
--- a/protocols/AimOscar/src/file.h
+++ b/protocols/AimOscar/src/file.h
@@ -28,9 +28,9 @@ struct file_transfer
char icbm_cookie[8];
- HANDLE hConn;
+ HNETLIBCONN hConn;
HANDLE hResumeEvent;
- HANDLE hDirectBoundPort;
+ HNETLIBBIND hDirectBoundPort;
char* file;
char* message;
diff --git a/protocols/AimOscar/src/packets.cpp b/protocols/AimOscar/src/packets.cpp
index 4c5964d293..dc77c6a41e 100644
--- a/protocols/AimOscar/src/packets.cpp
+++ b/protocols/AimOscar/src/packets.cpp
@@ -63,7 +63,7 @@ int aim_writetlvlong64(unsigned short type, unsigned __int64 value, unsigned sho
}
-int CAimProto::aim_sendflap(HANDLE hServerConn, char type,unsigned short length,const char *buf, unsigned short &seqno)
+int CAimProto::aim_sendflap(HNETLIBCONN hServerConn, char type, unsigned short length, const char *buf, unsigned short &seqno)
{
mir_cslock lck(SendingMutex);
const int slen = FLAP_SIZE + length;
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h
index f2a31d60d6..da05270f3d 100755
--- a/protocols/AimOscar/src/proto.h
+++ b/protocols/AimOscar/src/proto.h
@@ -122,7 +122,7 @@ struct CAimProto : public PROTO<CAimProto>
bool m_list_received;
//Some main connection stuff
- HANDLE m_hServerConn; // handle to the main connection
+ HNETLIBCONN m_hServerConn; // handle to the main connection
unsigned long m_internal_ip; // our ip
unsigned long m_detected_ip; // our ip
@@ -139,21 +139,21 @@ struct CAimProto : public PROTO<CAimProto>
HGENMENU m_hMainMenu[3];
//Some mail connection stuff
- HANDLE m_hMailConn;
+ HNETLIBCONN m_hMailConn;
unsigned short m_mail_seqno;
//avatar connection stuff
unsigned short m_avatar_seqno;
unsigned short m_avatar_id_sm;
unsigned short m_avatar_id_lg;
- HANDLE m_hAvatarConn;
+ HNETLIBCONN m_hAvatarConn;
HANDLE m_hAvatarEvent;
ft_list_type m_ft_list;
//chatnav connection stuff
unsigned short m_chatnav_seqno;
- HANDLE m_hChatNavConn;
+ HNETLIBCONN m_hChatNavConn;
HANDLE m_hChatNavEvent;
char MAX_ROOMS;
@@ -161,7 +161,7 @@ struct CAimProto : public PROTO<CAimProto>
//admin connection stuff
unsigned short m_admin_seqno;
- HANDLE m_hAdminConn;
+ HNETLIBCONN m_hAdminConn;
HANDLE m_hAdminEvent;
// privacy settings
@@ -203,10 +203,10 @@ struct CAimProto : public PROTO<CAimProto>
void __cdecl get_online_msg_thread( void* arg );
- int aim_set_away(HANDLE hServerConn, unsigned short &seqno, const char *msg, bool set);//user info
- int aim_set_statusmsg(HANDLE hServerConn,unsigned short &seqno,const char *msg);//user info
- int aim_set_status(HANDLE hServerConn,unsigned short &seqno,unsigned long status_type);
- int aim_query_away_message(HANDLE hServerConn,unsigned short &seqno,const char* sn);
+ int aim_set_away(HNETLIBCONN hServerConn, unsigned short &seqno, const char *msg, bool set);//user info
+ int aim_set_statusmsg(HNETLIBCONN hServerConn,unsigned short &seqno,const char *msg);//user info
+ int aim_set_status(HNETLIBCONN hServerConn,unsigned short &seqno,unsigned long status_type);
+ int aim_query_away_message(HNETLIBCONN hServerConn,unsigned short &seqno,const char* sn);
char** get_status_msg_loc(int status);
@@ -230,79 +230,78 @@ struct CAimProto : public PROTO<CAimProto>
//////////////////////////////////////////////////////////////////////////////////////
// client.cpp
- int aim_send_connection_packet(HANDLE hServerConn,unsigned short &seqno,char *buf);
- int aim_authkey_request(HANDLE hServerConn,unsigned short &seqno);
- int aim_auth_request(HANDLE hServerConn,unsigned short &seqno,const char* key,const char* language,
- const char* country, const char* username, const char* password);
- int aim_send_cookie(HANDLE hServerConn,unsigned short &seqno,int cookie_size,char * cookie);
- int aim_send_service_request(HANDLE hServerConn,unsigned short &seqno);
- int aim_new_service_request(HANDLE hServerConn,unsigned short &seqno,unsigned short service);
- int aim_request_rates(HANDLE hServerConn,unsigned short &seqno);
- int aim_request_icbm(HANDLE hServerConn,unsigned short &seqno);
- int aim_request_offline_msgs(HANDLE hServerConn,unsigned short &seqno);
- int aim_set_icbm(HANDLE hServerConn,unsigned short &seqno);
- int aim_set_profile(HANDLE hServerConn,unsigned short &seqno,char* amsg);//user info
- int aim_request_list(HANDLE hServerConn,unsigned short &seqno);
- int aim_activate_list(HANDLE hServerConn,unsigned short &seqno);
- int aim_accept_rates(HANDLE hServerConn,unsigned short &seqno);
- int aim_set_caps(HANDLE hServerConn,unsigned short &seqno);
- int aim_client_ready(HANDLE hServerConn,unsigned short &seqno);
- int aim_mail_ready(HANDLE hServerConn,unsigned short &seqno);
- int aim_avatar_ready(HANDLE hServerConn,unsigned short &seqno);
- int aim_chatnav_ready(HANDLE hServerConn,unsigned short &seqno);
- int aim_chat_ready(HANDLE hServerConn,unsigned short &seqno);
- int aim_send_message(HANDLE hServerConn,unsigned short &seqno,const char* sn,char* amsg,bool auto_response, bool blast);
- int aim_query_profile(HANDLE hServerConn,unsigned short &seqno,char* sn);
- int aim_delete_contact(HANDLE hServerConn,unsigned short &seqno,char* sn,unsigned short item_id,unsigned short group_id,unsigned short list, bool nil);
- int aim_add_contact(HANDLE hServerConn,unsigned short &seqno,const char* sn,unsigned short item_id,unsigned short group_id,unsigned short list,char* nick=NULL, char* note=NULL);
- int aim_mod_group(HANDLE hServerConn,unsigned short &seqno,const char* name,unsigned short group_id,char* members,unsigned short members_length);
- int aim_mod_buddy(HANDLE hServerConn,unsigned short &seqno,const char* sn,unsigned short buddy_id,unsigned short group_id,char* nick,char* note);
- int aim_ssi_update(HANDLE hServerConn, unsigned short &seqno, bool start);
- int aim_ssi_update_preferences(HANDLE hServerConn, unsigned short &seqno);
- int aim_keepalive(HANDLE hServerConn,unsigned short &seqno);
- int aim_send_file(HANDLE hServerConn,unsigned short &seqno,unsigned long ip, unsigned short port, bool force_proxy, file_transfer *ft);//used when requesting a regular file transfer
- int aim_file_ad(HANDLE hServerConn,unsigned short &seqno,char* sn,char* icbm_cookie,bool deny,unsigned short max_ver);
- int aim_typing_notification(HANDLE hServerConn,unsigned short &seqno,char* sn,unsigned short type);
- int aim_set_idle(HANDLE hServerConn,unsigned short &seqno,unsigned long seconds);
- int aim_request_mail(HANDLE hServerConn,unsigned short &seqno);
- int aim_activate_mail(HANDLE hServerConn,unsigned short &seqno);
- int aim_request_avatar(HANDLE hServerConn,unsigned short &seqno,const char* sn, unsigned short bart_type, const char* hash, unsigned short hash_size);//family 0x0010
- int aim_set_avatar_hash(HANDLE hServerConn,unsigned short &seqno, char flags, unsigned short bart_type, unsigned short &id, char size, const char* hash);
- int aim_delete_avatar_hash(HANDLE hServerConn,unsigned short &seqno, char flags, unsigned short bart_type, unsigned short &id);
- int aim_upload_avatar(HANDLE hServerConn,unsigned short &seqno, unsigned short bart_type, const char* avatar, unsigned short avatar_size);
- int aim_search_by_email(HANDLE hServerConn,unsigned short &seqno, const char* email);
- int aim_set_pd_info(HANDLE hServerConn, unsigned short &seqno);
- int aim_block_buddy(HANDLE hServerConn, unsigned short &seqno, bool remove, const char* sn, unsigned short item_id);
- int aim_chatnav_request_limits(HANDLE hServerConn,unsigned short &seqno);
- int aim_chatnav_create(HANDLE hServerConn,unsigned short &seqno, char* room, unsigned short exchage);
- int aim_chatnav_room_info(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance);
- int aim_chat_join_room(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance,unsigned short id);
- int aim_chat_send_message(HANDLE hServerConn,unsigned short &seqno, char *amsg);
- int aim_chat_invite(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, char* sn, char* msg);
- int aim_chat_deny(HANDLE hServerConn,unsigned short &seqno,char* sn,char* icbm_cookie);
- int aim_admin_ready(HANDLE hServerConn,unsigned short &seqno);
- int aim_admin_format_name(HANDLE hServerConn,unsigned short &seqno, const char* sn);
- int aim_admin_change_password(HANDLE hServerConn,unsigned short &seqno, const char* cur_pw, const char* new_pw);
- int aim_admin_change_email(HANDLE hServerConn,unsigned short &seqno, const char* email);
- int aim_admin_request_info(HANDLE hServerConn,unsigned short &seqno, const unsigned short &type);
- int aim_admin_account_confirm(HANDLE hServerConn,unsigned short &seqno);
+ int aim_send_connection_packet(HNETLIBCONN hServerConn, unsigned short &seqno, char *buf);
+ int aim_authkey_request(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_auth_request(HNETLIBCONN hServerConn, unsigned short &seqno, const char* key, const char* language, const char* country, const char* username, const char* password);
+ int aim_send_cookie(HNETLIBCONN hServerConn, unsigned short &seqno, int cookie_size, char * cookie);
+ int aim_send_service_request(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_new_service_request(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned short service);
+ int aim_request_rates(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_request_icbm(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_request_offline_msgs(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_set_icbm(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_set_profile(HNETLIBCONN hServerConn, unsigned short &seqno, char* amsg);//user info
+ int aim_request_list(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_activate_list(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_accept_rates(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_set_caps(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_client_ready(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_mail_ready(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_avatar_ready(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_chatnav_ready(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_chat_ready(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_send_message(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, char* amsg, bool auto_response, bool blast);
+ int aim_query_profile(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn);
+ int aim_delete_contact(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, unsigned short item_id, unsigned short group_id, unsigned short list, bool nil);
+ int aim_add_contact(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, unsigned short item_id, unsigned short group_id, unsigned short list, char* nick = NULL, char* note = NULL);
+ int aim_mod_group(HNETLIBCONN hServerConn, unsigned short &seqno, const char* name, unsigned short group_id, char* members, unsigned short members_length);
+ int aim_mod_buddy(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, unsigned short buddy_id, unsigned short group_id, char* nick, char* note);
+ int aim_ssi_update(HNETLIBCONN hServerConn, unsigned short &seqno, bool start);
+ int aim_ssi_update_preferences(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_keepalive(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_send_file(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned long ip, unsigned short port, bool force_proxy, file_transfer *ft);//used when requesting a regular file transfer
+ int aim_file_ad(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, char* icbm_cookie, bool deny, unsigned short max_ver);
+ int aim_typing_notification(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, unsigned short type);
+ int aim_set_idle(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned long seconds);
+ int aim_request_mail(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_activate_mail(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_request_avatar(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn, unsigned short bart_type, const char* hash, unsigned short hash_size);//family 0x0010
+ int aim_set_avatar_hash(HNETLIBCONN hServerConn, unsigned short &seqno, char flags, unsigned short bart_type, unsigned short &id, char size, const char* hash);
+ int aim_delete_avatar_hash(HNETLIBCONN hServerConn, unsigned short &seqno, char flags, unsigned short bart_type, unsigned short &id);
+ int aim_upload_avatar(HNETLIBCONN hServerConn, unsigned short &seqno, unsigned short bart_type, const char* avatar, unsigned short avatar_size);
+ int aim_search_by_email(HNETLIBCONN hServerConn, unsigned short &seqno, const char* email);
+ int aim_set_pd_info(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_block_buddy(HNETLIBCONN hServerConn, unsigned short &seqno, bool remove, const char* sn, unsigned short item_id);
+ int aim_chatnav_request_limits(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_chatnav_create(HNETLIBCONN hServerConn, unsigned short &seqno, char* room, unsigned short exchage);
+ int aim_chatnav_room_info(HNETLIBCONN hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance);
+ int aim_chat_join_room(HNETLIBCONN hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, unsigned short id);
+ int aim_chat_send_message(HNETLIBCONN hServerConn, unsigned short &seqno, char *amsg);
+ int aim_chat_invite(HNETLIBCONN hServerConn, unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, char* sn, char* msg);
+ int aim_chat_deny(HNETLIBCONN hServerConn, unsigned short &seqno, char* sn, char* icbm_cookie);
+ int aim_admin_ready(HNETLIBCONN hServerConn, unsigned short &seqno);
+ int aim_admin_format_name(HNETLIBCONN hServerConn, unsigned short &seqno, const char* sn);
+ int aim_admin_change_password(HNETLIBCONN hServerConn, unsigned short &seqno, const char* cur_pw, const char* new_pw);
+ int aim_admin_change_email(HNETLIBCONN hServerConn, unsigned short &seqno, const char* email);
+ int aim_admin_request_info(HNETLIBCONN hServerConn, unsigned short &seqno, const unsigned short &type);
+ int aim_admin_account_confirm(HNETLIBCONN hServerConn, unsigned short &seqno);
//////////////////////////////////////////////////////////////////////////////////////
// connection.cpp
- void aim_connection_authorization( void );
- void aim_connection_clientlogin( void );
+ void aim_connection_authorization(void);
+ void aim_connection_clientlogin(void);
- void __cdecl aim_protocol_negotiation( void* );
- void __cdecl aim_mail_negotiation( void* );
- void __cdecl aim_avatar_negotiation( void* );
- void __cdecl aim_chatnav_negotiation( void* );
- void __cdecl aim_chat_negotiation( void* );
- void __cdecl aim_admin_negotiation( void* );
+ void __cdecl aim_protocol_negotiation(void*);
+ void __cdecl aim_mail_negotiation(void*);
+ void __cdecl aim_avatar_negotiation(void*);
+ void __cdecl aim_chatnav_negotiation(void*);
+ void __cdecl aim_chat_negotiation(void*);
+ void __cdecl aim_admin_negotiation(void*);
- HANDLE aim_connect(const char* server, unsigned short port, bool use_ssl, const char* host = NULL);
- HANDLE aim_peer_connect(const char* ip, unsigned short port);
- HANDLE aim_peer_connect(unsigned long ip, unsigned short port);
+ HNETLIBCONN aim_connect(const char* server, unsigned short port, bool use_ssl, const char* host = NULL);
+ HNETLIBCONN aim_peer_connect(const char* ip, unsigned short port);
+ HNETLIBCONN aim_peer_connect(unsigned long ip, unsigned short port);
//////////////////////////////////////////////////////////////////////////////////////
// direct_connect.cpp
@@ -327,7 +326,7 @@ struct CAimProto : public PROTO<CAimProto>
//////////////////////////////////////////////////////////////////////////////////////
// packets.cpp
- int aim_sendflap(HANDLE conn, char type,unsigned short length,const char *buf, unsigned short &seqno);
+ int aim_sendflap(HNETLIBCONN conn, char type, unsigned short length, const char *buf, unsigned short &seqno);
//////////////////////////////////////////////////////////////////////////////////////
// proto.cpp
@@ -343,25 +342,25 @@ struct CAimProto : public PROTO<CAimProto>
//////////////////////////////////////////////////////////////////////////////////////
// server.cpp
- void snac_md5_authkey(SNAC &snac,HANDLE hServerConn,unsigned short &seqno, const char* username, const char* password);
+ void snac_md5_authkey(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno, const char* username, const char* password);
int snac_authorization_reply(SNAC &snac);
- void snac_supported_families(SNAC &snac, HANDLE hServerConn,unsigned short &seqno);
- void snac_supported_family_versions(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);//family 0x0001
- void snac_rate_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);//family 0x0001
- void snac_mail_rate_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);// family 0x0001
- void snac_avatar_rate_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);// family 0x0001
- void snac_chatnav_rate_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);// family 0x0001
- void snac_chat_rate_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);// family 0x0001
- void snac_admin_rate_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);// family 0x0001
+ void snac_supported_families(SNAC &snac, HNETLIBCONN hServerConn,unsigned short &seqno);
+ void snac_supported_family_versions(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);//family 0x0001
+ void snac_rate_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);//family 0x0001
+ void snac_mail_rate_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);// family 0x0001
+ void snac_avatar_rate_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);// family 0x0001
+ void snac_chatnav_rate_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);// family 0x0001
+ void snac_chat_rate_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);// family 0x0001
+ void snac_admin_rate_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);// family 0x0001
void snac_service_redirect(SNAC &snac);// family 0x0001
void snac_self_info(SNAC &snac);//family 0x0001
- void snac_icbm_limitations(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);//family 0x0004
+ void snac_icbm_limitations(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);//family 0x0004
void snac_user_online(SNAC &snac);
void snac_user_offline(SNAC &snac);
void snac_error(SNAC &snac);//family 0x0003 or x0004
- void snac_contact_list(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);
+ void snac_contact_list(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);
void snac_message_accepted(SNAC &snac);//family 0x004
- void snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);//family 0x0004
+ void snac_received_message(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);//family 0x0004
void snac_file_decline(SNAC &snac);//family 0x0004
void snac_received_info(SNAC &snac);//family 0x0002
void snac_typing_notification(SNAC &snac);//family 0x004
@@ -370,7 +369,7 @@ struct CAimProto : public PROTO<CAimProto>
void snac_retrieve_avatar(SNAC &snac);//family 0x0010
void snac_upload_reply_avatar(SNAC &snac);//family 0x0010
void snac_email_search_results(SNAC &snac);//family 0x000A
- void snac_chatnav_info_response(SNAC &snac,HANDLE hServerConn,unsigned short &seqno);//family 0x000D
+ void snac_chatnav_info_response(SNAC &snac,HNETLIBCONN hServerConn,unsigned short &seqno);//family 0x000D
void snac_chat_joined_left_users(SNAC &snac,chat_list_item* item);//family 0x000E
void snac_chat_received_message(SNAC &snac,chat_list_item* item);//family 0x000E
void snac_admin_account_infomod(SNAC &snac);//family 0x0007
@@ -403,7 +402,7 @@ struct CAimProto : public PROTO<CAimProto>
MCONTACT contact_from_sn(const char* sn, bool addIfNeeded = false, bool temporary = false);
void broadcast_status(int status);
- bool wait_conn(HANDLE& hConn, HANDLE& hEvent, unsigned short service);
+ bool wait_conn(HNETLIBCONN& hConn, HANDLE& hEvent, unsigned short service);
bool is_my_contact(MCONTACT hContact);
void add_contact_to_group(MCONTACT hContact, const char* group);
void set_local_nick(MCONTACT hContact, char* nick, char* note);
diff --git a/protocols/AimOscar/src/proxy.cpp b/protocols/AimOscar/src/proxy.cpp
index d3ac4deebe..2b7fdb0f77 100644
--- a/protocols/AimOscar/src/proxy.cpp
+++ b/protocols/AimOscar/src/proxy.cpp
@@ -134,7 +134,7 @@ void __cdecl CAimProto::aim_proxy_helper(void* param)
}
-int proxy_initialize_send(HANDLE connection, char* sn, char* cookie)
+int proxy_initialize_send(HNETLIBCONN connection, char* sn, char* cookie)
{
const char sn_length = (char)mir_strlen(sn);
const int len = sn_length + 21 + TLV_HEADER_SIZE + AIM_CAPS_LENGTH;
@@ -152,7 +152,7 @@ int proxy_initialize_send(HANDLE connection, char* sn, char* cookie)
return Netlib_Send(connection, buf, offset, 0) >= 0 ? 0 : -1;
}
-int proxy_initialize_recv(HANDLE connection,char* sn, char* cookie,unsigned short port_check)
+int proxy_initialize_recv(HNETLIBCONN connection, char* sn, char* cookie, unsigned short port_check)
{
const char sn_length = (char)mir_strlen(sn);
const int len = sn_length + 23 + TLV_HEADER_SIZE + AIM_CAPS_LENGTH;
diff --git a/protocols/AimOscar/src/proxy.h b/protocols/AimOscar/src/proxy.h
index 8a05a3405a..83a03e2d0d 100644
--- a/protocols/AimOscar/src/proxy.h
+++ b/protocols/AimOscar/src/proxy.h
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef PROXY_H
#define PROXY_H
-int proxy_initialize_send(HANDLE connection,char* sn, char* cookie);
-int proxy_initialize_recv(HANDLE connection,char* sn, char* cookie,unsigned short port_check);
+int proxy_initialize_send(HNETLIBCONN connection, char* sn, char* cookie);
+int proxy_initialize_recv(HNETLIBCONN connection, char* sn, char* cookie, unsigned short port_check);
#endif
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp
index 3cc3be86ae..25f32001f1 100644
--- a/protocols/AimOscar/src/server.cpp
+++ b/protocols/AimOscar/src/server.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-void CAimProto::snac_md5_authkey(SNAC &snac, HANDLE hServerConn, unsigned short &seqno, const char* username, const char* password)//family 0x0017
+void CAimProto::snac_md5_authkey(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno, const char* username, const char* password)//family 0x0017
{
if (snac.subcmp(0x0007))//md5 authkey string
{
@@ -83,28 +83,28 @@ int CAimProto::snac_authorization_reply(SNAC &snac)//family 0x0017
}
return res;
}
-void CAimProto::snac_supported_families(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)//family 0x0001
+void CAimProto::snac_supported_families(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)//family 0x0001
{
if (snac.subcmp(0x0003))//server supported service list
{
aim_send_service_request(hServerConn, seqno);
}
}
-void CAimProto::snac_supported_family_versions(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)//family 0x0001
+void CAimProto::snac_supported_family_versions(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)//family 0x0001
{
if (snac.subcmp(0x0018))//service list okayed
{
aim_request_rates(hServerConn, seqno);//request some rate crap
}
}
-void CAimProto::snac_rate_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)// family 0x0001
+void CAimProto::snac_rate_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)// family 0x0001
{
if (snac.subcmp(0x0007)) {
aim_accept_rates(hServerConn, seqno);
aim_request_icbm(hServerConn, seqno);
}
}
-void CAimProto::snac_mail_rate_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)// family 0x0001
+void CAimProto::snac_mail_rate_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)// family 0x0001
{
if (snac.subcmp(0x0007)) {
aim_accept_rates(hServerConn, seqno);
@@ -114,7 +114,7 @@ void CAimProto::snac_mail_rate_limitations(SNAC &snac, HANDLE hServerConn, unsig
}
}
-void CAimProto::snac_avatar_rate_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)// family 0x0001
+void CAimProto::snac_avatar_rate_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)// family 0x0001
{
if (snac.subcmp(0x0007)) {
aim_accept_rates(hServerConn, seqno);
@@ -123,7 +123,7 @@ void CAimProto::snac_avatar_rate_limitations(SNAC &snac, HANDLE hServerConn, uns
}
}
-void CAimProto::snac_chatnav_rate_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)// family 0x0001
+void CAimProto::snac_chatnav_rate_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)// family 0x0001
{
if (snac.subcmp(0x0007)) {
aim_accept_rates(hServerConn, seqno);
@@ -131,7 +131,7 @@ void CAimProto::snac_chatnav_rate_limitations(SNAC &snac, HANDLE hServerConn, un
}
}
-void CAimProto::snac_chat_rate_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)// family 0x0001
+void CAimProto::snac_chat_rate_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)// family 0x0001
{
if (snac.subcmp(0x0007)) {
aim_accept_rates(hServerConn, seqno);
@@ -139,7 +139,7 @@ void CAimProto::snac_chat_rate_limitations(SNAC &snac, HANDLE hServerConn, unsig
}
}
-void CAimProto::snac_icbm_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)//family 0x0004
+void CAimProto::snac_icbm_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)//family 0x0004
{
if (snac.subcmp(0x0005)) {
switch (m_iDesiredStatus) {
@@ -913,7 +913,7 @@ void CAimProto::delete_ssi_list(SNAC &snac, int &offset)
mir_free(name);
}
-void CAimProto::snac_contact_list(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)//family 0x0013
+void CAimProto::snac_contact_list(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)//family 0x0013
{
if (snac.subcmp(0x0006)) { //contact list
debugLogA("Contact List Received");
@@ -988,7 +988,7 @@ void CAimProto::snac_message_accepted(SNAC &snac)//family 0x004
mir_free(icbm_cookie);
}
}
-void CAimProto::snac_received_message(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)//family 0x0004
+void CAimProto::snac_received_message(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)//family 0x0004
{
if (snac.subcmp(0x0007)) {
unsigned short channel = snac.ushort(8);
@@ -1744,7 +1744,7 @@ void CAimProto::snac_email_search_results(SNAC &snac)//family 0x000A
CAimProto::ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
-void CAimProto::snac_chatnav_info_response(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)//family 0x000D
+void CAimProto::snac_chatnav_info_response(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)//family 0x000D
{
if (snac.subcmp(0x0009)) {
debugLogA("Chat Info Received");
@@ -1901,7 +1901,7 @@ void CAimProto::snac_chat_received_message(SNAC &snac, chat_list_item* item)//fa
}
}
-void CAimProto::snac_admin_rate_limitations(SNAC &snac, HANDLE hServerConn, unsigned short &seqno)// family 0x0001
+void CAimProto::snac_admin_rate_limitations(SNAC &snac, HNETLIBCONN hServerConn, unsigned short &seqno)// family 0x0001
{
if (snac.subcmp(0x0007)) {
aim_accept_rates(hServerConn, seqno);
diff --git a/protocols/AimOscar/src/thread.cpp b/protocols/AimOscar/src/thread.cpp
index 35685f24ce..35b163f506 100644
--- a/protocols/AimOscar/src/thread.cpp
+++ b/protocols/AimOscar/src/thread.cpp
@@ -23,7 +23,7 @@ void __cdecl CAimProto::accept_file_thread(void* param)//buddy sending file
{
file_transfer *ft = (file_transfer*)param;
- HANDLE hConn = NULL;
+ HNETLIBCONN hConn = NULL;
if (ft->peer_force_proxy) //peer is forcing proxy
{
hConn = aim_peer_connect(ft->proxy_ip, get_default_port());
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 546a1eaaa7..ee1918bcc4 100755
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -109,8 +109,6 @@ void CAimProto::start_connection(void*)
if (login_url == NULL) login_url = mir_strdup(AIM_DEFAULT_SERVER);
-
-
m_hServerConn = aim_connect(login_url, get_default_port(), false, login_url); //ssl does not work anymore with old authorization algo
mir_free(login_url);
@@ -133,7 +131,7 @@ void CAimProto::start_connection(void*)
}
}
-bool CAimProto::wait_conn(HANDLE& hConn, HANDLE& hEvent, unsigned short service)
+bool CAimProto::wait_conn(HNETLIBCONN &hConn, HANDLE &hEvent, unsigned short service)
{
if (m_iStatus == ID_STATUS_OFFLINE)
return false;
@@ -141,7 +139,7 @@ bool CAimProto::wait_conn(HANDLE& hConn, HANDLE& hEvent, unsigned short service)
mir_cslock lck(connMutex);
if (hConn == NULL && m_hServerConn) {
debugLogA("Starting Connection.");
- hConn = (HANDLE)1; //set so no additional service request attempts are made while aim is still processing the request
+ hConn = (HNETLIBCONN)1; //set so no additional service request attempts are made while aim is still processing the request
aim_new_service_request(m_hServerConn, m_seqno, service);//general service connection!
}
}