Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 93213 | Differences between
and this patch

Collapse All | Expand All

(-)kdenetwork-3.4.0/kopete/protocols/msn/Makefile.am (-1 / +3 lines)
Lines 1-3 Link Here
1
KDE_OPTIONS = nofinal
1
METASOURCES = AUTO
2
METASOURCES = AUTO
2
SUBDIRS = ui . icons config
3
SUBDIRS = ui . icons config
3
AM_CPPFLAGS = -I$(srcdir)/ui \
4
AM_CPPFLAGS = -I$(srcdir)/ui \
Lines 13-19 Link Here
13
libkopete_msn_shared_la_SOURCES = msnprotocol.cpp msnaccount.cpp msnaddcontactpage.cpp msncontact.cpp \
14
libkopete_msn_shared_la_SOURCES = msnprotocol.cpp msnaccount.cpp msnaddcontactpage.cpp msncontact.cpp \
14
	msnsocket.cpp msnmessagemanager.cpp msndebugrawcmddlg.cpp \
15
	msnsocket.cpp msnmessagemanager.cpp msndebugrawcmddlg.cpp \
15
	msnnotifysocket.cpp msnswitchboardsocket.cpp msnfiletransfersocket.cpp msninvitation.cpp \
16
	msnnotifysocket.cpp msnswitchboardsocket.cpp msnfiletransfersocket.cpp msninvitation.cpp \
16
	msnp2p.cpp msnp2pdisplatcher.cpp msnp2pincoming.cpp msnp2poutgoing.cpp sha1.cpp
17
	msnp2p.cpp msnp2pdisplatcher.cpp msnp2pincoming.cpp msnp2poutgoing.cpp sha1.cpp \
18
	sslloginhandler.cpp
17
19
18
libkopete_msn_shared_la_LIBADD  = ./ui/libkopetemsnui.la ../../libkopete/libkopete.la $(LIB_KIO)
20
libkopete_msn_shared_la_LIBADD  = ./ui/libkopetemsnui.la ../../libkopete/libkopete.la $(LIB_KIO)
19
libkopete_msn_shared_la_LDFLAGS = -version-info 0:0:0 -no-undefined $(all_libraries)
21
libkopete_msn_shared_la_LDFLAGS = -version-info 0:0:0 -no-undefined $(all_libraries)
(-)kdenetwork-3.4.0/kopete/protocols/msn/Makefile.in (-47 / +40 lines)
Lines 75-93 Link Here
75
	msnmessagemanager.lo msndebugrawcmddlg.lo msnnotifysocket.lo \
75
	msnmessagemanager.lo msndebugrawcmddlg.lo msnnotifysocket.lo \
76
	msnswitchboardsocket.lo msnfiletransfersocket.lo \
76
	msnswitchboardsocket.lo msnfiletransfersocket.lo \
77
	msninvitation.lo msnp2p.lo msnp2pdisplatcher.lo \
77
	msninvitation.lo msnp2p.lo msnp2pdisplatcher.lo \
78
	msnp2pincoming.lo msnp2poutgoing.lo sha1.lo
78
	msnp2pincoming.lo msnp2poutgoing.lo sha1.lo sslloginhandler.lo
79
#>- libkopete_msn_shared_la_OBJECTS =  \
79
#>- libkopete_msn_shared_la_OBJECTS =  \
80
#>- 	$(am_libkopete_msn_shared_la_OBJECTS)
80
#>- 	$(am_libkopete_msn_shared_la_OBJECTS)
81
#>+ 9
81
#>+ 6
82
libkopete_msn_shared_la_final_OBJECTS = libkopete_msn_shared_la.all_cpp.lo 
82
libkopete_msn_shared_la_OBJECTS = msnprotocol.lo msnaccount.lo \
83
libkopete_msn_shared_la_nofinal_OBJECTS = msnprotocol.lo msnaccount.lo \
84
	msnaddcontactpage.lo msncontact.lo msnsocket.lo \
83
	msnaddcontactpage.lo msncontact.lo msnsocket.lo \
85
	msnmessagemanager.lo msndebugrawcmddlg.lo msnnotifysocket.lo \
84
	msnmessagemanager.lo msndebugrawcmddlg.lo msnnotifysocket.lo \
86
	msnswitchboardsocket.lo msnfiletransfersocket.lo \
85
	msnswitchboardsocket.lo msnfiletransfersocket.lo \
87
	msninvitation.lo msnp2p.lo msnp2pdisplatcher.lo \
86
	msninvitation.lo msnp2p.lo msnp2pdisplatcher.lo \
88
	msnp2pincoming.lo msnp2poutgoing.lo sha1.lo
87
	msnp2pincoming.lo msnp2poutgoing.lo sha1.lo sslloginhandler.lo
89
@KDE_USE_FINAL_FALSE@libkopete_msn_shared_la_OBJECTS = $(libkopete_msn_shared_la_nofinal_OBJECTS)
90
@KDE_USE_FINAL_TRUE@libkopete_msn_shared_la_OBJECTS = $(libkopete_msn_shared_la_final_OBJECTS)
91
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
88
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
92
depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
89
depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
93
am__depfiles_maybe = depfiles
90
am__depfiles_maybe = depfiles
Lines 456-461 Link Here
456
xdg_appsdir = @xdg_appsdir@
453
xdg_appsdir = @xdg_appsdir@
457
xdg_directorydir = @xdg_directorydir@
454
xdg_directorydir = @xdg_directorydir@
458
xdg_menudir = @xdg_menudir@
455
xdg_menudir = @xdg_menudir@
456
KDE_OPTIONS = nofinal
459
#>- METASOURCES = AUTO
457
#>- METASOURCES = AUTO
460
SUBDIRS = ui . icons config
458
SUBDIRS = ui . icons config
461
AM_CPPFLAGS = -I$(srcdir)/ui \
459
AM_CPPFLAGS = -I$(srcdir)/ui \
Lines 469-475 Link Here
469
libkopete_msn_shared_la_SOURCES = msnprotocol.cpp msnaccount.cpp msnaddcontactpage.cpp msncontact.cpp \
467
libkopete_msn_shared_la_SOURCES = msnprotocol.cpp msnaccount.cpp msnaddcontactpage.cpp msncontact.cpp \
470
	msnsocket.cpp msnmessagemanager.cpp msndebugrawcmddlg.cpp \
468
	msnsocket.cpp msnmessagemanager.cpp msndebugrawcmddlg.cpp \
471
	msnnotifysocket.cpp msnswitchboardsocket.cpp msnfiletransfersocket.cpp msninvitation.cpp \
469
	msnnotifysocket.cpp msnswitchboardsocket.cpp msnfiletransfersocket.cpp msninvitation.cpp \
