This file is indexed.

/usr/include/msn/externals.h is in libmsn-dev 4.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
#ifndef __msn_externals_h__
#define __msn_externals_h__

/*
 * externals.h
 * libmsn
 *
 * Created by Meredydd Luff.
 * Refactored by Tiago Salem Herrmann.
 * Copyright (c) 2004 Meredydd Luff. All rights reserved.
 * Copyright (c) 2007 Tiago Salem Herrmann. All rights reserved
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <msn/config.h>
#include <msn/buddy.h>
#include <msn/util.h>

#include "libmsn_export.h"

namespace MSN
{
    class ListSyncInfo;
    /** The application should implement these callback functions to 
     * be able to receive notifications from the library.
     */
    class LIBMSN_EXPORT Callbacks
    {
    public:

        /** Asks the application that libmsn only must to be notified when the
         * socket become readable and/or writable.
         */
        virtual void registerSocket(void *sock, int read, int write, bool isSSL) = 0;

        /** Asks the application to never notify libmsn again about events in the socket.
         */
        virtual void unregisterSocket(void *sock) = 0;

        /** Asks the application to close the socket
         */
        virtual void closeSocket(void *sock) = 0;
        
        /** Allow your application to be notified about errors on library layer 
        */
        virtual void showError(MSN::Connection * conn, std::string msg) = 0;

        /** Notifies the application about a buddy status change.
         * msnobject is the object describing avatar file.
         * To get it you should call requestDisplayPicture() on a switchboard
         * connection with this user.
         */
        virtual void buddyChangedStatus(MSN::NotificationServerConnection * conn, MSN::Passport buddy, std::string friendlyname, MSN::BuddyStatus state, unsigned int clientID, std::string msnobject) = 0;

        /** Notifies the application about a user who went offline
         */
        virtual void buddyOffline(MSN::NotificationServerConnection * conn, MSN::Passport buddy) = 0;
        
        /** Allow your application to log some network traffic
         */
        virtual void log(int writing, const char* buf) = 0;
        
        /** Notifies the application that your friendly name now is 'friendlyname'.
         * Probably this is the reply to a previous setFriendlyName() call.
         */
        virtual void gotFriendlyName(MSN::NotificationServerConnection * conn, std::string friendlyname) = 0;

        /** Notifies the application that you have received your lists
         * (Address Book, allow list, block list, reverse list and pending list)
         * You must call completeConnection on notification server connection to
         * complete the initial process. An example can be found in msntest.cpp
         */
        virtual void gotBuddyListInfo(MSN::NotificationServerConnection * conn, MSN::ListSyncInfo * data) = 0;

        /** Notifies the application that a contact has updated his/her personal info.
         * Example: Current Song, personal messages..
         * Check all the possibilities in MSN::personalInfo struct
         */
        virtual void buddyChangedPersonalInfo(MSN::NotificationServerConnection * conn, MSN::Passport fromPassport, MSN::personalInfo pInfo) = 0;

        /** Notifies the application that one change was made to your
         * lists, and the current timestamp is lastChange.
         * This number should be used on initial process to specify
         * what version of your lists you already have. If the server
         * version is not the same, it will provide only the diff between your
         * version and the current one.
         * THE PARTIAL LIST FETCH IS NOT WORKING YET.
         */
        virtual void gotLatestListSerial(MSN::NotificationServerConnection * conn, std::string lastChange) = 0;

        /** This is a response to a previous sent GTC command.
         */
        virtual void gotGTC(MSN::NotificationServerConnection * conn, char c) = 0;


        /** This is a response to a previous sent BLP command.
         */
        virtual void gotBLP(MSN::NotificationServerConnection * conn, char c) = 0;
       
        /** Notifies your application that some list was modified by adding
         * some new contact. If ContactList is MSN::LST_RL, it means someone
         * added you to its Address Book. So at this point the application should 
         * prompt to the user about adding or blocking this new contact.
         */
        virtual void addedListEntry(MSN::NotificationServerConnection * conn, MSN::ContactList list, MSN::Passport buddy, std::string friendlyname) = 0;

        /** Notifies your application that some list was modified by removing
         * some old contact. If ContactList is MSN::LST_RL, it means this contact
         * has removed you from its Address Book.
         */
        virtual void removedListEntry(MSN::NotificationServerConnection * conn, MSN::ContactList list, MSN::Passport buddy) = 0;

        /** Notifies your application that a new group was created, or not, depending on 
         * the 'added' boolean variable. The application should track the groupId to permorm
         * actions with it.
         */
        virtual void addedGroup(MSN::NotificationServerConnection * conn, bool added, std::string groupName, std::string groupId) = 0;

        /** Notifies your application that an old group was removed, or not, depending on
         * the 'removed' boolean variable.
         */
        virtual void removedGroup(MSN::NotificationServerConnection * conn, bool removed, std::string groupId) = 0;

        /** Notifies your application that an old group was renamed.
         */
        virtual void renamedGroup(MSN::NotificationServerConnection * conn, bool renamed, std::string newGroupName, std::string groupId) = 0;

        /** Notifies your application that a contact was added to a group, or not, depending on the
         * 'added' boolean variable.
         */
        virtual void addedContactToGroup(MSN::NotificationServerConnection * conn, bool added, std::string groupId, std::string contactId) = 0;

        /** Notifies your application that a contact was removed from a group, or not, depending on the
         * 'removed' boolean variable.
         */
        virtual void removedContactFromGroup(MSN::NotificationServerConnection * conn, bool removed, std::string groupId, std::string contactId) = 0;

        /** Notifies your application that a contact was added to the Address Book, or not, depending on the
         * 'added' boolean variable.
         */
        virtual void addedContactToAddressBook(MSN::NotificationServerConnection * conn, bool added, std::string passport, std::string displayName, std::string guid) = 0;

        /** Notifies your application that a contact was removed from the Address Book, or not, depending on the
         * 'removed' boolean variable.
         */
        virtual void removedContactFromAddressBook(MSN::NotificationServerConnection * conn, bool removed, std::string contactId, std::string passport) = 0;

        /** Notifies your application that a contact was enabled on Address Book, or not, depending on the
         * 'enabled' boolean variable.
         */
        virtual void enabledContactOnAddressBook(MSN::NotificationServerConnection * conn, bool enabled, std::string contactId, std::string passport) = 0;

        /** Notifies your application that a contact was disabled on Address Book, or not, depending on the
         * 'disabled' boolean variable.
         */
        virtual void disabledContactOnAddressBook(MSN::NotificationServerConnection * conn, bool disabled, std::string contactId) = 0;

        /** Notifies your application that you got a new switchboard connection
         */
        virtual void gotSwitchboard(MSN::SwitchboardServerConnection * conn, const void * tag) = 0;

        /** Notifies your application that a contact joined to a switchboard connection
         */
        virtual void buddyJoinedConversation(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname, int is_initial) = 0;

        /** Notifies your application that a contact left a switchboard connection
         */
        virtual void buddyLeftConversation(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy) = 0;

        /** Notifies your application that received an instant message
         */
        virtual void gotInstantMessage(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname, MSN::Message * msg) = 0;

        /** Notifies your application that the "trID" message was received by the other contact
         */
        virtual void gotMessageSentACK(MSN::SwitchboardServerConnection * conn, int trID) = 0;

        /** Notifies your application that received an emoticon notification. 
         * To get it you should call requestEmoticon() and pass msnobject to it
         */
        virtual void gotEmoticonNotification(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string alias, std::string msnobject) = 0;
            
        /** Notifies your application that a message could not be delivered
         */
        virtual void failedSendingMessage(MSN::Connection * conn) = 0;

        /** Notifies your application that you got a nudge
         */
        virtual void gotNudge(MSN::SwitchboardServerConnection * conn, MSN::Passport username) = 0;

        /** Notifies your application that you got a new voice clip.
         * To get it you should call requestVoiceClip() and pass msnobject to it
         */
        virtual void gotVoiceClipNotification(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string msnobject) = 0;

        /** Notifies your application that you got a new wink.
         * To get it you should call requestWink() and pass msnobject to it
         */
        virtual void gotWinkNotification(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string msnobject) = 0;

        /** Notifies your application that you got a new Ink.
         */
        virtual void gotInk(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string image) = 0;

        /** Notifies your application that you got an action.
         */
        virtual void gotActionMessage(MSN::SwitchboardServerConnection * conn, MSN::Passport username, std::string message) = 0;

        /** Notifies your application that a buddy is typing.
         */
        virtual void buddyTyping(MSN::SwitchboardServerConnection * conn, MSN::Passport buddy, std::string friendlyname) = 0;
            
        /** Notifies your application that you got an initial email notification.
         */
        virtual void gotInitialEmailNotification(MSN::NotificationServerConnection * conn, int msgs_inbox, int unread_inbox, int msgs_folders, int unread_folders) = 0;
            
        /** Notifies your application that you got an email notification.
         */
        virtual void gotNewEmailNotification(MSN::NotificationServerConnection * conn, std::string from, std::string subject) = 0;
            
        /** Notifies your application about a progress of a file transfer.
         */
        virtual void fileTransferProgress(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, long long unsigned transferred, long long unsigned total) = 0;
            
        /** Notifies your application that some file transfer has failed
         */
        virtual void fileTransferFailed(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, MSN::fileTransferError error) = 0;
            
        /** Notifies your application that some file transfer has succeeded.
         */
        virtual void fileTransferSucceeded(MSN::SwitchboardServerConnection * conn, unsigned int sessionID) = 0;

        /** Notifies your application that the other contact replied a file transfer
         * invitation. if "response" is true, then the other contact has accepted,
         * if false, rejected.
         */
        virtual void fileTransferInviteResponse(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, bool response) = 0;
            
        /** Notifies your application that the other contact sent you a voice clip
         */
        virtual void gotVoiceClipFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string file) = 0;
 
        /** Notifies your application that the other contact sent you an emoticon
         */
        virtual void gotEmoticonFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string alias, std::string file) = 0;

        /** Notifies your application that the other contact sent a wink
         */
        virtual void gotWinkFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string file) = 0;

        /** Notifies your application that there is a new connection
         */
        virtual void gotNewConnection(MSN::Connection * conn) = 0;
            
        /** Notifies your application that you got a new OIM list.
         */
        virtual void gotOIMList(MSN::NotificationServerConnection * conn, std::vector<MSN::eachOIM> OIMs) = 0;

        /** Notifies your application that you got (or not)  one previously requested OIM.
         */
        virtual void gotOIM(MSN::NotificationServerConnection * conn, bool success, std::string id, std::string message) = 0;

        /** Notifies your application if a previously sent OIM was delivered.
         */
        virtual void gotOIMSendConfirmation(MSN::NotificationServerConnection * conn, bool success, int id) = 0;

        /** Notifies your application if a previously request to delete one OIM was successful.
         */
        virtual void gotOIMDeleteConfirmation(MSN::NotificationServerConnection * conn, bool success, std::string id) = 0;

        /** Notifies your application that you got a new display picture from "passaport"
         */
        virtual void gotContactDisplayPicture(MSN::SwitchboardServerConnection * conn, MSN::Passport passport, std::string filename ) = 0;

        /** Notifies your application that the connection "conn" is ready
         */
        virtual void connectionReady(MSN::Connection * conn) = 0;

        /** Notifies your application that the connection "conn" is closed
         */
        virtual void closingConnection(MSN::Connection * conn) = 0;

        /** Notifies your application that a contact has changed his/her status
         * ex: Online, Away, Out to Lunch.. 
         */
        virtual void changedStatus(MSN::NotificationServerConnection * conn, MSN::BuddyStatus state) = 0;

        /** Asks your application to create a socket with "server" at port "port".
         * This function must return a socket reference that will be used for 
         * getDataFromSocket() and writeDataToSocket()
         */
        virtual void * connectToServer(std::string server, int port, bool *connected, bool isSSL = false) = 0;

        /** Notifies your application that someone is trying to send you a file.
         */
        virtual void askFileTransfer(MSN::SwitchboardServerConnection *conn, MSN::fileTransferInvite ft) = 0;

        virtual int listenOnPort(int port) = 0;

        virtual std::string getOurIP() = 0;

        virtual std::string getSecureHTTPProxy() = 0;

        virtual int getSocketFileDescriptor (void *sock) = 0;

        /** Asks your application to get @c size bytes of data available in @p sock
         * and store them in @p data.
         * It must return the real size written to @p data
         */
        virtual size_t getDataFromSocket (void *sock, char *data, size_t size) = 0;

        /** Asks your application to write @c size bytes from @p data to @p sock.
         * It must return the real size written to *sock
         */
        virtual size_t writeDataToSocket (void *sock, char *data, size_t size) = 0;

        virtual void gotInboxUrl (MSN::NotificationServerConnection * /*conn*/, MSN::hotmailInfo /*info*/) {};
    };
}
#endif