libmsn: /home/salem/libmsn/tags/libmsn-4.2/msn/externals.h Source File

libmsn 4.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

/home/salem/libmsn/tags/libmsn-4.2/msn/externals.h

    00001 #ifndef __msn_externals_h__
    00002 #define __msn_externals_h__
    00003
    00004 /*
    00005  * externals.h
    00006  * libmsn
    00007  *
    00008  * Created by Meredydd Luff.
    00009  * Refactored by Tiago Salem Herrmann.
    00010  * Copyright (c) 2004 Meredydd Luff. All rights reserved.
    00011  * Copyright (c) 2007 Tiago Salem Herrmann. All rights reserved
    00012  *
    00013  * This program is free software; you can redistribute it and/or modify
    00014  * it under the terms of the GNU General Public License as published by
    00015  * the Free Software Foundation; either version 2 of the License, or
    00016  * (at your option) any later version.
    00017  *
    00018  * This program is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00021  * GNU General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU General Public License
    00024  * along with this program; if not, write to the Free Software
    00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00026  */
    00027
    00028 #include <msn/config.h>
    00029 #include <msn/buddy.h>
    00030 #include <msn/util.h>
    00031
    00032 #include "libmsn_export.h"
    00033
    00034 namespace MSN
    00035 {
    00036     class ListSyncInfo;
    00040     class LIBMSN_EXPORT Callbacks
    00041     {
    00042     public:
    00043
    00047         virtual void registerSocket(void *sock, int read, int write, bool isSSL) = 0;
    00048
    00051         virtual void unregisterSocket(void *sock) = 0;
    00052
    00055         virtual void closeSocket(void *sock) = 0;
    00056
    00059         virtual void showError(MSN::Connection * conn, std::string msg) = 0;
    00060
    00066         virtual void buddyChangedStatus(MSN::NotificationServerConnection * conn, MSN::Passport buddy, std::string friendlyname, MSN::BuddyStatus state, unsigned int clientID, std::string msnobject) = 0;
    00067
    00070         virtual void buddyOffline(MSN::NotificationServerConnection * conn, MSN::Passport buddy) = 0;
    00071
    00074         virtual void log(int writing, const char* buf) = 0;
    00075
    00079         virtual void gotFriendlyName(MSN::NotificationServerConnection * conn, std::string friendlyname) = 0;
    00080
    00086         virtual void gotBuddyListInfo(MSN::NotificationServerConnection * conn, MSN::ListSyncInfo * data) = 0;
    00087
    00092         virtual void buddyChangedPersonalInfo(MSN::NotificationServerConnection * conn, MSN::Passport fromPassport, MSN::personalInfo pInfo) = 0;
    00093
    00102         virtual void gotLatestListSerial(MSN::NotificationServerConnection * conn, std::string lastChange) = 0;
    00103
    00106         virtual void gotGTC(MSN::NotificationServerConnection * conn, char c) = 0;
    00107
    00108
    00111         virtual void gotBLP(MSN::NotificationServerConnection * conn, char c) = 0;
    00112
    00118         virtual void addedListEntry(MSN::NotificationServerConnection * conn, MSN::ContactList list, MSN::Passport buddy, std::string friendlyname) = 0;
    00119
    00124         virtual void removedListEntry(MSN::NotificationServerConnection * conn, MSN::ContactList list, MSN::Passport buddy) = 0;
    00125
    00130         virtual void addedGroup(MSN::NotificationServerConnection * conn, bool added, std::string groupName, std::string groupId) = 0;
    00131
    00135         virtual void removedGroup(MSN::NotificationServerConnection * conn, bool removed, std::string groupId) = 0;
    00136
    00139         virtual void renamedGroup(MSN::NotificationServerConnection * conn, bool renamed, std::string newGroupName, std::string groupId) = 0;
    00140
    00144         virtual void addedContactToGroup(MSN::NotificationServerConnection * conn, bool added, std::string groupId, std::string contactId) = 0;
    00145
    00149         virtual void removedContactFromGroup(MSN::NotificationServerConnection * conn, bool removed, std::string groupId, std::string contactId) = 0;
    00150
    00154         virtual void addedContactToAddressBook(MSN::NotificationServerConnection * conn, bool added, std::string passport, std::string displayName, std::string guid) = 0;
    00155
    00159         virtual void removedContactFromAddressBook(MSN::NotificationServerConnection * conn, bool removed, std::string contactId, std::string passport) = 0;
    00160
    00164         virtual void enabledContactOnAddressBook(MSN::NotificationServerConnection * conn, bool enabled, std::string contactId, std::string passport) = 0;
    00165
    00169         virtual void disabledContactOnAddressBook(MSN::NotificationServerConnection * conn, bool disabled, std::string contactId) = 0;
    00170
    00173         virtual void gotSwitchboard(MSN::SwitchboardServerConnection * conn, const void * tag) = 0;
    00174
    00177         virtual void buddyJoinedConversation(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname, int is_initial) = 0;
    00178
    00181         virtual void buddyLeftConversation(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy) = 0;
    00182
    00185         virtual void gotInstantMessage(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname, MSN::Message * msg) = 0;
    00186
    00189         virtual void gotMessageSentACK(MSN::SwitchboardServerConnection * conn, int trID) = 0;
    00190
    00194         virtual void gotEmoticonNotification(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string alias, std::string msnobject) = 0;
    00195
    00198         virtual void failedSendingMessage(MSN::Connection * conn) = 0;
    00199
    00202         virtual void gotNudge(MSN::SwitchboardServerConnection * conn, MSN::Passport username) = 0;
    00203
    00207         virtual void gotVoiceClipNotification(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string msnobject) = 0;
    00208
    00212         virtual void gotWinkNotification(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string msnobject) = 0;
    00213
    00216         virtual void gotInk(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string image) = 0;
    00217
    00220         virtual void gotActionMessage(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string message) = 0;
    00221
    00224         virtual void buddyTyping(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname) = 0;
    00225
    00228         virtual void gotInitialEmailNotification(MSN::NotificationServerConnection * conn, int msgs_inbox, int unread_inbox, int msgs_folders, int unread_folders) = 0;
    00229
    00232         virtual void gotNewEmailNotification(MSN::NotificationServerConnection * conn, std::string from, std::string subject) = 0;
    00233
    00236         virtual void fileTransferProgress(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, long long unsigned transferred, long long unsigned total) = 0;
    00237
    00240         virtual void fileTransferFailed(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, MSN::fileTransferError error) = 0;
    00241
    00244         virtual void fileTransferSucceeded(MSN::SwitchboardServerConnection * conn, unsigned int sessionID) = 0;
    00245
    00250         virtual void fileTransferInviteResponse(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, bool response) = 0;
    00251
    00254         virtual void gotVoiceClipFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string file) = 0;
    00255
    00258         virtual void gotEmoticonFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string alias, std::string file) = 0;
    00259
    00262         virtual void gotWinkFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string file) = 0;
    00263
    00266         virtual void gotNewConnection(MSN::Connection * conn) = 0;
    00267
    00270         virtual void gotOIMList(MSN::NotificationServerConnection * conn, std::vector<MSN::eachOIM> OIMs) = 0;
    00271
    00274         virtual void gotOIM(MSN::NotificationServerConnection * conn, bool success, std::string id, std::string message) = 0;
    00275
    00278         virtual void gotOIMSendConfirmation(MSN::NotificationServerConnection * conn, bool success, int id) = 0;
    00279
    00282         virtual void gotOIMDeleteConfirmation(MSN::NotificationServerConnection * conn, bool success, std::string id) = 0;
    00283
    00286         virtual void gotContactDisplayPicture(MSN::SwitchboardServerConnection * conn, MSN::Passport passport, std::string filename ) = 0;
    00287
    00290         virtual void connectionReady(MSN::Connection * conn) = 0;
    00291
    00294         virtual void closingConnection(MSN::Connection * conn) = 0;
    00295
    00299         virtual void changedStatus(MSN::NotificationServerConnection * conn, MSN::BuddyStatus state) = 0;
    00300
    00305         virtual void * connectToServer(std::string server, int port, bool *connected, bool isSSL = false) = 0;
    00306
    00309         virtual void askFileTransfer(MSN::SwitchboardServerConnection *conn, MSN::fileTransferInvite ft) = 0;
    00310
    00311         virtual int listenOnPort(int port) = 0;
    00312
    00313         virtual std::string getOurIP() = 0;
    00314
    00315         virtual std::string getSecureHTTPProxy() = 0;
    00316
    00317         virtual int getSocketFileDescriptor (void *sock) = 0;
    00318
    00323         virtual size_t getDataFromSocket (void *sock, char *data, size_t size) = 0;
    00324
    00328         virtual size_t writeDataToSocket (void *sock, char *data, size_t size) = 0;
    00329
    00330         virtual void gotInboxUrl (MSN::NotificationServerConnection * /*conn*/, MSN::hotmailInfo /*info*/) {};
    00331     };
    00332 }
    00333 #endif

All Classes Namespaces Functions Variables Enumerations Enumerator