472
	msnp2p.cpp msnp2pdisplatcher.cpp msnp2pincoming.cpp msnp2poutgoing.cpp sha1.cpp
470
	msnp2p.cpp msnp2pdisplatcher.cpp msnp2pincoming.cpp msnp2poutgoing.cpp sha1.cpp \
471
	sslloginhandler.cpp
473
472
474
libkopete_msn_shared_la_LIBADD = ./ui/libkopetemsnui.la ../../libkopete/libkopete.la $(LIB_KIO)
473
libkopete_msn_shared_la_LIBADD = ./ui/libkopetemsnui.la ../../libkopete/libkopete.la $(LIB_KIO)
475
#>- libkopete_msn_shared_la_LDFLAGS = -version-info 0:0:0 -no-undefined $(all_libraries)
474
#>- libkopete_msn_shared_la_LDFLAGS = -version-info 0:0:0 -no-undefined $(all_libraries)
Lines 620-625 Link Here
620
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msnsocket.Plo@am__quote@
619
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msnsocket.Plo@am__quote@
621
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msnswitchboardsocket.Plo@am__quote@
620
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msnswitchboardsocket.Plo@am__quote@
622
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@
621
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@
622
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sslloginhandler.Plo@am__quote@
623
623
624
.cpp.o:
624
.cpp.o:
625
@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
625
@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
Lines 888-894 Link Here
888
#>- clean-am: clean-generic clean-kde_moduleLTLIBRARIES \
888
#>- clean-am: clean-generic clean-kde_moduleLTLIBRARIES \
889
#>- 	clean-libLTLIBRARIES clean-libtool mostlyclean-am
889
#>- 	clean-libLTLIBRARIES clean-libtool mostlyclean-am
890
#>+ 2
890
#>+ 2
891
clean-am: clean-metasources clean-closures clean-bcheck clean-final  clean-generic clean-kde_moduleLTLIBRARIES \
891
clean-am: clean-metasources clean-closures clean-bcheck  clean-generic clean-kde_moduleLTLIBRARIES \
892
	clean-libLTLIBRARIES clean-libtool mostlyclean-am
892
	clean-libLTLIBRARIES clean-libtool mostlyclean-am
893
893
894
distclean: distclean-recursive
894
distclean: distclean-recursive
Lines 1026-1031 Link Here
1026
mocs: msnprotocol.moc
1026
mocs: msnprotocol.moc
1027
1027
1028
#>+ 3
1028
#>+ 3
1029
sslloginhandler.moc: $(srcdir)/sslloginhandler.h
1030
	$(MOC) $(srcdir)/sslloginhandler.h -o sslloginhandler.moc
1031
1032
#>+ 2
1033
mocs: sslloginhandler.moc
1034
1035
#>+ 3
1029
msnaccount.moc: $(srcdir)/msnaccount.h
1036
msnaccount.moc: $(srcdir)/msnaccount.h
1030
	$(MOC) $(srcdir)/msnaccount.h -o msnaccount.moc
1037
	$(MOC) $(srcdir)/msnaccount.h -o msnaccount.moc
1031
1038
Lines 1040-1052 Link Here
1040
mocs: msnsocket.moc
1047
mocs: msnsocket.moc
1041
1048
1042
#>+ 3
1049
#>+ 3
1043
msnswitchboardsocket.moc: $(srcdir)/msnswitchboardsocket.h
1044
	$(MOC) $(srcdir)/msnswitchboardsocket.h -o msnswitchboardsocket.moc
1045
1046
#>+ 2
1047
mocs: msnswitchboardsocket.moc
1048
1049
#>+ 3
1050
msnnotifysocket.moc: $(srcdir)/msnnotifysocket.h
1050
msnnotifysocket.moc: $(srcdir)/msnnotifysocket.h
1051
	$(MOC) $(srcdir)/msnnotifysocket.h -o msnnotifysocket.moc
1051
	$(MOC) $(srcdir)/msnnotifysocket.h -o msnnotifysocket.moc
1052
1052
Lines 1054-1064 Link Here
1054
mocs: msnnotifysocket.moc
1054
mocs: msnnotifysocket.moc
1055
1055
1056
#>+ 3
1056
#>+ 3
1057
msnp2poutgoing.moc: $(srcdir)/msnp2poutgoing.h
1057
msnswitchboardsocket.moc: $(srcdir)/msnswitchboardsocket.h
1058
	$(MOC) $(srcdir)/msnp2poutgoing.h -o msnp2poutgoing.moc
1058
	$(MOC) $(srcdir)/msnswitchboardsocket.h -o msnswitchboardsocket.moc
1059
1059
1060
#>+ 2
1060
#>+ 2
1061
mocs: msnp2poutgoing.moc
1061
mocs: msnswitchboardsocket.moc
1062
1062
1063
#>+ 3
1063
#>+ 3
1064
msnp2p.moc: $(srcdir)/msnp2p.h
1064
msnp2p.moc: $(srcdir)/msnp2p.h
Lines 1068-1078 Link Here
1068
mocs: msnp2p.moc
1068
mocs: msnp2p.moc
1069
1069
1070
#>+ 3
1070
#>+ 3
1071
msnp2pincoming.moc: $(srcdir)/msnp2pincoming.h
1071
msnp2poutgoing.moc: $(srcdir)/msnp2poutgoing.h
1072
	$(MOC) $(srcdir)/msnp2pincoming.h -o msnp2pincoming.moc
1072
	$(MOC) $(srcdir)/msnp2poutgoing.h -o msnp2poutgoing.moc
1073
1073
1074
#>+ 2
1074
#>+ 2
1075
mocs: msnp2pincoming.moc
1075
mocs: msnp2poutgoing.moc
1076
1076
1077
#>+ 3
1077
#>+ 3
1078
msnaddcontactpage.moc: $(srcdir)/msnaddcontactpage.h
1078
msnaddcontactpage.moc: $(srcdir)/msnaddcontactpage.h
Lines 1081-1086 Link Here
1081
#>+ 2
1081
#>+ 2
1082
mocs: msnaddcontactpage.moc
1082
mocs: msnaddcontactpage.moc
1083
1083
1084
#>+ 3
1085
msnp2pincoming.moc: $(srcdir)/msnp2pincoming.h
1086
	$(MOC) $(srcdir)/msnp2pincoming.h -o msnp2pincoming.moc
