Cleaning up the AIM code base and adding the right icon from IM Kit.

This commit is contained in:
plfiorini 2010-05-12 21:48:47 +00:00
parent e524826f03
commit c599c12c7f
4 changed files with 289 additions and 311 deletions

View File

@ -1,3 +1,8 @@
/*
* Copyright 2010, Alexander Botero-Lowry. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <string> #include <string>
@ -8,12 +13,11 @@
const char* kProtocolName = "aim"; const char* kProtocolName = "aim";
CayaProtocolMessengerInterface *gServerMsgr; CayaProtocolMessengerInterface* gServerMsgr;
AIMProtocol::AIMProtocol() AIMProtocol::AIMProtocol()
{ {
} }
@ -26,21 +30,22 @@ AIMProtocol::~AIMProtocol()
status_t status_t
AIMProtocol::Init(CayaProtocolMessengerInterface* msgr) AIMProtocol::Init(CayaProtocolMessengerInterface* msgr)
{ {
printf("init\n");
gServerMsgr = msgr; gServerMsgr = msgr;
fIMCommHandle = imcomm_create_handle();
fOnline = false;
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_INCOMING, (void (*)())GotMessage); fIMCommHandle = imcomm_create_handle();
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_SIGNON, (void (*)())BuddyOnline); fOnline = false;
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_SIGNOFF, (void (*)())BuddyOffline);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_BUDDYAWAY, (void (*)())BuddyAway);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_BUDDYUNAWAY, (void (*)())BuddyBack);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_AWAYMSG, (void (*)())BuddyAwayMsg);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_IDLEINFO, (void (*)())BuddyIdle);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_PROFILE, (void (*)())BuddyProfile);
// XXX missing IMCOMM_ERROR, IMCOMM_FORMATTED_SN, IMCOMM_HANDLE_DELETED // Register callbacks
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_INCOMING, (void (*)())GotMessage);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_SIGNON, (void (*)())BuddyOnline);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_SIGNOFF, (void (*)())BuddyOffline);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_BUDDYAWAY, (void (*)())BuddyAway);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_BUDDYUNAWAY, (void (*)())BuddyBack);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_AWAYMSG, (void (*)())BuddyAwayMsg);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_IDLEINFO, (void (*)())BuddyIdle);
imcomm_register_callback(fIMCommHandle, IMCOMM_IM_PROFILE, (void (*)())BuddyProfile);
// TODO: Missing IMCOMM_ERROR, IMCOMM_FORMATTED_SN, IMCOMM_HANDLE_DELETED
return B_OK; return B_OK;
} }
@ -57,159 +62,125 @@ AIMProtocol::Shutdown()
status_t status_t
AIMProtocol::Process(BMessage* msg) AIMProtocol::Process(BMessage* msg)
{ {
msg->PrintToStream(); switch (msg->what) {
case IM_MESSAGE: {
int32 im_what = 0;
switch (msg->what) { msg->FindInt32("im_what", &im_what);
case IM_MESSAGE:
{
int32 im_what = 0;
msg->FindInt32("im_what", &im_what); switch (im_what) {
case IM_SET_STATUS: {
int32 status = msg->FindInt32("status");
switch (im_what) { BString status_msg("");
case IM_SET_STATUS: msg->FindString("message", &status_msg);
{ char* smsg = strdup(status_msg.String());
int32 status = msg->FindInt32("status");
BString status_msg("");
msg->FindString("message", &status_msg);
char *smsg = strdup(status_msg.String());
switch (status) { switch (status) {
case CAYA_ONLINE: case CAYA_ONLINE:
{ if (!fOnline)
if (!fOnline) { A_LogOn();
A_LogOn(); else
} else { imcomm_set_unaway(fIMCommHandle);
imcomm_set_unaway(fIMCommHandle); break;
} case CAYA_AWAY:
break; imcomm_set_away(fIMCommHandle, smsg);
} break;
case CAYA_AWAY: case CAYA_EXTENDED_AWAY:
imcomm_set_away(fIMCommHandle, imcomm_set_away(fIMCommHandle, smsg);
smsg); //UnsupportedOperation(); ?
break;
case CAYA_DO_NOT_DISTURB:
imcomm_set_away(fIMCommHandle, smsg);
//UnsupportedOperation(); ?
break;
case CAYA_OFFLINE:
LogOff();
break;
default:
break;
}
break; free(smsg);
case CAYA_EXTENDED_AWAY:
imcomm_set_away(fIMCommHandle,
smsg);
// UnsupportedOperation(); ? BMessage msg(IM_MESSAGE);
break; msg.AddInt32("im_what", IM_STATUS_SET);
case CAYA_DO_NOT_DISTURB: msg.AddString("protocol", kProtocolName);
imcomm_set_away(fIMCommHandle, msg.AddInt32("status", status);
smsg); gServerMsgr->SendMessage(&msg);
// UnsupportedOperation(); ? break;
break; }
case CAYA_OFFLINE: case IM_SET_NICKNAME:
LogOff(); UnsupportedOperation();
break; break;
default: case IM_SEND_MESSAGE: {
break; const char* buddy = msg->FindString("id");
} const char* sms = msg->FindString("message");
imcomm_im_send_message(fIMCommHandle, buddy, sms, 0);
free(smsg); // XXX send a message to let caya know we did it
BMessage msg(IM_MESSAGE);
msg.AddInt32("im_what", IM_MESSAGE_SENT);
msg.AddString("protocol", kProtocolName);
msg.AddString("id", buddy);
msg.AddString("message", sms);
BMessage msg(IM_MESSAGE); gServerMsgr->SendMessage(&msg);
msg.AddInt32("im_what", IM_STATUS_SET); break;
msg.AddString("protocol", kProtocolName); }
msg.AddInt32("status", status); case IM_REGISTER_CONTACTS: {
const char* buddy = NULL;
char *buddy_copy;
gServerMsgr->SendMessage(&msg); for (int32 i = 0; msg->FindString("id", i, &buddy) == B_OK; i++) {
buddy_copy = strdup(buddy);
imcomm_im_add_buddy(fIMCommHandle, buddy_copy);
free(buddy_copy);
}
break;
}
case IM_UNREGISTER_CONTACTS: {
const char* buddy = NULL;
break; for (int32 i = 0; msg->FindString("id", i, &buddy) == B_OK; i++)
} imcomm_im_remove_buddy(fIMCommHandle, buddy);
case IM_SET_NICKNAME: break;
{ }
UnsupportedOperation(); case IM_USER_STARTED_TYPING:
break; //UnsupportedOperation();
} break;
case IM_SEND_MESSAGE: case IM_USER_STOPPED_TYPING:
{ //UnsupportedOperation();
const char* buddy = msg->FindString("id"); break;
const char* sms = msg->FindString("message"); case IM_GET_CONTACT_INFO:
imcomm_im_send_message(fIMCommHandle, buddy, UnsupportedOperation();
sms, 0); break;
case IM_SEND_AUTH_ACK:
// XXX send a message to let caya know UnsupportedOperation();
// we did it break;
BMessage msg(IM_MESSAGE); case IM_SPECIAL_TO_PROTOCOL:
msg.AddInt32("im_what", IM_MESSAGE_SENT); UnsupportedOperation();
msg.AddString("protocol", kProtocolName); break;
msg.AddString("id", buddy); default:
msg.AddString("message", sms); return B_ERROR;
}
gServerMsgr->SendMessage(&msg); break;
break; }
} default:
case IM_REGISTER_CONTACTS: // We don't handle this what code
{ return B_ERROR;
const char* buddy = NULL; }
char *buddy_copy;
for (int i = 0;
msg->FindString("id", i, &buddy) == B_OK;
i++) {
buddy_copy = strdup(buddy);
imcomm_im_add_buddy(fIMCommHandle, buddy_copy);
free(buddy_copy);
}
break;
}
case IM_UNREGISTER_CONTACTS:
{
const char* buddy = NULL;
for (int i = 0;
msg->FindString("id", i, &buddy) == B_OK;
i++) {
imcomm_im_remove_buddy(fIMCommHandle, buddy);
}
break;
}
case IM_USER_STARTED_TYPING:
{
// UnsupportedOperation();
break;
}
case IM_USER_STOPPED_TYPING:
{
// UnsupportedOperation();
break;
}
case IM_GET_CONTACT_INFO:
UnsupportedOperation();
break;
case IM_SEND_AUTH_ACK:
{
UnsupportedOperation();
break;
}
case IM_SPECIAL_TO_PROTOCOL:
UnsupportedOperation();
break;
default:
msg->PrintToStream();
return B_ERROR;
}
break;
}
default:
// We don't handle this what code
return B_ERROR;
}
return B_OK; return B_OK;
} }
void void
AIMProtocol::UnsupportedOperation() { AIMProtocol::UnsupportedOperation()
printf("noop\n"); {
} }
const char* const char*
AIMProtocol::GetSignature() AIMProtocol::GetSignature()
{ {
@ -220,7 +191,7 @@ AIMProtocol::GetSignature()
const char* const char*
AIMProtocol::GetFriendlySignature() AIMProtocol::GetFriendlySignature()
{ {
return "AOL Instant Messenger"; return "AOL Instant Messenger";
} }
@ -232,20 +203,20 @@ AIMProtocol::UpdateSettings(BMessage& msg)
msg.FindString("username", &username); msg.FindString("username", &username);
msg.FindString("password", &password); msg.FindString("password", &password);
// msg.FindString("server", &server); //msg->FindString("server", &server);
// msg.FindInt32("port", &server); //msg->FindInt32("port", &server);
if ((username == NULL) || (password == NULL)) { if ((username == NULL) || (password == NULL)) {
//LOG( kProtocolName, liHigh, "Invalid settings!");
printf("Invalid settings"); printf("Invalid settings");
return B_ERROR; return B_ERROR;
} }
if ((fUsername != username) || (fPassword != password)) { if ((fUsername != username) || (fPassword != password)) {
fUsername = username; fUsername = username;
fPassword = password; fPassword = password;
// XXX kill the handle and sign back in? // XXX kill the handle and sign back in?
} }
return B_OK; return B_OK;
} }
@ -261,160 +232,163 @@ status_t
AIMProtocol::A_LogOn() AIMProtocol::A_LogOn()
{ {
int ret = imcomm_im_signon(fIMCommHandle, fUsername, fPassword); int ret = imcomm_im_signon(fIMCommHandle, fUsername, fPassword);
printf("ret: %d\n", ret);
if (ret == IMCOMM_RET_OK) { if (ret == IMCOMM_RET_OK) {
fIMCommThread = spawn_thread(WaitForData, "imcomm receiver", fIMCommThread = spawn_thread(WaitForData, "imcomm receiver",
B_LOW_PRIORITY, this); B_LOW_PRIORITY, this);
resume_thread(fIMCommThread); resume_thread(fIMCommThread);
fOnline = true; fOnline = true;
return B_OK; return B_OK;
} }
return B_ERROR;
return B_ERROR;
} }
status_t status_t
AIMProtocol::LogOff() AIMProtocol::LogOff()
{ {
fOnline = false; fOnline = false;
imcomm_delete_handle_now(fIMCommHandle); imcomm_delete_handle_now(fIMCommHandle);
return B_OK; return B_OK;
} }
int32 int32
AIMProtocol::WaitForData(void *aimProtocol) { AIMProtocol::WaitForData(void* aimProtocol)
// XXX No need for aimProtocol since imcomm does its own callback thing {
printf("wait\n"); // XXX No need for aimProtocol since imcomm does its own callback thing
fd_set readset; fd_set readset;
struct timeval tm; struct timeval tm;
while (1) { while (1) {
FD_ZERO(&readset); FD_ZERO(&readset);
tm.tv_sec = 2; tm.tv_sec = 2;
tm.tv_usec = 500000; tm.tv_usec = 500000;
IMCOMM_RET ret = imcomm_select(1, &readset, NULL, NULL, &tm); IMCOMM_RET ret = imcomm_select(1, &readset, NULL, NULL, &tm);
if (ret != IMCOMM_RET_OK && errno == EINTR) continue; if (ret != IMCOMM_RET_OK && errno == EINTR)
} continue;
}
return 0; return 0;
} }
void void
AIMProtocol::GotMessage(void *imcomm, char *who, int auto, char *recvmsg) { AIMProtocol::GotMessage(void* imcomm, char* who, int auto, char* recvmsg)
BMessage msg(IM_MESSAGE); {
msg.AddInt32("im_what", IM_MESSAGE_RECEIVED); BMessage msg(IM_MESSAGE);
msg.AddString("protocol", kProtocolName); msg.AddInt32("im_what", IM_MESSAGE_RECEIVED);
msg.AddString("id", who); msg.AddString("protocol", kProtocolName);
msg.AddString("message", strip_html(recvmsg)); msg.AddString("id", who);
msg.AddString("message", strip_html(recvmsg));
gServerMsgr->SendMessage(&msg); gServerMsgr->SendMessage(&msg);
} }
void void
AIMProtocol::BuddyOnline(void *imcomm, char *who) { AIMProtocol::BuddyOnline(void* imcomm, char* who)
BMessage msg(IM_MESSAGE); {
msg.AddInt32("im_what", IM_STATUS_CHANGED); BMessage msg(IM_MESSAGE);
msg.AddString("protocol", kProtocolName); msg.AddInt32("im_what", IM_STATUS_CHANGED);
msg.AddString("id", who); msg.AddString("protocol", kProtocolName);
msg.AddInt32("status", CAYA_ONLINE); msg.AddString("id", who);
msg.AddInt32("status", CAYA_ONLINE);
gServerMsgr->SendMessage(&msg); gServerMsgr->SendMessage(&msg);
} }
void void
AIMProtocol::BuddyOffline(void *imcomm, char *who) { AIMProtocol::BuddyOffline(void* imcomm, char* who)
BMessage msg(IM_MESSAGE); {
msg.AddInt32("im_what", IM_STATUS_CHANGED); BMessage msg(IM_MESSAGE);
msg.AddInt32("im_what", IM_STATUS_CHANGED);
msg.AddString("protocol", kProtocolName);
msg.AddString("id", who);
msg.AddInt32("status", CAYA_OFFLINE);
msg.AddString("protocol", kProtocolName); gServerMsgr->SendMessage(&msg);
msg.AddString("id", who);
msg.AddInt32("status", CAYA_OFFLINE);
gServerMsgr->SendMessage(&msg);
} }
void void
AIMProtocol::BuddyAway(void *imcomm, char *who) { AIMProtocol::BuddyAway(void* imcomm, char* who)
imcomm_request_awaymsg(imcomm, who); {
imcomm_request_awaymsg(imcomm, who);
} }
void void
AIMProtocol::BuddyBack(void *imcomm, char *who) { AIMProtocol::BuddyBack(void* imcomm, char* who)
BMessage msg(IM_MESSAGE); {
msg.AddInt32("im_what", IM_STATUS_CHANGED); BMessage msg(IM_MESSAGE);
msg.AddString("protocol", kProtocolName); msg.AddInt32("im_what", IM_STATUS_CHANGED);
msg.AddString("id", who); msg.AddString("protocol", kProtocolName);
msg.AddInt32("status", CAYA_ONLINE); msg.AddString("id", who);
msg.AddInt32("status", CAYA_ONLINE);
gServerMsgr->SendMessage(&msg); gServerMsgr->SendMessage(&msg);
} }
void void
AIMProtocol::BuddyAwayMsg(void *imcomm, char *who, char *awaymsg) { AIMProtocol::BuddyAwayMsg(void* imcomm, char* who, char* awaymsg)
BMessage msg(IM_MESSAGE); {
BMessage msg(IM_MESSAGE);
msg.AddInt32("im_what", IM_STATUS_CHANGED);
msg.AddString("protocol", kProtocolName);
msg.AddString("id", who);
msg.AddInt32("status", CAYA_EXTENDED_AWAY);
msg.AddString("message", strip_html(awaymsg));
msg.AddInt32("im_what", IM_STATUS_CHANGED); gServerMsgr->SendMessage(&msg);
msg.AddString("protocol", kProtocolName);
msg.AddString("id", who);
msg.AddInt32("status", CAYA_EXTENDED_AWAY);
msg.AddString("message", strip_html(awaymsg));
gServerMsgr->SendMessage(&msg);
} }
void void
AIMProtocol::BuddyIdle(void *imcomm, char *who, long idletime) { AIMProtocol::BuddyIdle(void* imcomm, char* who, long idletime)
BMessage msg(IM_MESSAGE); {
msg.AddInt32("im_what", IM_STATUS_CHANGED); BMessage msg(IM_MESSAGE);
msg.AddString("protocol", kProtocolName); msg.AddInt32("im_what", IM_STATUS_CHANGED);
msg.AddString("id", who); msg.AddString("protocol", kProtocolName);
msg.AddInt32("status", CAYA_ONLINE); msg.AddString("id", who);
msg.AddInt32("status", CAYA_ONLINE);
gServerMsgr->SendMessage(&msg);
gServerMsgr->SendMessage(&msg);
} }
void void
AIMProtocol::BuddyProfile(void *handle, char *who, char *profile) { AIMProtocol::BuddyProfile(void* handle, char* who, char* profile)
// XXX vcard is probably an issue {
// XXX vcard is probably an issue
} }
char * char *
AIMProtocol::strip_html(const char *message) AIMProtocol::strip_html(const char* message)
{ {
char *temp; char* temp;
int x, xnot, y, count, inhtml; uint32 x, xnot, y, count, inhtml;
size_t len = strlen(message); size_t len = strlen(message);
temp = (char*)malloc(len + 1); temp = (char*)malloc(len + 1);
for (x = 0, count = 0, inhtml = 0; x < len; x++) { for (x = 0, count = 0, inhtml = 0; x < len; x++) {
if (message[x] == '<' && inhtml == 0) { if (message[x] == '<' && inhtml == 0) {
if (x + 10 < len) { if (x + 10 < len) {
// Convert links into [http://url] link text
/**
** Convert links into
** [http://url] link text
**/
if (strncasecmp(message + x, "<a href=\"", 9) == 0) { if (strncasecmp(message + x, "<a href=\"", 9) == 0) {
xnot = x + 9; xnot = x + 9;
for (y = xnot; y < len; y++) { for (y = xnot; y < len; y++) {
if (message[y] == '\"') { if (message[y] == '\"') {
/* // We don't have to worry about the buffer size,
* we don't have to // because it's guaranteed to be bigger
* worry about the
* buffer size,
* because it's
* guaranteed to be
* bigger
*/
memcpy(temp + count, "[", 1); memcpy(temp + count, "[", 1);
memcpy(temp + count + 1, message + xnot, memcpy(temp + count + 1, message + xnot,
y - xnot); y - xnot);
@ -426,6 +400,7 @@ AIMProtocol::strip_html(const char *message)
} }
} }
} }
if (x + 3 < len) { if (x + 3 < len) {
if (strncasecmp(message + x, "<br>", 4) == 0) { if (strncasecmp(message + x, "<br>", 4) == 0) {
temp[count] = '\n'; temp[count] = '\n';
@ -434,15 +409,18 @@ AIMProtocol::strip_html(const char *message)
continue; continue;
} }
} }
inhtml = 1; inhtml = 1;
continue; continue;
} }
if (inhtml) { if (inhtml) {
if (message[x] == '>') if (message[x] == '>')
inhtml = 0; inhtml = 0;
continue; continue;
} }
if (message[x] == '&') { if (message[x] == '&') {
if (x + 4 < len) { if (x + 4 < len) {
if (strncmp(message + x, "&amp;", 5) == 0) { if (strncmp(message + x, "&amp;", 5) == 0) {
@ -452,6 +430,7 @@ AIMProtocol::strip_html(const char *message)
continue; continue;
} }
} }
if (x + 5 < len) { if (x + 5 < len) {
if (strncmp(message + x, "&quot;", 6) == 0) { if (strncmp(message + x, "&quot;", 6) == 0) {
temp[count] = '\"'; temp[count] = '\"';
@ -459,6 +438,7 @@ AIMProtocol::strip_html(const char *message)
x += 5; x += 5;
continue; continue;
} }
if (strncmp(message + x, "&nbsp;", 6) == 0) { if (strncmp(message + x, "&nbsp;", 6) == 0) {
temp[count] = ' '; temp[count] = ' ';
count++; count++;
@ -466,6 +446,7 @@ AIMProtocol::strip_html(const char *message)
continue; continue;
} }
} }
if (x + 3 < len) { if (x + 3 < len) {
if (strncmp(message + x, "&lt;", 4) == 0) { if (strncmp(message + x, "&lt;", 4) == 0) {
temp[count] = '<'; temp[count] = '<';
@ -474,6 +455,7 @@ AIMProtocol::strip_html(const char *message)
continue; continue;
} }
} }
if (x + 3 < len) { if (x + 3 < len) {
if (strncmp(message + x, "&gt;", 4) == 0) { if (strncmp(message + x, "&gt;", 4) == 0) {
temp[count] = '>'; temp[count] = '>';
@ -483,6 +465,7 @@ AIMProtocol::strip_html(const char *message)
} }
} }
} }
if (message[x] == '\n' || message[x] == '\r') if (message[x] == '\n' || message[x] == '\r')
continue; continue;
else else

