diff options
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/messages.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/process.cpp | 14 | ||||
-rw-r--r-- | protocols/FacebookRM/proto.cpp | 11 | ||||
-rw-r--r-- | protocols/FacebookRM/stubs.cpp | 36 |
4 files changed, 30 insertions, 34 deletions
diff --git a/protocols/FacebookRM/messages.cpp b/protocols/FacebookRM/messages.cpp index 1f6d80a6d5..8b27b4721f 100644 --- a/protocols/FacebookRM/messages.cpp +++ b/protocols/FacebookRM/messages.cpp @@ -34,8 +34,7 @@ int FacebookProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre) CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
- CCSDATA ccs = { hContact,PSR_MESSAGE,0,reinterpret_cast<LPARAM>(pre) };
- return CallService(MS_PROTO_RECVMSG,0,reinterpret_cast<LPARAM>(&ccs));
+ return Proto_RecvMessage(hContact, pre);
}
void FacebookProto::SendMsgWorker(void *p)
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp index f1481ba8ad..1691fcda08 100644 --- a/protocols/FacebookRM/process.cpp +++ b/protocols/FacebookRM/process.cpp @@ -597,16 +597,16 @@ void FacebookProto::ProcessFriendRequests( void* ) dbei.timestamp = ::time( NULL );
dbei.flags = DBEF_UTF;
dbei.eventType = EVENTTYPE_AUTHREQUEST;
- dbei.cbBlob = (DWORD)(sizeof( DWORD )+ sizeof( HANDLE ) + fbu->real_name.length() + 5);
+ dbei.cbBlob = (DWORD)(sizeof( DWORD )*2 + fbu->real_name.length() + 5);
PBYTE pCurBlob = dbei.pBlob = ( PBYTE ) mir_alloc( dbei.cbBlob );
- *(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
- *(PHANDLE)pCurBlob = hContact; pCurBlob += sizeof(HANDLE); // Contact Handle
+ *(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
+ *(PDWORD)pCurBlob = (DWORD)hContact; pCurBlob += sizeof(DWORD); // Contact Handle
strcpy((char*)pCurBlob, fbu->real_name.data()); pCurBlob += fbu->real_name.length()+1; // Nickname
- *pCurBlob = '\0'; pCurBlob++; // First Name
- *pCurBlob = '\0'; pCurBlob++; // Last Name
- *pCurBlob = '\0'; pCurBlob++; // E-mail
- *pCurBlob = '\0'; // Reason
+ *pCurBlob = '\0'; pCurBlob++; // First Name
+ *pCurBlob = '\0'; pCurBlob++; // Last Name
+ *pCurBlob = '\0'; pCurBlob++; // E-mail
+ *pCurBlob = '\0'; // Reason
CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
diff --git a/protocols/FacebookRM/proto.cpp b/protocols/FacebookRM/proto.cpp index cc5f446662..c2d7a39151 100644 --- a/protocols/FacebookRM/proto.cpp +++ b/protocols/FacebookRM/proto.cpp @@ -566,12 +566,9 @@ int FacebookProto::OnCancelFriendshipRequest(WPARAM wParam,LPARAM lParam) HANDLE FacebookProto::HContactFromAuthEvent(HANDLE hEvent)
{
- DBEVENTINFO dbei;
- DWORD body[3];
-
- ZeroMemory(&dbei, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = sizeof(DWORD) + sizeof(HANDLE);
+ DWORD body[2];
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ dbei.cbBlob = sizeof(DWORD)*2;
dbei.pBlob = (PBYTE)&body;
if (CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbei))
@@ -583,5 +580,5 @@ HANDLE FacebookProto::HContactFromAuthEvent(HANDLE hEvent) if (strcmp(dbei.szModule, m_szModuleName))
return INVALID_HANDLE_VALUE;
- return *(HANDLE*)&body[1]; // this is bad - needs new auth system
+ return DbGetAuthEventContact(&dbei);
}
diff --git a/protocols/FacebookRM/stubs.cpp b/protocols/FacebookRM/stubs.cpp index 6237a39129..25d3f45252 100644 --- a/protocols/FacebookRM/stubs.cpp +++ b/protocols/FacebookRM/stubs.cpp @@ -24,38 +24,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HANDLE FacebookProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
- return 0;
+ return NULL;
}
int FacebookProto::AuthRecv(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
HANDLE FacebookProto::ChangeInfo(int type,void *info_data)
{
MessageBoxA(0,"ChangeInfo","",0);
- return 0;
+ return NULL;
}
HANDLE FacebookProto::FileAllow(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
- return 0;
+ return NULL;
}
int FacebookProto::FileCancel(HANDLE hContact,HANDLE hTransfer)
{
- return 0;
+ return 1;
}
int FacebookProto::FileDeny(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
- return 0;
+ return 1;
}
int FacebookProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filename)
{
- return 0;
+ return 1;
}
int FacebookProto::GetInfo( HANDLE hContact, int infoType )
@@ -66,55 +66,55 @@ int FacebookProto::GetInfo( HANDLE hContact, int infoType ) HWND FacebookProto::SearchAdvanced(HWND owner)
{
- return 0;
+ return NULL;
}
HWND FacebookProto::CreateExtendedSearchUI(HWND owner)
{
- return 0;
+ return NULL;
}
int FacebookProto::RecvContacts(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int FacebookProto::RecvFile(HANDLE hContact,PROTORECVFILET *)
{
- return 0;
+ return 1;
}
int FacebookProto::RecvUrl(HANDLE hContact,PROTORECVEVENT *)
{
- return 0;
+ return 1;
}
int FacebookProto::SendContacts(HANDLE hContact,int flags,int nContacts,HANDLE *hContactsList)
{
- return 0;
+ return 1;
}
HANDLE FacebookProto::SendFile(HANDLE hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
- return 0;
+ return NULL;
}
int FacebookProto::SendUrl(HANDLE hContact,int flags,const char *url)
{
- return 0;
+ return 1;
}
int FacebookProto::SetApparentMode(HANDLE hContact,int mode)
{
- return 0;
+ return 1;
}
int FacebookProto::RecvAwayMsg(HANDLE hContact,int mode,PROTORECVEVENT *evt)
{
- return 0;
+ return 1;
}
int FacebookProto::SendAwayMsg(HANDLE hContact,HANDLE hProcess,const char *msg)
{
- return 0;
+ return 1;
}
|