1087
1088
#>+ 2
1089
mocs: msnp2pincoming.moc
1090
1084
#>+ 8
1091
#>+ 8
1085
libkopete_msn_shared.la.closure: $(libkopete_msn_shared_la_OBJECTS) $(libkopete_msn_shared_la_DEPENDENCIES)
1092
libkopete_msn_shared.la.closure: $(libkopete_msn_shared_la_OBJECTS) $(libkopete_msn_shared_la_DEPENDENCIES)
1086
	@echo "int main() {return 0;}" > libkopete_msn_shared_la_closure.cpp
1093
	@echo "int main() {return 0;}" > libkopete_msn_shared_la_closure.cpp
Lines 1092-1101 Link Here
1092
1099
1093
#>+ 3
1100
#>+ 3
1094
clean-metasources:
1101
clean-metasources:
1095
	-rm -f  msndebugrawcmddlg.moc msnp2pdisplatcher.moc msnmessagemanager.moc msnfiletransfersocket.moc msncontact.moc msnprotocol.moc msnaccount.moc msnsocket.moc msnswitchboardsocket.moc msnnotifysocket.moc msnp2poutgoing.moc msnp2p.moc msnp2pincoming.moc msnaddcontactpage.moc
1102
	-rm -f  msndebugrawcmddlg.moc msnp2pdisplatcher.moc msnmessagemanager.moc msnfiletransfersocket.moc msncontact.moc msnprotocol.moc sslloginhandler.moc msnaccount.moc msnsocket.moc msnnotifysocket.moc msnswitchboardsocket.moc msnp2p.moc msnp2poutgoing.moc msnaddcontactpage.moc msnp2pincoming.moc
1096
1103
1097
#>+ 2
1104
#>+ 2
1098
KDE_DIST=msnp2poutgoing.h kopete_msn.desktop msncontact.h msnp2p.h msnmessagemanager.h msnchatui.rc Changelog msnsocket.h msnp2pincoming.h ReleaseNotes msndebugrawcmddlg.h msnaccount.h msnfiletransfersocket.h sha1.h msnp2pdisplatcher.h msninvitation.h Makefile.in msnswitchboardsocket.h msnprotocol.h msnnotifysocket.h msnaddcontactpage.h Makefile.am 
1105
KDE_DIST=msnp2poutgoing.h msndebugrawcmddlg.h kopete_msn.desktop msncontact.h msnaccount.h msnp2p.h msnfiletransfersocket.h sha1.h msnmessagemanager.h msnchatui.rc msnp2pdisplatcher.h sslloginhandler.h msninvitation.h Makefile.in Changelog msnsocket.h msnswitchboardsocket.h msnprotocol.h msnp2pincoming.h msnnotifysocket.h ReleaseNotes msnaddcontactpage.h Makefile.am 
1099
1106
1100
#>+ 3
1107
#>+ 3
1101
clean-closures:
1108
clean-closures:
Lines 1142-1178 Link Here
1142
	done
1149
	done
1143
1150
1144
1151
1145
#>+ 11
1146
libkopete_msn_shared_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/msnprotocol.cpp $(srcdir)/msnaccount.cpp $(srcdir)/msnaddcontactpage.cpp $(srcdir)/msncontact.cpp $(srcdir)/msnsocket.cpp $(srcdir)/msnmessagemanager.cpp $(srcdir)/msndebugrawcmddlg.cpp $(srcdir)/msnnotifysocket.cpp $(srcdir)/msnswitchboardsocket.cpp $(srcdir)/msnfiletransfersocket.cpp $(srcdir)/msninvitation.cpp $(srcdir)/msnp2p.cpp $(srcdir)/msnp2pdisplatcher.cpp $(srcdir)/msnp2pincoming.cpp $(srcdir)/msnp2poutgoing.cpp $(srcdir)/sha1.cpp  msndebugrawcmddlg.moc msncontact.moc msnfiletransfersocket.moc msnmessagemanager.moc msnp2pdisplatcher.moc msnprotocol.moc msnaccount.moc msnsocket.moc msnswitchboardsocket.moc msnnotifysocket.moc msnp2p.moc msnp2poutgoing.moc msnaddcontactpage.moc msnp2pincoming.moc
1147
	@echo 'creating libkopete_msn_shared_la.all_cpp.cpp ...'; \
1148
	rm -f libkopete_msn_shared_la.all_cpp.files libkopete_msn_shared_la.all_cpp.final; \
1149
	echo "#define KDE_USE_FINAL 1" >> libkopete_msn_shared_la.all_cpp.final; \
1150
	for file in msnprotocol.cpp msnaccount.cpp msnaddcontactpage.cpp msncontact.cpp msnsocket.cpp msnmessagemanager.cpp msndebugrawcmddlg.cpp msnnotifysocket.cpp msnswitchboardsocket.cpp msnfiletransfersocket.cpp msninvitation.cpp msnp2p.cpp msnp2pdisplatcher.cpp msnp2pincoming.cpp msnp2poutgoing.cpp sha1.cpp ; do \
1151
	  echo "#include \"$$file\"" >> libkopete_msn_shared_la.all_cpp.files; \
1152
	  test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> libkopete_msn_shared_la.all_cpp.final; \
1153
	done; \
1154
	cat libkopete_msn_shared_la.all_cpp.final libkopete_msn_shared_la.all_cpp.files > libkopete_msn_shared_la.all_cpp.cpp; \
1155
	rm -f libkopete_msn_shared_la.all_cpp.final libkopete_msn_shared_la.all_cpp.files
1156
1157
#>+ 3
1158
clean-final:
1159
	-rm -f libkopete_msn_shared_la.all_cpp.cpp
1160
1161
#>+ 3
1152
#>+ 3
1162
final:
1153
final:
1163
	$(MAKE) libkopete_msn_shared_la_OBJECTS="$(libkopete_msn_shared_la_final_OBJECTS)" all-am
1154
	$(MAKE) all-am
1164
1155
1165
#>+ 3
1156
#>+ 3
1166
final-install:
1157
final-install:
1167
	$(MAKE) libkopete_msn_shared_la_OBJECTS="$(libkopete_msn_shared_la_final_OBJECTS)" install-am
1158
	$(MAKE) install-am
1168
1159
1169
#>+ 3
1160
#>+ 3
1170
no-final:
1161
no-final:
1171
	$(MAKE) libkopete_msn_shared_la_OBJECTS="$(libkopete_msn_shared_la_nofinal_OBJECTS)" all-am
1162
	$(MAKE) all-am
1172
1163
1173
#>+ 3
1164
#>+ 3
1174
no-final-install:
1165
no-final-install:
1175
	$(MAKE) libkopete_msn_shared_la_OBJECTS="$(libkopete_msn_shared_la_nofinal_OBJECTS)" install-am
1166
	$(MAKE) install-am