View File

@ -1,9 +1,9 @@
/* /*
* Copyright 2004-2009, IM Kit Team. All rights reserved. * Copyright 2010, Alexander Botero-Lowry. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef IMKIT_AIM_H #ifndef _AIM_H
#define IMKIT_AIM_H #define _AIM_H
#include <List.h> #include <List.h>
#include <Messenger.h> #include <Messenger.h>
@ -16,43 +16,43 @@
class AIMProtocol : public CayaProtocol { class AIMProtocol : public CayaProtocol {
public: public:
AIMProtocol(); AIMProtocol();
virtual ~AIMProtocol(); virtual ~AIMProtocol();
virtual status_t Init( CayaProtocolMessengerInterface* ); virtual status_t Init(CayaProtocolMessengerInterface* messenger);
virtual status_t Shutdown();
virtual status_t Process( BMessage * );
virtual const char * GetSignature();
virtual const char * GetFriendlySignature();
virtual status_t UpdateSettings( BMessage & );
virtual uint32 GetEncoding();
static int32 WaitForData(void *); virtual status_t Shutdown();
virtual status_t Process(BMessage*);
static void GotMessage(void *, char *, int, char *); virtual const char* GetSignature();
static void BuddyOnline(void *, char *); virtual const char* GetFriendlySignature();
static void BuddyOffline(void *, char *); virtual status_t UpdateSettings(BMessage&);
static void BuddyAway(void *, char *); virtual uint32 GetEncoding();
static void BuddyBack(void *, char *);
static void BuddyAwayMsg(void *, char *, char *);
static void BuddyIdle(void *, char *, long);
static void BuddyProfile(void *, char *, char *);
static int32 WaitForData(void*);
static void GotMessage(void*, char*, int, char*);
BString fUsername; static void BuddyOnline(void*, char*);
BString fPassword; static void BuddyOffline(void*, char*);
bool fOnline; static void BuddyAway(void*, char*);
thread_id fIMCommThread; static void BuddyBack(void*, char*);
static void BuddyAwayMsg(void*, char*, char*);
void * fIMCommHandle; static void BuddyIdle(void*, char*, long);
static void BuddyProfile(void*, char*, char*);
protected: protected:
status_t A_LogOn(); status_t A_LogOn();
status_t LogOff(); status_t LogOff();
void UnsupportedOperation(); void UnsupportedOperation();
static char * strip_html (const char *message);
static char* strip_html(const char* message);
private:
BString fUsername;
BString fPassword;
bool fOnline;
thread_id fIMCommThread;
void* fIMCommHandle;
}; };
#endif // IMKIT_AIM_H #endif // _AIM_H

View File

@ -2,7 +2,7 @@
resource app_version { resource app_version {
major = 0, major = 0,
middle = 0, middle = 0,
minor = 0, minor = 1,
variety = B_APPV_ALPHA, variety = B_APPV_ALPHA,
internal = 0, internal = 0,
@ -12,23 +12,13 @@ resource app_version {
}; };
resource vector_icon { resource vector_icon {
$"6E636966080501040046020106023E40000000000000003D4000494000470000" $"6E636966050501020106023E40000000000000003E4000490000490000FFFFCC"
$"7EFFFFFFFFE5E1DA02000602000000BBC0004000000000009220244AF0000000" $"007FFFFF00020106023B80000000000000003B80004A6000460000FFFFCC007C"
$"33CCFC3366FF02000602000000BA000040000000000092202448800000336699" $"FFFF00020112023AD09E3A55D0BD34993DDD2B49C9E2492C1BFFFF007AFFD102"
$"FF6699CC02000602000000B9000040000000000092202448E00000CC0000FFFF" $"0112023C80000000000000003C80004A0000420000FFFF007AFFD102060CFFBB"
$"000002000602000000BA000040000000000092202448800000FF9900FFFBFF00" $"B348464846524A5C5A56505C5A525E525E505A405048503A56265C305C265C24"
$"02000602000000BA000040000000000092202448800000006600FF00CC000A02" $"5238443850383A4034483A483A4C3C5C5C425C425844484402044A22C18022C5"
$"06C22622C7562239222E342E2B2E3D4146364441483C50404C3C504A444A4E55" $"F722542C54B58C54BA034A36C5F736C18036402C40BA0340B58C060A00010010"
$"44CBB634CBB83E5E2A0206C22622C7562239222E342E2B2E3D4146364441483C" $"01178400040A0001011001178400040A010100000A020101000A030100100115"
$"50404C3C504C464A505744CBB634CBB83E5E2A02024C265928532A583B59335D" $"7F00040A0401011001157F0004"
$"350610CAFFFEAF375335543B3B5A3B5A395D325D355D2C5D274F275627483241"
$"2C413541BDA7C2A83942BDA7C2A8394A3F463F463C40324036402A40234F2346"
$"2358325E2A5E395EBF5C5A3F5CBF5C5A3F544053080234313C310404FE372C37"
$"393739373A393B383B3A3B3B393B3A3B390406FE0B4536403640363F363E383E"
$"373E383E393E393E3A403B3F3B413B453A0405FE03453C453445344533433244"
$"324332403240323F323E343E333E3408024D2C4D3C0803553C4F3655300D0A00"
$"01001001178400040A020101000A010102000A0101032021210A010204053021"
$"2101178200040A0102070630212101178200040A010108301D2101178200040A"
$"0102090830212101178200040A030103000A040204051001178200040A050207"
$"061001178200040A060108301C2001178200040A07020908100117820004"
}; };

View File

@ -1,8 +1,13 @@
/*
* Copyright 2010, Alexander Botero-Lowry. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "AIM.h" #include "AIM.h"
extern "C" __declspec(dllexport) CayaProtocol *main_protocol (); extern "C" __declspec(dllexport) CayaProtocol *main_protocol();
CayaProtocol *main_protocol () CayaProtocol *main_protocol()
{ {
return (CayaProtocol *)(new AIMProtocol()); return (CayaProtocol*)new AIMProtocol();
} }