Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

externals.h

Go to the documentation of this file.
00001 #ifndef __msn_externals_h__
00002 #define __msn_externals_h__
00003 
00004 /*
00005  * externals.h
00006  * libmsn
00007  *
00008  * Created by Meredydd Luff.
00009  * Copyright (c) 2004 Meredydd Luff. All rights reserved.
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  */
00025 
00026 #include <msn/buddy.h>
00027 
00028 namespace MSN
00029 {
00030     class ListSyncInfo;
00031     
00032     class Callbacks
00033     {
00034     public:
00035         virtual void registerSocket(int s, int read, int write) = 0;
00036         virtual void unregisterSocket(int s) = 0;
00037         
00038         virtual void showError(MSN::Connection * conn, std::string msg) = 0;
00039         
00040         virtual void buddyChangedStatus(MSN::Connection * conn, MSN::Passport buddy, std::string friendlyname, MSN::BuddyStatus state) = 0;
00041         virtual void buddyOffline(MSN::Connection * conn, MSN::Passport buddy) = 0;
00042         
00043         virtual void log(int writing, const char* buf) = 0;
00044         
00045         virtual void gotFriendlyName(MSN::Connection * conn, std::string friendlyname) = 0;
00046         virtual void gotBuddyListInfo(MSN::NotificationServerConnection * conn, MSN::ListSyncInfo * data) = 0;
00047         virtual void gotLatestListSerial(MSN::Connection * conn, int serial) = 0;
00048         virtual void gotGTC(MSN::Connection * conn, char c) = 0;
00049         virtual void gotBLP(MSN::Connection * conn, char c) = 0;
00050         
00051         virtual void gotNewReverseListEntry(MSN::Connection * conn, MSN::Passport buddy, std::string friendlyname) = 0;
00052         
00053         virtual void addedListEntry(MSN::Connection * conn, std::string list, MSN::Passport buddy, int groupID) = 0;
00054         
00055         virtual void removedListEntry(MSN::Connection * conn, std::string list, MSN::Passport buddy, int groupID) = 0;
00056         
00057         virtual void addedGroup(MSN::Connection * conn, std::string groupName, int groupID) = 0;
00058         virtual void removedGroup(MSN::Connection * conn, int groupID) = 0;
00059         virtual void renamedGroup(MSN::Connection * conn, int groupID, std::string newGroupName) = 0;
00060         
00061         virtual void gotSwitchboard(MSN::SwitchboardServerConnection * conn, const void * tag) = 0;
00062         
00063         virtual void buddyJoinedConversation(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname, int is_initial) = 0;
00064         
00065         virtual void buddyLeftConversation(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy) = 0;
00066         
00067         virtual void gotInstantMessage(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname, MSN::Message * msg) = 0;
00068         
00069         virtual void failedSendingMessage(MSN::Connection * conn) = 0;
00070         
00071         virtual void buddyTyping(MSN::Connection * conn, MSN::Passport buddy, std::string friendlyname) = 0;
00072         
00073         virtual void gotInitialEmailNotification(MSN::Connection * conn, int unread_inbox, int unread_folders) = 0;
00074         
00075         virtual void gotNewEmailNotification(MSN::Connection * conn, std::string from, std::string subject) = 0;
00076         
00077         virtual void gotFileTransferInvitation(MSN::Connection * conn, MSN::Passport buddy, std::string friendlyname, MSN::FileTransferInvitation * inv) = 0;
00078         
00079         virtual void fileTransferProgress(MSN::FileTransferInvitation * inv, std::string status, unsigned long recv, unsigned long total) = 0;
00080         
00081         virtual void fileTransferFailed(MSN::FileTransferInvitation * inv, int error, std::string message) = 0;
00082         
00083         virtual void fileTransferSucceeded(MSN::FileTransferInvitation * inv) = 0;
00084         
00085         virtual void gotNewConnection(MSN::Connection * conn) = 0;
00086         
00087         virtual void closingConnection(MSN::Connection * conn) = 0;
00088         
00089         virtual void changedStatus(MSN::Connection * conn, MSN::BuddyStatus state) = 0;
00090         
00091         virtual int connectToServer(std::string server, int port, bool *connected) = 0;
00092         
00093         virtual int listenOnPort(int port) = 0;
00094         
00095         virtual std::string getOurIP() = 0;
00096         
00097         virtual std::string getSecureHTTPProxy() = 0;
00098     };
00099 }
00100 #endif

Generated on Sun Feb 6 19:59:40 2005 for libmsn by  doxygen 1.4.1