1176
1167
1177
#>+ 3
1168
#>+ 3
1178
cvs-clean:
1169
cvs-clean:
Lines 1182-1199 Link Here
1182
kde-rpo-clean:
1173
kde-rpo-clean:
1183
	-rm -f *.rpo
1174
	-rm -f *.rpo
1184
1175
1185
#>+ 31
1176
#>+ 33
1186
msnprotocol.lo: msnprotocol.moc 
1177
msnprotocol.lo: msnprotocol.moc 
1187
msnaccount.lo: msnaccount.moc 
1178
msnaccount.lo: msnaccount.moc 
1188
msnp2pdisplatcher.lo: msnp2pdisplatcher.moc 
1179
msnp2pdisplatcher.lo: msnp2pdisplatcher.moc 
1189
msnaccount.o: msnaccount.moc 
1180
msnaccount.o: msnaccount.moc 
1181
sslloginhandler.lo: sslloginhandler.moc 
1190
msncontact.lo: msncontact.moc 
1182
msncontact.lo: msncontact.moc 
1191
msnp2pincoming.o: msnp2pincoming.moc 
1183
msnp2pincoming.o: msnp2pincoming.moc 
1192
nmcheck-am: nmcheck
1184
nmcheck-am: nmcheck
1193
msnswitchboardsocket.lo: msnswitchboardsocket.moc 
1185
msnswitchboardsocket.lo: msnswitchboardsocket.moc 
1186
sslloginhandler.o: sslloginhandler.moc 
1194
msnprotocol.o: msnprotocol.moc 
1187
msnprotocol.o: msnprotocol.moc 
1195
msnmessagemanager.o: msnmessagemanager.moc 
1196
msnswitchboardsocket.o: msnswitchboardsocket.moc 
1188
msnswitchboardsocket.o: msnswitchboardsocket.moc 
1189
msnmessagemanager.o: msnmessagemanager.moc 
1197
msnp2pincoming.lo: msnp2pincoming.moc 
1190
msnp2pincoming.lo: msnp2pincoming.moc 
1198
msnnotifysocket.lo: msnnotifysocket.moc 
1191
msnnotifysocket.lo: msnnotifysocket.moc 
1199
msncontact.o: msncontact.moc 
1192
msncontact.o: msncontact.moc 
Lines 1204-1213 Link Here
1204
msnsocket.lo: msnsocket.moc 
1197
msnsocket.lo: msnsocket.moc 
1205
msnp2poutgoing.lo: msnp2poutgoing.moc 
1198
msnp2poutgoing.lo: msnp2poutgoing.moc 
1206
msndebugrawcmddlg.lo: msndebugrawcmddlg.moc 
1199
msndebugrawcmddlg.lo: msndebugrawcmddlg.moc 
1200
nmcheck: 
1207
msnsocket.o: msnsocket.moc 
1201
msnsocket.o: msnsocket.moc 
1208
msnnotifysocket.o: msnnotifysocket.moc 
1202
msnnotifysocket.o: msnnotifysocket.moc 
1209
msnaddcontactpage.o: msnaddcontactpage.moc 
1203
msnaddcontactpage.o: msnaddcontactpage.moc 
1210
nmcheck: 
1211
msnp2poutgoing.o: msnp2poutgoing.moc 
1204
msnp2poutgoing.o: msnp2poutgoing.moc 
1212
msnp2pdisplatcher.o: msnp2pdisplatcher.moc 
1205
msnp2pdisplatcher.o: msnp2pdisplatcher.moc 
1213
msnfiletransfersocket.lo: msnfiletransfersocket.moc 
1206
msnfiletransfersocket.lo: msnfiletransfersocket.moc 
(-)kdenetwork-3.4.0/kopete/protocols/msn/msnnotifysocket.cpp (-88 / +24 lines)
Lines 23-28 Link Here
23
#include "msnnotifysocket.h"
23
#include "msnnotifysocket.h"
24
#include "msncontact.h"
24
#include "msncontact.h"
25
#include "msnaccount.h"
25
#include "msnaccount.h"
26
#include "sslloginhandler.h"
26
27
27
#include <qregexp.h>
28
#include <qregexp.h>
28
29
Lines 48-54 Link Here
48
: MSNSocket( account )
49
: MSNSocket( account )
49
{
50
{
50
	m_newstatus = MSNProtocol::protocol()->NLN;
51
	m_newstatus = MSNProtocol::protocol()->NLN;
51
	
52
	m_sslLoginHandler=0l;
53
52
	m_isHotmailAccount=false;
54
	m_isHotmailAccount=false;
53
	m_ping=false;
55
	m_ping=false;
54
56
Lines 65-70 Link Here
65
67
66
MSNNotifySocket::~MSNNotifySocket()
68
MSNNotifySocket::~MSNNotifySocket()
67
{
69
{
70
	delete m_sslLoginHandler;
68
	kdDebug(14140) << k_funcinfo << endl;
71
	kdDebug(14140) << k_funcinfo << endl;
69
}
72
}
70
73
Lines 248-254 Link Here
248
	
251
	
249
	if ( cmd == "VER" )
252
	if ( cmd == "VER" )
250
	{
253
	{
251
		sendCommand( "CVR", "0x0409 winnt 5.1 i386 MSNMSGR 6.0.0602 MSMSGS " + m_account->accountId() );
254
		sendCommand( "CVR", "0x0409 winnt 5.1 i386 MSNMSGR 6.2.0205 MSMSGS " + m_account->accountId() );
252
/*
255
/*
253
		struct utsname utsBuf;
256
		struct utsname utsBuf;
254
		uname ( &utsBuf );
257
		uname ( &utsBuf );
Lines 266-291 Link Here
266
	{
269
	{
267
		if( data.section( ' ', 1, 1 ) == "S" )
270
		if( data.section( ' ', 1, 1 ) == "S" )
268
		{
271
		{
269
			m_authData=data.section( ' ' , 2 , 2 );
272
			m_sslLoginHandler = new SslLoginHandler();
270
			m_kv=QString::null;
273
			QObject::connect( m_sslLoginHandler, SIGNAL(       loginFailed()        ),
274
					 this,            SLOT  (    sslLoginFailed()        ) );
275
			QObject::connect( m_sslLoginHandler, SIGNAL(    loginIncorrect()        ),
276
					 this,            SLOT  ( sslLoginIncorrect()        ) );
277
			QObject::connect( m_sslLoginHandler, SIGNAL(    loginSucceeded(QString) ),
278
					 this,            SLOT  ( sslLoginSucceeded(QString) ) );
271
279
272
			if( m_account->accountId().contains("@hotmail.") )
280
			m_sslLoginHandler->login( data.section( ' ' , 2 , 2 ), m_account->accountId() , m_password );
273
				m_sid="loginnet.passport.com";
274
			else if( m_account->accountId().contains("@msn.") ||  m_account->accountId().contains("@compaq.net") ||  m_account->accountId().contains("@webtv.net") )
275
				m_sid="msnialogin.passport.com";
276
			else
277
				m_sid="login.passport.com";
278
279
			QString authURL="https://"+m_sid+"/login.srf?" + m_authData;
280
			authURL.replace("," , "&" ) ;
281
282
			kdDebug(14140) << k_funcinfo << "downlaod URL: " << authURL << endl;
283
284
			KIO::Job *job = KIO::get( KURL( authURL ), true, false );
285
			job->addMetaData("cookies", "manual");
286
			// This should force kio to download the page even is we are in the konqueror offline mode.  [see bug #68483]
287
			job->addMetaData("cache", "reload");
288
			QObject::connect( job, SIGNAL(result( KIO::Job *)), this, SLOT(slotAuthJobDone( KIO::Job *)) );
289
		}
281
		}
290
		else
282
		else
291
		{
283
		{
Lines 582-657 Link Here
582
}
574
}
583
575
584
576
585
void MSNNotifySocket::slotAuthJobDataReceived ( KIO::Job */*job*/,const  QByteArray &data)
577
void MSNNotifySocket::sslLoginFailed()
586
{
578
{
587
	m_authData += QCString( data, data.size()+1 );
579
	disconnect();
588
//	kdDebug(14140) << "MSNNotifySocket::slotAuthJobDataReceived: " << data << endl;
589
}
580
}
590
581
void MSNNotifySocket::sslLoginIncorrect()
591
void MSNNotifySocket::slotAuthJobDone ( KIO::Job *job)
592
{
582
{
593
//	kdDebug(14140) << "MSNNotifySocket::slotAuthJobDone: "<< m_authData << endl;
583
	m_badPassword = true;
594
584
	disconnect();
595
	if(job->error())
585
}
596
	{
586
void MSNNotifySocket::sslLoginSucceeded(QString a)
597
		//FIXME: Shouldn't we say that we are the MSN plugin?
587
{
598
		job->showErrorDialog();
588
	sendCommand("USR" , "TWN S " + a);
599
		disconnect();
589
	m_sslLoginHandler->deleteLater();
600
		return;
590
	m_sslLoginHandler=0;
601
	}
602
603
	if(m_kv.isNull())
604
	{
605
		QStringList cookielist=QStringList::split("\n", job->queryMetaData("setcookies") );
606
		QString cookies="Cookie: ";
607
		for ( QStringList::Iterator it = cookielist.begin(); it != cookielist.end(); ++it )
608
		{
609
			QRegExp rx("Set-Cookie: ([^;]*)");
610
			rx.search(*it);
611
			cookies+=rx.cap(1)+";";
612
		}
613
614
		//QRegExp rx("lc=([1-9]*),id=([1-9]*),tw=([1-9]*),fs=[1-9]*,ru=[1-9a-zA-Z%]*,ct=[1-9]*,kpp=[1-9]*,kv=([1-9]*),");
615
		QRegExp rx("lc=([0-9]*),id=([0-9]*),tw=([0-9]*),.*kv=([0-9]*),");
616
		rx.search(m_authData);
617
618
		QString authURL = "https://" + m_sid + "/ppsecure/post.srf?lc=" + rx.cap( 1 ) + "&id=" +
619
			rx.cap( 2 ) + "&tw=" + rx.cap( 3 ) + "&cbid=" + rx.cap( 2 ) + "&da=passport.com&login=" +
620
			KURL::encode_string( m_account->accountId()) + "&domain=passport.com&passwd=";
621
622
		kdDebug( 14140 ) << k_funcinfo << "Download URL: " << authURL << "(*******)" << endl;
623
624
		m_authData = QString::null;
625
		m_kv=rx.cap(4);
626
		if(m_kv.isNull()) m_kv="";
627
628
		authURL += KURL::encode_string( m_password ) ;
629
		job = KIO::get( KURL( authURL ), false, false );
630
		job->addMetaData("cookies", "manual");
631
		job->addMetaData("setcookies", cookies);
632
		job->addMetaData("cache", "reload");
633
634
		QObject::connect( job, SIGNAL(data( KIO::Job *,const QByteArray&)), this, SLOT(slotAuthJobDataReceived( KIO::Job *,const QByteArray&)) );
635
		QObject::connect( job, SIGNAL(result( KIO::Job *)), this, SLOT(slotAuthJobDone( KIO::Job *)) );
636
	}
637
	else
638
	{
639
		if(m_authData.contains("CookiesDisabled"))
640
		{
641
			// FIXME: is this still possible now we add our meta data? - Martijn
642
			disconnect();
643
			KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Error,
644
				i18n( "Unable to connect to the MSN Network.\nYour Web browser options are currently set to disable cookies.\n"
645
				"To use .NET Passport, you must enable cookies at least for the passport.com domain" ), i18n( "MSN Plugin" ) );
646
			return;
647
		}
648
649
		QRegExp rx(/*URL=http://memberservices.passport.net/memberservice.srf*/"\\?did=[0-9]*&(t=[0-9A-Za-z!$*]*&p=[0-9A-Za-z!$*]*)\"");
650
		rx.search(m_authData);
651
652
		m_badPassword=true;  //if this disconnect, that mean the password was bad
653
		sendCommand("USR" , "TWN S " + rx.cap(1));
654
	}
655
}
591
}
656
592
657
593
(-)kdenetwork-3.4.0/kopete/protocols/msn/msnnotifysocket.h (-3 / +5 lines)
Lines 29-34 Link Here
29
class MSNDispatchSocket;
29
class MSNDispatchSocket;
30
class MSNAccount;
30
class MSNAccount;
31
class KTempFile;
31
class KTempFile;
32
class SslLoginHandler;
32
33
33
#include <kio/job.h>
34
#include <kio/job.h>
34
35
Lines 138-145 Link Here
138
139
139
140
140
141
141
	void slotAuthJobDataReceived ( KIO::Job *, const QByteArray &data);
142
	void sslLoginFailed();
142
	void slotAuthJobDone ( KIO::Job *);
143
	void sslLoginIncorrect();
144
	void sslLoginSucceeded(QString);
143
145
144
146
145
private:
147
private:
Lines 170-176 Link Here
170
	QString m_kv;
172
	QString m_kv;
171
	QString m_sid;
173
	QString m_sid;
172
	QString m_loginTime;
174
	QString m_loginTime;
173
	QString m_authData;
175
	SslLoginHandler *m_sslLoginHandler;
174
176
175
	QTimer *m_keepaliveTimer;
177
	QTimer *m_keepaliveTimer;
176
178
(-)kdenetwork-3.4.0/kopete/protocols/msn/msnsocket.cpp (-1 / +1 lines)
Lines 133-139 Link Here
133
133
134
void MSNSocket::slotSocketError( int error )
134
void MSNSocket::slotSocketError( int error )
135
{
135
{
136
	kdWarning( 14140 ) << k_funcinfo << "Error: " << error << endl;
136
	kdWarning( 14140 ) << k_funcinfo << "Error: " << error << " (" << m_socket->errorString() << ")" << endl;
137
137
138
	if(!KSocketBase::isFatalError(error))
138
	if(!KSocketBase::isFatalError(error))
139
		return;
139
		return;
(-)kdenetwork-3.4.0/kopete/protocols/msn/sslloginhandler.cpp (+453 lines)
Line 0 Link Here
1
//Imported from KMess (2005-05-19)
2
3
/***************************************************************************
4
                          sslloginhandler.cpp  -  description
5
                             -------------------
6
    begin                : Sat Jun 28 2003
7
    copyright            : (C) 2003 by Mike K. Bennett
8
    email                : mkb137b@hotmail.com
9
 ***************************************************************************/
10
11
/***************************************************************************
12
 *                                                                         *
13
 *   This program is free software; you can redistribute it and/or modify  *
14
 *   it under the terms of the GNU General Public License as published by  *
15
 *   the Free Software Foundation; either version 2 of the License, or     *
16
 *   (at your option) any later version.                                   *
17
 *                                                                         *
18
 ***************************************************************************/
19
20
#include "sslloginhandler.h"
21
22
#include <qstringlist.h>
23
#include <qregexp.h>
24
#include <qsocket.h>
25
#include <qurl.h>
26
27
#include <kdebug.h>
28
#include <kextsock.h>
29
#include <kssl.h>
30
#include <kurl.h>
31
32
#if 0
33
#include "../kmessdebug.h"
34
#include "mimemessage.h"
35
#else
36
//i didn't want to import the whole MimeMessage from Kmess for Kopete so i
37
// reimplemented the base here  -Olivier
38
39
class MimeMessage
40
{
41
	public:
42
		MimeMessage(const QString &msg) : message(msg) {}
43
44
		QString getValue(const QString &key)
45
		{
46
			QRegExp rx(key+": (.*)\n");
47
			rx.search(message);
48
			return rx.cap(1);
49
		}
50
	private:
51
		QString message;
52
};
53
54
#include "sslloginhandler.moc"
55
#endif
56
//there is nothing modified from here.  this is exactly the kmerlin code
57
58
59
60
/*
61
 * Great documentation about this can be found at
62
 * http://siebe.bot2k3.net/docs/
63
 */
64
65
66
// The constructor
67
SslLoginHandler::SslLoginHandler()
68
 : mode_(NONE)
69
{
70
  // Create the SSL handler
71
  ssl_ = new KSSL( true );
72
73
  // Create and set up the socket.
74
  socket_ = new KExtendedSocket( );
75
76
  //socket_->setSocketFlags( 0x00 | 0x600000 ); // 0x00 = anySocket | 0x600000 = bufferedSocket
77
  socket_->setSocketFlags( 0x00 ); // 0x00 = anySocket | 0x600000 = bufferedSocket
78
  socket_->setTimeout( 30   );
79
  socket_->enableRead( true );
80
  connect( socket_, SIGNAL(         readyRead()    ),
81
           this,    SLOT  (      dataReceived()    ) );
82
  connect( socket_, SIGNAL(  connectionFailed(int) ),
83
           this,    SLOT  (       socketError(int) ) );
84
}
85
86
87
88
// The destructor
89
SslLoginHandler::~SslLoginHandler()
90
{
91
  delete ssl_;
92
  delete socket_;
93
}
94
95
96
97
// Data was received over the socket
98
void SslLoginHandler::dataReceived()
99
{
100
#ifdef KMESSDEBUG_SSLLOGINHANDLER
101
  kdDebug() << "SslLoginHandler - ******************** Data received ********************" << endl;
102
  kdDebug() << "SslLoginHandler - " << socket_->bytesAvailable() << " bytes available." << endl;
103
  kdDebug() << "SslLoginHandler - SSL says " << ssl_->pending() << " bytes available." << endl;
104
#endif
105
106
  QString   data;
107
  int       breakOut = 0;
108
  const int maxIterations = 1000;
109
  while ( ( !data.contains( QRegExp("\r\n") ) ) && ( breakOut < maxIterations ) )
110
  {
111
    // Read data via SSL
112
    data = readSslData();
113
    breakOut ++;
114
  }
115
116
  // Output the data for debugging
117
#ifdef KMESSDEBUG_SSLLOGINHANDLER
118
  kdDebug() << "SslLoginHandler - ********************   Contents    ********************" << endl;
119
  kdDebug() << data << endl;
120
  kdDebug() << "SslLoginHandler - ********************  End of data  ********************" << endl;
121
#endif
122
123
  // Warn if timed out
124
  if ( breakOut >= maxIterations )
125
  {
126
    kdDebug() << "WARNING - SSL read timed out." << endl;
127
    emit loginFailed();
128
    return;
129
  }
130
131
  if ( data.length() > 0 )
132
  {
133
    parseHttpResponse(data);
134
  }
135
  else
136
  {
137
    kdDebug() << "WARNING - Available data wasn't read from the SSL socket." << endl;
138
    emit loginFailed();
139
  }
140
}
141
142
143
144
// Start the login process
145
void SslLoginHandler::login( QString parameters, QString handle, QString password )
146
{
147
#ifdef KMESSDEBUG_SSLLOGINHANDLER
148
  kdDebug() << "SslLoginHandler - Starting login with parameters " << parameters << "." << endl;
149
#endif
150
151
  // Store the given data
152
  authenticationParameters_ = parameters;
153
  handle_                   = handle;
154
  password_                 = password;
155
156
  // Get the login server
157
  sendLoginServerRequest("nexus.passport.com");
158
  dataReceived();
159
}
160
161
162
163
// Get the authentication data from a string
164
void SslLoginHandler::parseAuthenticationData( QString data )
165
{
166
  QString twnData;
167
168
  // Pull TWN data out of the message
169
  twnData = data.right( data.length() - data.find(QRegExp("from-PP='")) - 9 );
170
  twnData = twnData.left( twnData.find(QRegExp("',")) );
171
172
#ifdef KMESSDEBUG_SSLLOGINHANDLER
173
  kdDebug() << "SslLoginHandler - data for TWN is " << twnData << "." << endl;
174
#endif
175
176
  // Notify the MsnNotificationConnection
177
  emit loginSucceeded(twnData);
178
}
179
180
181
182
// Parse the HTTP response from the server
183
void SslLoginHandler::parseHttpResponse(QString data)
184
{
185
  KURL    location;
186
  int     headerEnd;
187
  QString header;
188
  int     headerCode;
189
  QString headerText;
190
191
  // Parse the HTTP status header
192
  QRegExp re("HTTP/\\d+\\.\\d+ (\\d+) ([^\r\n]+)");
193
  headerEnd  = data.find("\r\n");
194
  header     = data.left( (headerEnd == -1) ? 20 : headerEnd );
195
196
  re.search(header);
197
  headerCode = re.cap(1).toUInt();
198
  headerText = re.cap(2);
199
200
  // Create a MimeMessage, removing the HTTP status header
201
  MimeMessage message( data.section( ",", 1 ) );
202
203
204
  switch(mode_)
205
  {
206
    case GETLOGINSERVER:
207
    {
208
      // Step 1. This data describes the login server to use.
209
      if(headerCode == 302)
210
      {
211
        // HTTP Redirect
212
        location = KURL( message.getValue( "Location" ) );
213
        sendLoginServerRequest(location.host());
214
      }
215
      else
216
      {
217
        // Parse the data
218
        QString loginServer;
219
        QString page;
220
        parseLoginServerData( loginServer, page, message.getValue("PassportURLs") );
221
222
        // Send the authentication request
223
        sendAuthenticationRequest( loginServer, page );
224
      }
225
      break;
226
    }
227
    case GETAUTHENTICATIONDATA:
228
    {
229
      // Step 2. Get the authentication data
230
      if(headerCode == 200)
231
      {
232
        // Login success
233
        parseAuthenticationData(message.getValue("Authentication-Info"));
234
      }
235
      else if(headerCode == 302)
236
      {
237
        // HTTP Redirect
238
        location = KURL( message.getValue( "Location" ) );
239
        sendAuthenticationRequest(location.host(), location.path());
240
      }
241
      else if(headerCode == 401)
242
      {
243
        // Got a HTTP "401 Unauthorized"; Login failed
244
        emit loginIncorrect();
245
      }
246
      else
247
      {
248
        kdDebug() << "SslLoginHandler::parseHttpResponse: WARNING "
249
                  << "- Unhandled response code " << headerCode << " " << headerText << endl;
250
        emit loginFailed();
251
      }
252
      break;
253
    }
254
    default:
255
    {
256
      kdDebug() << "SslLoginHandler::parseHttpResponse: WARNING - Entered illegal state" << endl;
257
      emit loginFailed();
258
    }
259
  }
260
}
261
262
263
// Get login server data from a string
264
void SslLoginHandler::parseLoginServerData( QString &host, QString &page, QString serverData )
265
{
266
  int slashIndex;
267
268
  // Get everything between "DLLogin=" and to the comma.
269
  serverData = serverData.right( serverData.length() - serverData.find( "DALogin=" ) - 8 );
270
  serverData = serverData.left( serverData.find( "," ) );
271
272
#ifdef KMESSDEBUG_SSLLOGINHANDLER
273
  kdDebug() << "SslLoginHandler - host/page=" << serverData << endl;
274
#endif
275
276
  // Separate the "host/page" string.
277
  slashIndex = serverData.find( "/" );
278
  host = serverData.left( slashIndex );
279
  page = serverData.right( serverData.length() - slashIndex );
280
281
#ifdef KMESSDEBUG_SSLLOGINHANDLER
282
  kdDebug() << "SslLoginHandler - host=" << host << " page=" << page << endl;
283
#endif
284
}
285
286
287
288
// Read data from the socket via SSL
289
QString SslLoginHandler::readSslData()
290
{
291
  char       rawblock[1024];
292
  QCString   block;
293
  QString    data        = "";
294
  int        noBytesRead = 1;
295
296
  // Read data from the SSL socket.
297
  if ( ssl_ != 0 )
298
  {
299
//    while( ( ssl_->pending() > 0 ) && ( noBytesRead > 0 ) )
300
//    while( ( socket_->bytesAvailable() > 0 ) && ( noBytesRead > 0 ) )
301
    while(noBytesRead > 0)
302
    {
303
      noBytesRead = ssl_->read( rawblock, 1024 );
304
#ifdef KMESSDEBUG_SSLLOGINHANDLER
305
      kdDebug() << "SslLoginHandler - " << noBytesRead << " bytes read." << endl;
306
#endif
307
      block = rawblock;
308
      block = block.left( noBytesRead );
309
      data += QString::fromUtf8( block );
310
    }
311
  }
312
313
  return data;
314
}
315
316
317
318
// Send the authenticationn request
319
void SslLoginHandler::sendAuthenticationRequest( QString loginServer, QString page )
320
{
321
#ifdef KMESSDEBUG_SSLLOGINHANDLER
322
  kdDebug() << "SslLoginHandler - Step 2. Requesting authentication data." << endl;
323
#endif
324
325
  QString request;
326
  QString encodedHandle   = handle_;
327
  QString encodedPassword = password_;
328
329
  QUrl::encode(encodedHandle);
330
  QUrl::encode(encodedPassword);
331
332
  request = "GET " + page + " HTTP/1.1\r\n"
333
            "Authorization: Passport1.4"
334
              " OrgVerb=GET"
335
              ",OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom"
336
              ",sign-in=" + encodedHandle +
337
              ",pwd="     + encodedPassword +
338
              ","         + authenticationParameters_ + "\r\n"
339
            "User-Agent: MSMSGS\r\n"     // Make sure the server won't discriminate
340
            "Host: " + loginServer + "\r\n"
341
            "Connection: Keep-Alive\r\n"
342
            "Cache-Control: no-cache\r\n\r\n";
343
344
  // Step 2. Send the authorisation request
345
  mode_ = GETAUTHENTICATIONDATA;
346
  sendHttpRequest( request, loginServer, 443 );
347
}
348
349
350
351
// Send a HTTP request to the server
352
void SslLoginHandler::sendHttpRequest( QString request, QString host, int port )
353
{
354
  QString response;
355
  QString responseBody;
356
357
  if ( socket_ == 0 )
358
  {
359
    kdDebug() << "SslLoginHandler::sendHttpRequest - WARNING "
360
              << "- Trying to login using a null socket." << endl;
361
    return;
362
  }
363
364
  // Configure the socket
365
#ifdef KMESSDEBUG_SSLLOGINHANDLER
366
  kdDebug() << "SslLoginHandler - Close and reset the socket." << endl;
367
#endif
368
  ssl_->setAutoReconfig( true );
369
  ssl_->reInitialize();
370
  socket_->closeNow();
371
  socket_->reset();
372
373
  // Try to connect
374
#ifdef KMESSDEBUG_SSLLOGINHANDLER
375
  kdDebug() << "SslLoginHandler - Connecting to " << host << ":" << port << "." << endl;
376
#endif
377
  socket_->setAddress( host, port );
378
  socket_->lookup();
379
  int connectionSuccess = socket_->connect();
380
  if ( connectionSuccess != 0 )
381
  {
382
    kdDebug() << "SslLoginHandler::sendHttpRequest - WARNING "
383
              << "- Connection failed, giving " << connectionSuccess << endl;
384
    return;
385
  }
386
387
  // Try to wrap the SSL handler
388
#ifdef KMESSDEBUG_SSLLOGINHANDLER
389
  kdDebug() << "SslLoginHandler - Connection success, binding SSL to socket fd " << socket_->fd() << endl;
390
#endif
391
  int sslConnectionSuccess = ssl_->connect( socket_->fd() );
392
  if ( sslConnectionSuccess != 1 )
393
  {
394
    kdDebug() << "SslLoginHandler::sendHttpRequest - WARNING "
395
              << "- SSL Connection failed, giving " << sslConnectionSuccess << endl;
396
    return;
397
  }
398
399
  // Send the request
400
#ifdef KMESSDEBUG_SSLLOGINHANDLER
401
  kdDebug() << "SslLoginHandler - SSL connected OK, sending the request." << endl;
402
  kdDebug() << request;
403
#endif
404
  writeSslData( request );
405
}
406
407
408
409
// Request the name of the login server
410
void SslLoginHandler::sendLoginServerRequest(QString hostname)
411
{
412
#ifdef KMESSDEBUG_SSLLOGINHANDLER
413
  kdDebug() << "SslLoginHandler - Step 1. Requesting the login server." << endl;
414
#endif
415
416
  // Step 1. Send the login server request
417
  // The server will respond with the location of the main SSL server.
418
  mode_ = GETLOGINSERVER;
419
  sendHttpRequest( "GET /rdr/pprdr.asp\r\n\r\n", hostname, 443 );
420
}
421
422
423
424
// Detect a socket error
425
void SslLoginHandler::socketError(int error)
426
{
427
  kdDebug() << "SslLoginHandler : WARNING - Received error " << error << " from the socket." << endl;
428
}
429
430
431
432
// Write data to the socket via SSL
433
void SslLoginHandler::writeSslData( QString data )
434
{
435
  int noBytesWritten;
436
437
  if(socket_ != 0 && ssl_ != 0)
438
  {
439
    noBytesWritten = ssl_->write( data.latin1(), data.length() );
440
    if(noBytesWritten != (int)data.length())
441
    {
442
      kdDebug() << "WARNING - Wanted to write " << data.length() << " to the socket, "
443
                << " wrote " << noBytesWritten << "." << endl;
444
    }
445
#ifdef KMESSDEBUG_SSLLOGINHANDLER
446
    else
447
    {
448
      kdDebug() << "SslLoginHandler - Sent " << noBytesWritten << " bytes via SSL." << endl;
449
    }
450
#endif
451
  }
452
}
453
(-)kdenetwork-3.4.0/kopete/protocols/msn/sslloginhandler.h (+96 lines)
Line 0 Link Here
1
//Imported from KMess  - 2005-05-19
2
3
/***************************************************************************
4
                          sslloginhandler.h  -  description
5
                             -------------------
6
    begin                : Sat Jun 28 2003
7
    copyright            : (C) 2003 by Mike K. Bennett
8
    email                : mkb137b@hotmail.com
9
 ***************************************************************************/
10
11
/***************************************************************************
12
 *                                                                         *
13
 *   This program is free software; you can redistribute it and/or modify  *
14
 *   it under the terms of the GNU General Public License as published by  *
15
 *   the Free Software Foundation; either version 2 of the License, or     *
16
 *   (at your option) any later version.                                   *
17
 *                                                                         *
18
 ***************************************************************************/
19
20
#ifndef SSLLOGINHANDLER_H
21
#define SSLLOGINHANDLER_H
22
23
#include <qobject.h>
24
#include <qstringlist.h>
25
26
// Forward declarations
27
class KExtendedSocket;
28
class KSSL;
29
class MimeMessage;
30
31
/**This class handles the SSL portion of the login.
32
  *@author Mike K. Bennett
33
  */
34
35
class SslLoginHandler : public QObject
36
{
37
   Q_OBJECT
38
39
  public:
40
    // The constructor
41
                         SslLoginHandler();
42
    // The destructor
43
                        ~SslLoginHandler();
44
    // Start the login process
45
    void                 login( QString parameters, QString handle, QString password );
46
47
  private : // Private methods
48
    // Get the authentication data from a string
49
    void                 parseAuthenticationData( QString data );
50
    // Parse the HTTP response from the server
51
    void                 parseHttpResponse(QString data);
52
    // Get login server data from a string
53
    void                 parseLoginServerData( QString &host, QString &page, QString serverData );
54
    // Read data from the socket via SSL
55
    QString              readSslData();
56
    // Send the authenticationn request
57
    void                 sendAuthenticationRequest( QString loginServer, QString page );
58
    // Send a HTTP request to the server
59
    void                 sendHttpRequest( QString request, QString host, int port );
60
    // Request the name of the login server
61
    void                 sendLoginServerRequest(QString hostname);
62
    // Write data to the socket via SSL
63
    void                 writeSslData( QString data );
64
65
  private slots : // Private slots
66
    // Data was received over the socket
67
    void                 dataReceived();
68
    // Detect a socket error
69
    void                 socketError(int error);
70
71
  private : // Private attributes
72
    // The mode of the transfer.
73
    enum Mode          { NONE = 0, GETLOGINSERVER = 1, GETAUTHENTICATIONDATA = 2 } mode_;
74
    // The list of parameters sent by the notification server
75
    QString              authenticationParameters_;
76
    // The cookies we received from the server
77
    QStringList          cookies_;
78
    // The user's handle
79
    QString              handle_;
80
    // The user's password
81
    QString              password_;
82
    // The socket over which the SSL data is written and read
83
    KExtendedSocket     *socket_;
84
    // The SSL handler
85
    KSSL                *ssl_;
86
87
  signals : // Public signals
88
    // Signal that the login was aborted because an internal error occured
89
    void                 loginFailed();
90
    // Signal that the login failed, username/password was incorrect
91
    void                 loginIncorrect();
92
    // Signal that the login succeeded
93
    void                 loginSucceeded( QString authentication );
94
};
95
96
#endif

Return to bug 93213