[-]
[+]
|
Changed |
sim-svn.spec
|
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/ALL_BUILD.vcproj
^
|
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8,00"
- Name="ALL_BUILD"
- ProjectGUID="{5EA3473D-F924-4481-98AF-E64EEEFA1649}"
- RootNamespace="simall"
- Keyword="MakeFileProj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="0"
- InheritedPropertySheets="$(SolutionDir)sim\win32\sim-default.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine=""
- ReBuildCommandLine="/a"
- CleanCommandLine=""
- Output="sim.exe"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="0"
- InheritedPropertySheets="$(SolutionDir)sim\win32\sim-default.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine=""
- ReBuildCommandLine="/a"
- CleanCommandLine=""
- Output="sim.exe"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/CMakeLists.txt
^
|
@@ -3,6 +3,9 @@
PROJECT(Sim-IM)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4)
+if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy)
SET(CMAKE_COLOR_MAKEFILE ON)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
@@ -12,10 +15,16 @@
INCLUDE(FindQt3)
INCLUDE(MacroEnsureOutOfSourceBuild)
+
+INCLUDE(CPack)
IF(NOT WIN32)
-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("SIM-IM requires an out of source build. Please create a separate build directory and run 'cmake path_to_sim_im [options]' there.")
+ MACRO_ENSURE_OUT_OF_SOURCE_BUILD("SIM-IM requires an out of source build. Please create a separate build directory and run 'cmake path_to_sim_im [options]' there.")
ENDIF(NOT WIN32)
+SET(CPACK_IGNORE_FILES "/CVS/;/\\\\.svn/;\\\\.sw[p-z]$;~$;tmp$;/CMakeFiles/")
+SET(CPACK_PACKAGE_VERSION "0.9.5")
+SET(CPACK_PACKAGE_FILE_NAME "Sim-IM-0.9.5-Source")
+
INCLUDE(Flex)
INCLUDE(Jisp)
INCLUDE(KDE3Macros)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/Makefile.in
^
|
@@ -888,7 +888,7 @@
.NOEXPORT:
#>+ 2
-KDE_DIST=config.h.cmake subdirs ALL_BUILD.vcproj Makefile.in configure.files sim.sln TODO.CMake config.h.in sim.vcproj configure.in altlinux.spec svn-ignore.sh aclocal.m4 ConfigureChecks.cmake jisp-resources.txt export_nix.py configure acinclude.m4 CMakeLists.txt Makefile.am
+KDE_DIST=config.h.cmake subdirs Makefile.in configure.files sim.sln TODO.CMake config.h.in sim.vcproj configure.in altlinux.spec svn-ignore.sh aclocal.m4 ConfigureChecks.cmake jisp-resources.txt export_nix.py configure acinclude.m4 CMakeLists.txt Makefile.am
#>+ 2
docs-am:
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/__homedir/homedir.cpp
^
|
@@ -139,8 +139,8 @@
s += "\\";
}
s += ".sim";
- if ( access( s.c_str(), F_OK ) != 0 ) {
- mkdir( s.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH );
+ if ( access( s, F_OK ) != 0 ) {
+ mkdir( s, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH );
}
#else
s += ".sim";
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/CMakeLists.txt
^
|
@@ -38,6 +38,7 @@
msgsms.cpp
msgurl.cpp
msgview.cpp
+ msgview_menu.cpp
newprotocol.cpp
nonim.cpp
pagerdetails.cpp
@@ -49,7 +50,13 @@
smscfg.cpp
status.cpp
statuswnd.cpp
+ textedit_menu.cpp
tmpl.cpp
+ toolbar_container.cpp
+ toolbar_history.cpp
+ toolbar_main.cpp
+ toolbar_msgedit.cpp
+ toolbar_textedit.cpp
toolbarcfg.cpp
toolsetup.cpp
usercfg.cpp
@@ -78,7 +85,7 @@
connectwnd.h
container.h
core.h
- core.h
+ core_consts.h
core_events.h
declinedlg.h
editmail.h
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/Makefile.am
^
|
@@ -81,7 +81,16 @@
filetransfer.cpp \
filetransferbase.ui \
declinedlg.cpp \
- declinedlgbase.ui
+ declinedlgbase.ui \
+ toolbar_main.cpp \
+ toolbar_history.cpp \
+ toolbar_container.cpp \
+ toolbar_msgedit.cpp \
+ toolbar_textedit.cpp \
+ msgview_menu.cpp \
+ textedit_menu.cpp
+
+
SUBDIRS=pict styles jisp GPL-Icons emoticons_prebuilt
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/Makefile.in
^
|
@@ -72,9 +72,11 @@
msgsms.lo msgfile.lo msgview.lo msgauth.lo msgurl.lo \
msgcontacts.lo msgrecv.lo history.lo historywnd.lo libintl.lo \
autoreply.lo msgcfg.lo filecfg.lo smscfg.lo arcfg.lo tmpl.lo \
- filetransfer.lo declinedlg.lo
+ filetransfer.lo declinedlg.lo toolbar_main.lo \
+ toolbar_history.lo toolbar_container.lo toolbar_msgedit.lo \
+ toolbar_textedit.lo msgview_menu.lo textedit_menu.lo
#>- _core_la_OBJECTS = $(am__core_la_OBJECTS)
-#>+ 15
+#>+ 17
_core_la_final_OBJECTS = _core_la.all_cpp.lo
_core_la_nofinal_OBJECTS = core.lo kpopup.lo commands.lo cmenu.lo \
mainwin.lo userlist.lo userview.lo cfgdlg.lo plugincfg.lo \
@@ -87,7 +89,9 @@
msgsms.lo msgfile.lo msgview.lo msgauth.lo msgurl.lo \
msgcontacts.lo msgrecv.lo history.lo historywnd.lo libintl.lo \
autoreply.lo msgcfg.lo filecfg.lo smscfg.lo arcfg.lo tmpl.lo \
- filetransfer.lo declinedlg.lo cfgdlgbase.lo plugincfgbase.lo prefcfgbase.lo toolsetupbase.lo interfacecfgbase.lo userviewcfgbase.lo historycfgbase.lo userhistorycfgbase.lo maininfobase.lo editmailbase.lo editphonebase.lo phonebase.lo pagerbase.lo searchbase.lo searchallbase.lo nonimbase.lo connectionsettingsbase.lo connectwndbase.lo logindlgbase.lo managerbase.lo newprotocolbase.lo autoreplybase.lo msgcfgbase.lo filecfgbase.lo smscfgbase.lo arcfgbase.lo filetransferbase.lo declinedlgbase.lo
+ filetransfer.lo declinedlg.lo toolbar_main.lo \
+ toolbar_history.lo toolbar_container.lo toolbar_msgedit.lo \
+ toolbar_textedit.lo msgview_menu.lo textedit_menu.lo cfgdlgbase.lo plugincfgbase.lo prefcfgbase.lo toolsetupbase.lo interfacecfgbase.lo userviewcfgbase.lo historycfgbase.lo userhistorycfgbase.lo maininfobase.lo editmailbase.lo editphonebase.lo phonebase.lo pagerbase.lo searchbase.lo searchallbase.lo nonimbase.lo connectionsettingsbase.lo connectwndbase.lo logindlgbase.lo managerbase.lo newprotocolbase.lo autoreplybase.lo msgcfgbase.lo filecfgbase.lo smscfgbase.lo arcfgbase.lo filetransferbase.lo declinedlgbase.lo
@KDE_USE_FINAL_FALSE@_core_la_OBJECTS = $(_core_la_nofinal_OBJECTS)
@KDE_USE_FINAL_TRUE@_core_la_OBJECTS = $(_core_la_final_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -512,8 +516,15 @@
#>- filetransfer.cpp \
#>- filetransferbase.ui \
#>- declinedlg.cpp \
-#>- declinedlgbase.ui
-#>+ 82
+#>- declinedlgbase.ui \
+#>- toolbar_main.cpp \
+#>- toolbar_history.cpp \
+#>- toolbar_container.cpp \
+#>- toolbar_msgedit.cpp \
+#>- toolbar_textedit.cpp \
+#>- msgview_menu.cpp \
+#>- textedit_menu.cpp
+#>+ 89
_core_la_SOURCES=\
core.cpp \
kpopup.cpp \
@@ -595,7 +606,14 @@
filetransfer.cpp \
\
declinedlg.cpp \
- cfgdlgbase.cpp plugincfgbase.cpp prefcfgbase.cpp toolsetupbase.cpp interfacecfgbase.cpp userviewcfgbase.cpp historycfgbase.cpp userhistorycfgbase.cpp maininfobase.cpp editmailbase.cpp editphonebase.cpp phonebase.cpp pagerbase.cpp searchbase.cpp searchallbase.cpp nonimbase.cpp connectionsettingsbase.cpp connectwndbase.cpp logindlgbase.cpp managerbase.cpp newprotocolbase.cpp autoreplybase.cpp msgcfgbase.cpp filecfgbase.cpp smscfgbase.cpp arcfgbase.cpp filetransferbase.cpp declinedlgbase.cpp
+ \
+ toolbar_main.cpp \
+ toolbar_history.cpp \
+ toolbar_container.cpp \
+ toolbar_msgedit.cpp \
+ toolbar_textedit.cpp \
+ msgview_menu.cpp \
+ textedit_menu.cpp cfgdlgbase.cpp plugincfgbase.cpp prefcfgbase.cpp toolsetupbase.cpp interfacecfgbase.cpp userviewcfgbase.cpp historycfgbase.cpp userhistorycfgbase.cpp maininfobase.cpp editmailbase.cpp editphonebase.cpp phonebase.cpp pagerbase.cpp searchbase.cpp searchallbase.cpp nonimbase.cpp connectionsettingsbase.cpp connectwndbase.cpp logindlgbase.cpp managerbase.cpp newprotocolbase.cpp autoreplybase.cpp msgcfgbase.cpp filecfgbase.cpp smscfgbase.cpp arcfgbase.cpp filetransferbase.cpp declinedlgbase.cpp
SUBDIRS = pict styles jisp GPL-Icons emoticons_prebuilt
INCLUDES = -I$(srcdir)/../../sim $(all_includes)
@@ -725,6 +743,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgsms.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgurl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgview.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgview_menu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newprotocol.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonim.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pagerdetails.Plo@am__quote@
@@ -736,7 +755,13 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smscfg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statuswnd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textedit_menu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_container.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_history.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_main.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_msgedit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_textedit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolsetup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usercfg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userhistorycfg.Plo@am__quote@
@@ -1437,7 +1462,7 @@
-rm -f search.moc logindlg.moc userview.moc mainwin.moc arcfg.moc cmenu.moc userlist.moc msggen.moc filecfg.moc newprotocol.moc msgcontacts.moc tmpl.moc historycfg.moc msgfile.moc connectionsettings.moc editphone.moc editmail.moc declinedlg.moc autoreply.moc historywnd.moc prefcfg.moc statuswnd.moc searchall.moc msgcfg.moc toolsetup.moc smscfg.moc plugincfg.moc core.moc userhistorycfg.moc status.moc toolbarcfg.moc commands.moc interfacecfg.moc kpopup.moc msgrecv.moc phonedetails.moc msgsms.moc pagerdetails.moc connectwnd.moc nonim.moc userviewcfg.moc usercfg.moc filetransfer.moc msgview.moc container.moc msgauth.moc manager.moc msgedit.moc cfgdlg.moc msgurl.moc userwnd.moc maininfo.moc
#>+ 2
-KDE_DIST=newprotocolbase.ui msgview.h cmenu.h filecfgbase.ui filecfg.h core_events.h smscfgbase.ui interfacecfg.h userview.h autoreplybase.ui core.rc toolbarcfg.h pagerdetails.h searchall.h logindlgbase.ui editphone.h manager.h searchallbase.ui nonim.h editphonebase.ui arcfgbase.ui usercfg.h statuswnd.h prefcfgbase.ui connectionsettingsbase.ui userhistorycfgbase.ui connectwnd.h cfgdlg.h logindlg.h connectionsettings.h search.h userlist.h core_pch.h msgcfgbase.ui Makefile.in historycfg.h filetransferbase.ui status.h kpopup.h userwnd.h smscfg.h filetransfer.h maininfo.h prefcfg.h toolbarcfg.cpp arcfg.h searchbase.ui msgfile.h msgurl.h msgauth.h newprotocol.h toolsetup.h connectwndbase.ui autoreply.h nonimbase.ui historycfgbase.ui managerbase.ui historywnd.h plugincfg.h declinedlg.h pagerbase.ui userviewcfg.h msgcontacts.h plugincfgbase.ui msgcfg.h editmailbase.ui fontconfigbase.ui editmail.h phonedetails.h commands.h msgsms.h declinedlgbase.ui userhistorycfg.h container.h CMakeLists.txt mainwin.h core.h cfgdlgbase.ui history.h msgrecv.h toolsetupbase.ui userviewcfgbase.ui maininfobase.ui tmpl.h interfacecfgbase.ui _core.vcproj msgedit.h phonebase.ui msggen.h Makefile.am
+KDE_DIST=newprotocolbase.ui msgview.h cmenu.h filecfgbase.ui filecfg.h core_events.h smscfgbase.ui interfacecfg.h userview.h autoreplybase.ui core.rc toolbarcfg.h pagerdetails.h searchall.h logindlgbase.ui editphone.h manager.h searchallbase.ui nonim.h editphonebase.ui arcfgbase.ui usercfg.h statuswnd.h prefcfgbase.ui connectionsettingsbase.ui userhistorycfgbase.ui connectwnd.h cfgdlg.h logindlg.h connectionsettings.h search.h userlist.h core_pch.h msgcfgbase.ui Makefile.in historycfg.h filetransferbase.ui status.h kpopup.h userwnd.h smscfg.h filetransfer.h maininfo.h prefcfg.h toolbarcfg.cpp arcfg.h searchbase.ui msgfile.h msgurl.h msgauth.h newprotocol.h toolsetup.h connectwndbase.ui autoreply.h nonimbase.ui historycfgbase.ui managerbase.ui historywnd.h plugincfg.h declinedlg.h pagerbase.ui userviewcfg.h msgcontacts.h plugincfgbase.ui msgcfg.h editmailbase.ui fontconfigbase.ui editmail.h phonedetails.h commands.h msgsms.h declinedlgbase.ui userhistorycfg.h core_consts.h container.h CMakeLists.txt mainwin.h core.h cfgdlgbase.ui history.h msgrecv.h toolsetupbase.ui userviewcfgbase.ui maininfobase.ui tmpl.h interfacecfgbase.ui _core.vcproj msgedit.h phonebase.ui msggen.h Makefile.am
#>+ 31
clean-ui:
@@ -1517,11 +1542,11 @@
#>+ 11
-_core_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/core.cpp $(srcdir)/kpopup.cpp $(srcdir)/commands.cpp $(srcdir)/cmenu.cpp $(srcdir)/mainwin.cpp $(srcdir)/userlist.cpp $(srcdir)/userview.cpp $(srcdir)/cfgdlg.cpp $(srcdir)/plugincfg.cpp $(srcdir)/prefcfg.cpp $(srcdir)/usercfg.cpp $(srcdir)/toolsetup.cpp $(srcdir)/interfacecfg.cpp $(srcdir)/userviewcfg.cpp $(srcdir)/historycfg.cpp $(srcdir)/userhistorycfg.cpp $(srcdir)/maininfo.cpp $(srcdir)/editmail.cpp $(srcdir)/editphone.cpp $(srcdir)/phonedetails.cpp $(srcdir)/pagerdetails.cpp $(srcdir)/search.cpp $(srcdir)/searchall.cpp $(srcdir)/nonim.cpp $(srcdir)/connectionsettings.cpp $(srcdir)/connectwnd.cpp $(srcdir)/logindlg.cpp $(srcdir)/manager.cpp $(srcdir)/newprotocol.cpp $(srcdir)/status.cpp $(srcdir)/statuswnd.cpp $(srcdir)/container.cpp $(srcdir)/userwnd.cpp $(srcdir)/msgedit.cpp $(srcdir)/msggen.cpp $(srcdir)/msgsms.cpp $(srcdir)/msgfile.cpp $(srcdir)/msgview.cpp $(srcdir)/msgauth.cpp $(srcdir)/msgurl.cpp $(srcdir)/msgcontacts.cpp $(srcdir)/msgrecv.cpp $(srcdir)/history.cpp $(srcdir)/historywnd.cpp $(srcdir)/libintl.cpp $(srcdir)/autoreply.cpp $(srcdir)/msgcfg.cpp $(srcdir)/filecfg.cpp $(srcdir)/smscfg.cpp $(srcdir)/arcfg.cpp $(srcdir)/tmpl.cpp $(srcdir)/filetransfer.cpp $(srcdir)/declinedlg.cpp cfgdlgbase.cpp plugincfgbase.cpp prefcfgbase.cpp toolsetupbase.cpp interfacecfgbase.cpp userviewcfgbase.cpp historycfgbase.cpp userhistorycfgbase.cpp maininfobase.cpp editmailbase.cpp editphonebase.cpp phonebase.cpp pagerbase.cpp searchbase.cpp searchallbase.cpp nonimbase.cpp connectionsettingsbase.cpp connectwndbase.cpp logindlgbase.cpp managerbase.cpp newprotocolbase.cpp autoreplybase.cpp msgcfgbase.cpp filecfgbase.cpp smscfgbase.cpp arcfgbase.cpp filetransferbase.cpp declinedlgbase.cpp logindlg.moc declinedlgbase.moc pagerbase.moc userview.moc mainwin.moc arcfg.moc userlist.moc cmenu.moc newprotocol.moc msggen.moc msgcontacts.moc userhistorycfgbase.moc msgfile.moc historycfg.moc smscfgbase.moc connectionsettings.moc connectwndbase.moc editphone.moc arcfgbase.moc declinedlg.moc autoreply.moc cfgdlgbase.moc msgcfg.moc smscfg.moc toolsetup.moc core.moc userhistorycfg.moc interfacecfg.moc msgcfgbase.moc kpopup.moc phonedetails.moc msgsms.moc searchallbase.moc pagerdetails.moc logindlgbase.moc filetransfer.moc usercfg.moc msgview.moc manager.moc connectionsettingsbase.moc cfgdlg.moc maininfo.moc userviewcfgbase.moc search.moc toolsetupbase.moc filecfg.moc nonimbase.moc tmpl.moc autoreplybase.moc editmailbase.moc prefcfgbase.moc phonebase.moc interfacecfgbase.moc editmail.moc historywnd.moc prefcfg.moc statuswnd.moc filecfgbase.moc searchall.moc maininfobase.moc plugincfg.moc status.moc commands.moc editphonebase.moc historycfgbase.moc msgrecv.moc filetransferbase.moc connectwnd.moc userviewcfg.moc nonim.moc msgauth.moc container.moc newprotocolbase.moc searchbase.moc managerbase.moc msgedit.moc msgurl.moc plugincfgbase.moc userwnd.moc
+_core_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/core.cpp $(srcdir)/kpopup.cpp $(srcdir)/commands.cpp $(srcdir)/cmenu.cpp $(srcdir)/mainwin.cpp $(srcdir)/userlist.cpp $(srcdir)/userview.cpp $(srcdir)/cfgdlg.cpp $(srcdir)/plugincfg.cpp $(srcdir)/prefcfg.cpp $(srcdir)/usercfg.cpp $(srcdir)/toolsetup.cpp $(srcdir)/interfacecfg.cpp $(srcdir)/userviewcfg.cpp $(srcdir)/historycfg.cpp $(srcdir)/userhistorycfg.cpp $(srcdir)/maininfo.cpp $(srcdir)/editmail.cpp $(srcdir)/editphone.cpp $(srcdir)/phonedetails.cpp $(srcdir)/pagerdetails.cpp $(srcdir)/search.cpp $(srcdir)/searchall.cpp $(srcdir)/nonim.cpp $(srcdir)/connectionsettings.cpp $(srcdir)/connectwnd.cpp $(srcdir)/logindlg.cpp $(srcdir)/manager.cpp $(srcdir)/newprotocol.cpp $(srcdir)/status.cpp $(srcdir)/statuswnd.cpp $(srcdir)/container.cpp $(srcdir)/userwnd.cpp $(srcdir)/msgedit.cpp $(srcdir)/msggen.cpp $(srcdir)/msgsms.cpp $(srcdir)/msgfile.cpp $(srcdir)/msgview.cpp $(srcdir)/msgauth.cpp $(srcdir)/msgurl.cpp $(srcdir)/msgcontacts.cpp $(srcdir)/msgrecv.cpp $(srcdir)/history.cpp $(srcdir)/historywnd.cpp $(srcdir)/libintl.cpp $(srcdir)/autoreply.cpp $(srcdir)/msgcfg.cpp $(srcdir)/filecfg.cpp $(srcdir)/smscfg.cpp $(srcdir)/arcfg.cpp $(srcdir)/tmpl.cpp $(srcdir)/filetransfer.cpp $(srcdir)/declinedlg.cpp $(srcdir)/toolbar_main.cpp $(srcdir)/toolbar_history.cpp $(srcdir)/toolbar_container.cpp $(srcdir)/toolbar_msgedit.cpp $(srcdir)/toolbar_textedit.cpp $(srcdir)/msgview_menu.cpp $(srcdir)/textedit_menu.cpp cfgdlgbase.cpp plugincfgbase.cpp prefcfgbase.cpp toolsetupbase.cpp interfacecfgbase.cpp userviewcfgbase.cpp historycfgbase.cpp userhistorycfgbase.cpp maininfobase.cpp editmailbase.cpp editphonebase.cpp phonebase.cpp pagerbase.cpp searchbase.cpp searchallbase.cpp nonimbase.cpp connectionsettingsbase.cpp connectwndbase.cpp logindlgbase.cpp managerbase.cpp newprotocolbase.cpp autoreplybase.cpp msgcfgbase.cpp filecfgbase.cpp smscfgbase.cpp arcfgbase.cpp filetransferbase.cpp declinedlgbase.cpp logindlg.moc declinedlgbase.moc pagerbase.moc userview.moc mainwin.moc arcfg.moc userlist.moc cmenu.moc newprotocol.moc msggen.moc msgcontacts.moc userhistorycfgbase.moc msgfile.moc historycfg.moc smscfgbase.moc connectionsettings.moc connectwndbase.moc editphone.moc arcfgbase.moc declinedlg.moc autoreply.moc cfgdlgbase.moc msgcfg.moc smscfg.moc toolsetup.moc core.moc userhistorycfg.moc interfacecfg.moc msgcfgbase.moc kpopup.moc phonedetails.moc msgsms.moc searchallbase.moc pagerdetails.moc logindlgbase.moc filetransfer.moc usercfg.moc msgview.moc manager.moc connectionsettingsbase.moc cfgdlg.moc maininfo.moc userviewcfgbase.moc search.moc toolsetupbase.moc filecfg.moc nonimbase.moc tmpl.moc autoreplybase.moc editmailbase.moc prefcfgbase.moc phonebase.moc interfacecfgbase.moc editmail.moc historywnd.moc prefcfg.moc statuswnd.moc filecfgbase.moc searchall.moc maininfobase.moc plugincfg.moc status.moc commands.moc editphonebase.moc historycfgbase.moc msgrecv.moc filetransferbase.moc connectwnd.moc userviewcfg.moc nonim.moc msgauth.moc container.moc newprotocolbase.moc searchbase.moc managerbase.moc msgedit.moc msgurl.moc plugincfgbase.moc userwnd.moc
@echo 'creating _core_la.all_cpp.cpp ...'; \
rm -f _core_la.all_cpp.files _core_la.all_cpp.final; \
echo "#define KDE_USE_FINAL 1" >> _core_la.all_cpp.final; \
- for file in core.cpp kpopup.cpp commands.cpp cmenu.cpp mainwin.cpp userlist.cpp userview.cpp cfgdlg.cpp plugincfg.cpp prefcfg.cpp usercfg.cpp toolsetup.cpp interfacecfg.cpp userviewcfg.cpp historycfg.cpp userhistorycfg.cpp maininfo.cpp editmail.cpp editphone.cpp phonedetails.cpp pagerdetails.cpp search.cpp searchall.cpp nonim.cpp connectionsettings.cpp connectwnd.cpp logindlg.cpp manager.cpp newprotocol.cpp status.cpp statuswnd.cpp container.cpp userwnd.cpp msgedit.cpp msggen.cpp msgsms.cpp msgfile.cpp msgview.cpp msgauth.cpp msgurl.cpp msgcontacts.cpp msgrecv.cpp history.cpp historywnd.cpp libintl.cpp autoreply.cpp msgcfg.cpp filecfg.cpp smscfg.cpp arcfg.cpp tmpl.cpp filetransfer.cpp declinedlg.cpp cfgdlgbase.cpp plugincfgbase.cpp prefcfgbase.cpp toolsetupbase.cpp interfacecfgbase.cpp userviewcfgbase.cpp historycfgbase.cpp userhistorycfgbase.cpp maininfobase.cpp editmailbase.cpp editphonebase.cpp phonebase.cpp pagerbase.cpp searchbase.cpp searchallbase.cpp nonimbase.cpp connectionsettingsbase.cpp connectwndbase.cpp logindlgbase.cpp managerbase.cpp newprotocolbase.cpp autoreplybase.cpp msgcfgbase.cpp filecfgbase.cpp smscfgbase.cpp arcfgbase.cpp filetransferbase.cpp declinedlgbase.cpp ; do \
+ for file in core.cpp kpopup.cpp commands.cpp cmenu.cpp mainwin.cpp userlist.cpp userview.cpp cfgdlg.cpp plugincfg.cpp prefcfg.cpp usercfg.cpp toolsetup.cpp interfacecfg.cpp userviewcfg.cpp historycfg.cpp userhistorycfg.cpp maininfo.cpp editmail.cpp editphone.cpp phonedetails.cpp pagerdetails.cpp search.cpp searchall.cpp nonim.cpp connectionsettings.cpp connectwnd.cpp logindlg.cpp manager.cpp newprotocol.cpp status.cpp statuswnd.cpp container.cpp userwnd.cpp msgedit.cpp msggen.cpp msgsms.cpp msgfile.cpp msgview.cpp msgauth.cpp msgurl.cpp msgcontacts.cpp msgrecv.cpp history.cpp historywnd.cpp libintl.cpp autoreply.cpp msgcfg.cpp filecfg.cpp smscfg.cpp arcfg.cpp tmpl.cpp filetransfer.cpp declinedlg.cpp toolbar_main.cpp toolbar_history.cpp toolbar_container.cpp toolbar_msgedit.cpp toolbar_textedit.cpp msgview_menu.cpp textedit_menu.cpp cfgdlgbase.cpp plugincfgbase.cpp prefcfgbase.cpp toolsetupbase.cpp interfacecfgbase.cpp userviewcfgbase.cpp historycfgbase.cpp userhistorycfgbase.cpp maininfobase.cpp editmailbase.cpp editphonebase.cpp phonebase.cpp pagerbase.cpp searchbase.cpp searchallbase.cpp nonimbase.cpp connectionsettingsbase.cpp connectwndbase.cpp logindlgbase.cpp managerbase.cpp newprotocolbase.cpp autoreplybase.cpp msgcfgbase.cpp filecfgbase.cpp smscfgbase.cpp arcfgbase.cpp filetransferbase.cpp declinedlgbase.cpp ; do \
echo "#include \"$$file\"" >> _core_la.all_cpp.files; \
test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> _core_la.all_cpp.final; \
done; \
@@ -1552,7 +1577,7 @@
kde-rpo-clean:
-rm -f *.rpo
-#>+ 160
+#>+ 167
$(srcdir)/userwnd.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
userviewcfg.o: userviewcfg.moc
$(srcdir)/usercfg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
@@ -1572,6 +1597,7 @@
$(srcdir)/newprotocol.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
filecfg.lo: filecfg.moc
toolbarcfg.lo: toolbarcfg.moc
+$(srcdir)/toolbar_textedit.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/core.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
cmenu.lo: cmenu.moc
msgurl.o: msgurl.moc
@@ -1594,6 +1620,7 @@
status.o: status.moc
declinedlg.o: declinedlg.moc
connectionsettings.o: connectionsettings.moc
+$(srcdir)/toolbar_history.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/msgauth.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
logindlg.o: logindlg.moc
filecfg.o: filecfg.moc
@@ -1601,6 +1628,7 @@
search.lo: search.moc
$(srcdir)/smscfg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
smscfg.o: smscfg.moc
+$(srcdir)/textedit_menu.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/mainwin.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/historycfg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/editmail.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
@@ -1637,6 +1665,7 @@
statuswnd.o: statuswnd.moc
nonim.lo: nonim.moc
$(srcdir)/logindlg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
+$(srcdir)/msgview_menu.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/history.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
prefcfg.o: prefcfg.moc
msgrecv.o: msgrecv.moc
@@ -1652,17 +1681,19 @@
userhistorycfg.o: userhistorycfg.moc
$(srcdir)/phonedetails.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
mainwin.lo: mainwin.moc
-msgedit.o: msgedit.moc
$(srcdir)/container.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
+msgedit.o: msgedit.moc
search.o: search.moc
$(srcdir)/declinedlg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
newprotocol.o: newprotocol.moc
msgview.lo: msgview.moc
userview.lo: userview.moc
filetransfer.o: filetransfer.moc
+$(srcdir)/toolbar_container.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/userhistorycfg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
prefcfg.lo: prefcfg.moc
$(srcdir)/msgfile.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
+$(srcdir)/toolbar_main.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/filetransfer.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
msgurl.lo: msgurl.moc
$(srcdir)/prefcfg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
@@ -1682,6 +1713,7 @@
msgsms.o: msgsms.moc
$(srcdir)/tmpl.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
historycfg.lo: historycfg.moc
+$(srcdir)/toolbar_msgedit.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
$(srcdir)/cfgdlg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
toolsetup.lo: toolsetup.moc
$(srcdir)/filecfg.cpp: cfgdlgbase.h plugincfgbase.h prefcfgbase.h toolsetupbase.h interfacecfgbase.h userviewcfgbase.h historycfgbase.h userhistorycfgbase.h maininfobase.h editmailbase.h editphonebase.h phonebase.h pagerbase.h searchbase.h searchallbase.h nonimbase.h connectionsettingsbase.h connectwndbase.h logindlgbase.h managerbase.h newprotocolbase.h autoreplybase.h msgcfgbase.h filecfgbase.h smscfgbase.h arcfgbase.h filetransferbase.h declinedlgbase.h
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/_core.vcproj
^
|
@@ -931,6 +931,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\msgview_menu.cpp"
+ >
+ </File>
+ <File
RelativePath="newprotocol.cpp"
>
<FileConfiguration
@@ -1173,6 +1177,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\textedit_menu.cpp"
+ >
+ </File>
+ <File
RelativePath="tmpl.cpp"
>
<FileConfiguration
@@ -1195,6 +1203,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\toolbar_container.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\toolbar_history.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\toolbar_main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\toolbar_msgedit.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\toolbar_textedit.cpp"
+ >
+ </File>
+ <File
RelativePath="toolsetup.cpp"
>
<FileConfiguration
@@ -3929,6 +3957,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\core_consts.h"
+ >
+ </File>
+ <File
RelativePath=".\core_events.h"
>
</File>
@@ -6775,7 +6807,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6785,7 +6817,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6799,7 +6831,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6809,7 +6841,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6823,7 +6855,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6833,7 +6865,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6847,7 +6879,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6857,7 +6889,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6871,7 +6903,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6881,7 +6913,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6895,7 +6927,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6905,7 +6937,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6919,7 +6951,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6929,7 +6961,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6943,7 +6975,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6953,7 +6985,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6967,7 +6999,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6977,7 +7009,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -6991,7 +7023,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7001,7 +7033,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7015,7 +7047,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7025,7 +7057,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7039,7 +7071,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7049,7 +7081,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7063,7 +7095,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7073,7 +7105,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7087,7 +7119,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7097,7 +7129,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7111,7 +7143,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7121,7 +7153,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7135,7 +7167,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
@@ -7145,7 +7177,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying EMOTICONS & ICONS"
- CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons"
+ CommandLine="copy $(InputDir)$(InputFileName) $(SolutionDir)$(ConfigurationName)\icons
"
Outputs="$(SolutionDir)$(ConfigurationName)\icons\$(InputFileName)"
/>
</FileConfiguration>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/commands.cpp
^
|
@@ -79,8 +79,8 @@
CommandsDef *Commands::createMenu(unsigned id)
{
- if (id == MenuLocation)
- id = MenuLocation;
+ if (id == MenuPhoneLocation)
+ id = MenuPhoneLocation; // FIXME: if id==MenuPhoneLocation then id = MenuPhoneLocation, Does it make sense?
MENU_MAP::iterator it = menus.find(id);
if (it != menus.end())
return (*it).second.def;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/container.cpp
^
|
@@ -578,10 +578,18 @@
}
switch (id){
case 11:
- m_tabBar->setCurrent(m_tabBar->current() - 1);
+ if (m_tabBar->current() == 0) {
+ m_tabBar->setCurrent(m_tabBar->count() - 1);
+ } else {
+ m_tabBar->setCurrent(m_tabBar->current() - 1);
+ }
break;
case 12:
- m_tabBar->setCurrent(m_tabBar->current() + 1);
+ if (m_tabBar->current() == m_tabBar->count() - 1) {
+ m_tabBar->setCurrent(0);
+ } else {
+ m_tabBar->setCurrent(m_tabBar->current() + 1);
+ }
break;
case 13:
m_tabBar->setCurrent(0);
@@ -804,8 +812,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
UserWnd *userWnd = m_tabBar->currentWnd();
if (userWnd && ((unsigned long)(cmd->param) == userWnd->id()) &&
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/core.cpp
^
|
@@ -49,6 +49,7 @@
#include "toolbtn.h"
#include "unquot.h"
#include "xsl.h"
+#include "textshow.h"
// _core
#include "core.h"
#include "cfgdlg.h"
@@ -74,7 +75,6 @@
#include "smscfg.h"
#include "tmpl.h"
#include "autoreply.h"
-#include "textshow.h"
#include "filetransfer.h"
#include "declinedlg.h"
#include "userhistorycfg.h"
@@ -435,16 +435,6 @@
m_cmds = new Commands;
boundTypes();
- EventToolbar(ToolBarMain, EventToolbar::eAdd).process();
- EventToolbar(ToolBarContainer, EventToolbar::eAdd).process();
- EventToolbar(ToolBarTextEdit, EventToolbar::eAdd).process();
- EventToolbar(ToolBarMsgEdit, EventToolbar::eAdd).process();
- EventToolbar(BarHistory, EventToolbar::eAdd).process();
-
- EventMenu(MenuMain, EventMenu::eAdd).process();
- EventMenu(MenuPhones, EventMenu::eAdd).process();
- EventMenu(MenuLocation, EventMenu::eAdd).process();
- EventMenu(MenuPhoneState, EventMenu::eAdd).process();
EventMenu(MenuFileDecline, EventMenu::eAdd).process();
EventMenu(MenuMailList, EventMenu::eAdd).process();
EventMenu(MenuPhoneList, EventMenu::eAdd).process();
@@ -454,382 +444,26 @@
EventMenu(MenuSearchGroups, EventMenu::eAdd).process();
EventMenu(MenuSearchOptions, EventMenu::eAdd).process();
+ createMainToolbar();
+ createHistoryToolbar();
+ createContainerToolbar();
+ createMsgEditToolbar();
+ createTextEditToolbar();
+
+ createMenuMsgView();
+ createMenuTextEdit();
+
+ MsgEdit::setupMessages(); // Make sure this function is called after createContainerToolbar and createMsgEditToolbar
+ // because setupMessages() adds items to MenuMessage and to ToolBatMsgEdit, witch are
+ // created by createContainerToolbar and createMsgEditToolbar
+ // If menu or toolbar were not created, items can't be added, and will be just missing
Command cmd;
- cmd->id = CmdConfigure;
- cmd->text = I18N_NOOP("Setup");
- cmd->icon = "configure";
- cmd->bar_id = ToolBarMain;
- cmd->menu_id = MenuMain;
- cmd->menu_grp = 0x8080;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdUnread;
- cmd->text = I18N_NOOP("Unread messages");
- cmd->icon = "message";
- cmd->bar_id = 0;
- cmd->menu_grp = 0x3000;
- cmd->flags = COMMAND_IMPORTANT | COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdQuit;
- cmd->text = I18N_NOOP("Quit");
- cmd->icon = "exit";
- cmd->bar_id = ToolBarMain;
- cmd->menu_id = MenuMain;
- cmd->menu_grp = 0x10080;
- cmd->flags = COMMAND_IMPORTANT;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdMenu;
- cmd->text = I18N_NOOP("&Menu");
- cmd->icon = "1downarrow";
- cmd->bar_id = ToolBarMain;
- cmd->bar_grp = 0x8000;
- cmd->menu_id = 0;
- cmd->menu_grp = 0;
- cmd->popup_id = MenuMain;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdSearch;
- cmd->text = I18N_NOOP("Search / Add contact");
- cmd->icon = "find";
- cmd->bar_id = ToolBarMain;
- cmd->bar_grp = 0;
- cmd->menu_id = MenuMain;
- cmd->menu_grp = 0x2080;
- cmd->popup_id = 0;
- cmd->flags = COMMAND_DEFAULT;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdSendSMS;
- cmd->text = I18N_NOOP("&Send SMS");
- cmd->icon = "sms";
- cmd->menu_grp = 0x2081;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhones;
- cmd->text = I18N_NOOP("&Phone service");
- cmd->bar_id = 0;
- cmd->bar_grp = 0;
- cmd->icon = "phone";
- cmd->menu_grp = 0x60F0;
- cmd->popup_id = MenuPhones;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdMessageType;
- cmd->text = I18N_NOOP("Message");
- cmd->icon = "message";
- cmd->bar_id = ToolBarContainer;
- cmd->bar_grp = 0x2000;
- cmd->menu_id = 0;
- cmd->menu_grp = 0;
- cmd->popup_id = MenuMessage;
- cmd->flags = BTN_PICT;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdContainerContact;
- cmd->text = I18N_NOOP("Contact");
- cmd->icon = "empty";
- cmd->bar_grp = 0x6000;
- cmd->popup_id = MenuContainerContact;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdContactGroup;
- cmd->text = I18N_NOOP("Group");
- cmd->icon = "grp_on";
- cmd->bar_grp = 0x7000;
- cmd->flags = COMMAND_DEFAULT;
- cmd->popup_id = MenuContactGroup;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdInfo;
- cmd->text = I18N_NOOP("User &info");
- cmd->icon = "info";
- cmd->popup_id = 0;
- cmd->bar_grp = 0x8000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdHistory;
- cmd->text = I18N_NOOP("&History");
- cmd->icon = "history";
- cmd->popup_id = 0;
- cmd->bar_grp = 0x8010;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdClose;
- cmd->text = I18N_NOOP("Close");
- cmd->icon = "exit";
- cmd->accel = "Esc";
- cmd->bar_grp = 0xF000;
- EventCommandCreate(cmd).process();
-
- EventMenu(MenuContainerContact, EventMenu::eAdd).process();
-
- cmd->id = CmdContainerContacts;
- cmd->text = "_";
- cmd->icon = QString::null;
- cmd->menu_id = MenuContainerContact;
- cmd->menu_grp = 0x1000;
- cmd->accel = QString::null;
- cmd->bar_id = 0;
- cmd->bar_grp = 0;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- EventMenu(MenuMessage, EventMenu::eAdd).process();
-
- MsgEdit::setupMessages();
-
- cmd->id = CmdContactClients;
- cmd->text = "_";
- cmd->icon = "NULL";
- cmd->menu_id = MenuMessage;
- cmd->menu_grp = 0x30FF;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdSend;
- cmd->text = I18N_NOOP("&Send");
- cmd->icon = "mail_generic";
- cmd->menu_id = 0;
- cmd->menu_grp = 0;
- cmd->bar_id = ToolBarMsgEdit;
- cmd->bar_grp = 0x8000;
- cmd->flags = BTN_PICT | COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- QStringList smiles;
- getIcons()->getSmiles(smiles);
- unsigned flags = 0;
- QString smile_icon;
- if (smiles.empty()){
- flags = BTN_HIDE;
- }else{
- smile_icon = smiles.front();
- }
-
- cmd->id = CmdSmile;
- cmd->text = I18N_NOOP("I&nsert smile");
- cmd->icon = smile_icon;
- cmd->bar_grp = 0x7000;
- cmd->flags = COMMAND_CHECK_STATE | flags;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdTranslit;
- cmd->text = I18N_NOOP("Send in &translit");
- cmd->icon = "translit";
- cmd->icon_on = "translit";
- cmd->bar_grp = 0x7010;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdSendClose;
- cmd->text = I18N_NOOP("C&lose after send");
- cmd->icon = "fileclose";
- cmd->icon_on = "fileclose";
- cmd->bar_grp = 0x7020;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdMultiply;
- cmd->text = I18N_NOOP("Multi&ply send");
- cmd->icon = "1rightarrow";
- cmd->icon_on = "1leftarrow";
- cmd->bar_grp = 0xF010;
- cmd->flags = COMMAND_DEFAULT;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdBgColor;
- cmd->text = I18N_NOOP("Back&ground color");
- cmd->icon = "bgcolor";
- cmd->icon_on = QString::null;
- cmd->bar_grp = 0x1000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdFgColor;
- cmd->text = I18N_NOOP("Fo®round color");
- cmd->icon = "fgcolor";
- cmd->bar_grp = 0x1001;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdBold;
- cmd->text = I18N_NOOP("&Bold");
- cmd->icon = "text_bold";
- cmd->icon_on = "text_bold";
- cmd->bar_grp = 0x1002;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdItalic;
- cmd->text = I18N_NOOP("It&alic");
- cmd->icon = "text_italic";
- cmd->icon_on = "text_italic";
- cmd->bar_grp = 0x1003;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdUnderline;
- cmd->text = I18N_NOOP("&Underline");
- cmd->icon = "text_under";
- cmd->icon_on = "text_under";
- cmd->bar_grp = 0x1004;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdFont;
- cmd->text = I18N_NOOP("Select f&ont");
- cmd->icon = "text";
- cmd->icon_on = QString::null;
- cmd->bar_grp = 0x1005;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdFileName;
- cmd->text = I18N_NOOP("Select &file");
- cmd->icon = "file";
- cmd->icon_on = QString::null;
- cmd->bar_grp = 0x1010;
- cmd->flags = BTN_EDIT | COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhoneNumber;
- cmd->text = I18N_NOOP("&Phone number");
- cmd->icon = "cell";
- cmd->icon_on = QString::null;
- cmd->bar_grp = 0x1020;
- cmd->flags = BTN_COMBO | BTN_NO_BUTTON | COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdNextMessage;
- cmd->text = I18N_NOOP("&Next");
- cmd->icon = "message";
- cmd->bar_grp = 0x8000;
- cmd->flags = BTN_PICT | COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdHistoryDirection;
- cmd->text = I18N_NOOP("&Direction");
- cmd->icon = "1uparrow";
- cmd->icon_on = "1downarrow";
- cmd->bar_id = BarHistory;
- cmd->bar_grp = 0x2000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdHistoryFind;
- cmd->text = I18N_NOOP("&Filter");
- cmd->icon = "filter";
- cmd->icon_on = "filter";
- cmd->bar_grp = 0x3000;
- cmd->flags = BTN_COMBO_CHECK;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdHistoryPrev;
- cmd->text = I18N_NOOP("&Previous page");
- cmd->icon = "1leftarrow";
- cmd->icon_on = QString::null;
- cmd->bar_grp = 0x5000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdHistoryNext;
- cmd->text = I18N_NOOP("&Next page");
- cmd->icon = "1rightarrow";
- cmd->bar_grp = 0x5001;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdHistorySave;
- cmd->text = I18N_NOOP("&Save as text");
- cmd->icon = "filesave";
- cmd->accel = "Ctrl+S";
- cmd->bar_grp = 0x6000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdBgColor;
- cmd->text = I18N_NOOP("Back&ground color");
- cmd->icon = "bgcolor";
- cmd->icon_on = QString::null;
- cmd->bar_id = ToolBarTextEdit;
- cmd->bar_grp = 0x1000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdFgColor;
- cmd->text = I18N_NOOP("Fo®round color");
- cmd->icon = "fgcolor";
- cmd->bar_grp = 0x1010;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdBold;
- cmd->text = I18N_NOOP("&Bold");
- cmd->icon = "text_bold";
- cmd->icon_on = "text_bold";
- cmd->bar_grp = 0x2000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdItalic;
- cmd->text = I18N_NOOP("It&alic");
- cmd->icon = "text_italic";
- cmd->icon_on = "text_italic";
- cmd->bar_grp = 0x2010;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdUnderline;
- cmd->text = I18N_NOOP("&Underline");
- cmd->icon = "text_under";
- cmd->icon_on = "text_under";
- cmd->bar_grp = 0x2020;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdFont;
- cmd->text = I18N_NOOP("Select f&ont");
- cmd->icon = "text";
- cmd->icon_on = "text";
- cmd->bar_grp = 0x3000;
- EventCommandCreate(cmd).process();
EventMenu(MenuGroup, EventMenu::eAdd).process();
EventMenu(MenuContact, EventMenu::eAdd).process();
EventMenu(MenuContactGroup, EventMenu::eAdd).process();
- EventMenu(MenuMsgView, EventMenu::eAdd).process();
EventMenu(MenuMsgCommand, EventMenu::eAdd).process();
- cmd->id = CmdMsgOpen;
- cmd->text = I18N_NOOP("&Open message");
- cmd->accel = QString::null;
- cmd->icon = "message";
- cmd->icon_on = QString::null;
- cmd->menu_id = MenuMsgView;
- cmd->menu_grp = 0x1000;
- cmd->bar_id = 0;
- cmd->bar_grp = 0;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdMsgSpecial;
- cmd->text = "_";
- cmd->icon = QString::null;
- cmd->menu_grp = 0x1001;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdCopy;
- cmd->text = I18N_NOOP("&Copy");
- cmd->accel = "Ctrl+C";
- cmd->icon = "editcopy";
- cmd->menu_grp = 0x2000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdDeleteMessage;
- cmd->text = I18N_NOOP("&Delete message");
- cmd->accel = QString::null;
- cmd->icon = "remove";
- cmd->menu_grp = 0x3000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdCutHistory;
- cmd->text = I18N_NOOP("&Cut history");
- cmd->menu_grp = 0x3001;
- EventCommandCreate(cmd).process();
-
cmd->id = CmdMsgQuote;
cmd->text = I18N_NOOP("&Quote");
cmd->icon = QString::null;
@@ -842,7 +476,7 @@
EventCommandCreate(cmd).process();
cmd->id = CmdMsgQuote + CmdReceived;
- cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_id = ToolBarMsgEdit; //FIXME: Cant see this item at ToolBarMsgEdit; item list. Why?
cmd->bar_grp = 0x1041;
cmd->flags = BTN_PICT | COMMAND_CHECK_STATE;
EventCommandCreate(cmd).process();
@@ -857,7 +491,7 @@
EventCommandCreate(cmd).process();
cmd->id = CmdMsgForward + CmdReceived;
- cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_id = ToolBarMsgEdit; //FIXME: Cant see this item at ToolBarMsgEdit; item list. Why?
cmd->bar_grp = 0x1042;
cmd->flags = BTN_PICT | COMMAND_CHECK_STATE;
EventCommandCreate(cmd).process();
@@ -868,78 +502,9 @@
cmd->bar_grp = 0x8000;
EventCommandCreate(cmd).process();
- EventMenu(MenuTextEdit, EventMenu::eAdd).process();
- EventMenu(MenuGroups, EventMenu::eAdd).process();
EventMenu(MenuContainer, EventMenu::eAdd).process();
- cmd->id = CmdUndo;
- cmd->text = I18N_NOOP("&Undo");
- cmd->accel = "Ctrl+Z";
- cmd->icon = "undo";
- cmd->menu_id = MenuTextEdit;
- cmd->menu_grp = 0x1000;
- cmd->bar_id = 0;
- cmd->bar_grp = 0;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdRedo;
- cmd->text = I18N_NOOP("&Redo");
- cmd->accel = "Ctrl+Y";
- cmd->icon = "redo";
- cmd->menu_grp = 0x1001;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdCut;
- cmd->text = I18N_NOOP("Cu&t");
- cmd->icon = "editcut";
- cmd->accel = "Ctrl+X";
- cmd->menu_grp = 0x2000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdCopy;
- cmd->text = I18N_NOOP("&Copy");
- cmd->icon = "editcopy";
- cmd->accel = "Ctrl+C";
- cmd->menu_grp = 0x2001;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPaste;
- cmd->text = I18N_NOOP("&Paste");
- cmd->icon = "editpaste";
- cmd->accel = "Ctrl+V";
- cmd->menu_grp = 0x2002;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdClear;
- cmd->text = I18N_NOOP("Clear");
- cmd->icon = QString::null;
- cmd->accel = QString::null;
- cmd->menu_grp = 0x3000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdSelectAll;
- cmd->text = I18N_NOOP("Select All");
- cmd->accel = "Ctrl+A";
- cmd->menu_grp = 0x3001;
- EventCommandCreate(cmd).process();
-
-#ifdef USE_KDE
-#if KDE_IS_VERSION(3,2,0)
- cmd->id = CmdEnableSpell;
- cmd->text = I18N_NOOP("Enable spell check");
- cmd->accel = QString::null;
- cmd->menu_grp = 0x4000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdSpell;
- cmd->text = I18N_NOOP("Spell check");
- cmd->menu_grp = 0x4001;
- cmd->flags = COMMAND_DEFAULT;
- EventCommandCreate(cmd).process();
-#endif
-#endif
-
+ cmd->bar_id =0;
cmd->id = user_data_id;
cmd->text = I18N_NOOP("&Messages");
cmd->accel = QString::null;
@@ -962,58 +527,10 @@
cmd->param = (void*)getHistorySetup;
EventAddPreferences(cmd).process();
- cmd->id = CmdOnline;
- cmd->text = I18N_NOOP("Show &offline");
- cmd->icon = "online_off";
- cmd->icon_on = "online_on";
- cmd->bar_id = ToolBarMain;
- cmd->bar_grp = 0x4000;
- cmd->menu_id = MenuMain;
- cmd->menu_grp = 0;
- if (getShowOnLine())
- cmd->flags |= COMMAND_CHECKED;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdGrpOff;
- cmd->text = I18N_NOOP("Do&n't show groups");
- cmd->icon = "grp_off";
- cmd->icon_on = QString::null;
- cmd->bar_id = 0;
- cmd->menu_id = MenuGroups;
- cmd->menu_grp = 0x1000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdGrpMode1;
- cmd->text = I18N_NOOP("Group mode 1");
- cmd->icon = "grp_on";
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdGrpMode2;
- cmd->text = I18N_NOOP("Group mode 2");
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdOnline;
- cmd->text = I18N_NOOP("Show &offline");
- cmd->icon = "online_off";
- cmd->icon_on = "online_on";
- cmd->menu_grp = 0x8000;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdEmptyGroup;
- cmd->text = I18N_NOOP("Show &empty groups");
- cmd->icon = QString::null;
- cmd->icon_on = QString::null;
- cmd->menu_grp = 0x8001;
- EventCommandCreate(cmd).process();
-
cmd->id = CmdGrpCreate;
cmd->text = I18N_NOOP("&Create group");
cmd->icon = "grp_create";
cmd->icon_on = QString::null;
- cmd->menu_grp = 0xA000;
- EventCommandCreate(cmd).process();
-
cmd->menu_id = MenuGroup;
cmd->menu_grp = 0x4000;
EventCommandCreate(cmd).process();
@@ -1175,59 +692,6 @@
cmd->menu_grp = 0x2000;
EventCommandCreate(cmd).process();
- cmd->id = CmdLocation;
- cmd->text = I18N_NOOP("&Location");
- cmd->menu_id = MenuPhones;
- cmd->menu_grp = 0x1000;
- cmd->popup_id = MenuLocation;
- cmd->flags = COMMAND_DEFAULT;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhoneState;
- cmd->text = I18N_NOOP("&Status");
- cmd->menu_id = MenuPhones;
- cmd->menu_grp = 0x1010;
- cmd->popup_id = MenuPhoneState;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhoneBook;
- cmd->text = I18N_NOOP("&Phone book");
- cmd->menu_id = MenuPhones;
- cmd->menu_grp = 0x1020;
- cmd->popup_id = 0;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhoneNoShow;
- cmd->text = I18N_NOOP("&No show");
- cmd->menu_id = MenuPhoneState;
- cmd->menu_grp = 0x1000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhoneAvailable;
- cmd->text = I18N_NOOP("&Available");
- cmd->icon = "phone";
- cmd->menu_id = MenuPhoneState;
- cmd->menu_grp = 0x1001;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdPhoneBusy;
- cmd->text = I18N_NOOP("&Busy");
- cmd->icon = "nophone";
- cmd->menu_id = MenuPhoneState;
- cmd->menu_grp = 0x1002;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdLocation;
- cmd->text = "_";
- cmd->icon = QString::null;
- cmd->menu_id = MenuLocation;
- cmd->menu_grp = 0x1000;
- cmd->flags = COMMAND_CHECK_STATE;
- EventCommandCreate(cmd).process();
-
cmd->id = CmdDeclineWithoutReason;
cmd->text = I18N_NOOP("Decline file without reason");
cmd->icon = QString::null;
@@ -1296,26 +760,6 @@
cmd->menu_grp = 0x8000;
EventCommandCreate(cmd).process();
- cmd->id = CmdChangeEncoding;
- cmd->text = I18N_NOOP("Change &encoding");
- cmd->icon = "encoding";
- cmd->menu_id = 0;
- cmd->menu_grp = 0;
- cmd->bar_id = ToolBarContainer;
- cmd->bar_grp = 0x8080;
- cmd->popup_id = MenuEncoding;
- EventCommandCreate(cmd).process();
-
- cmd->id = CmdChangeEncoding;
- cmd->text = I18N_NOOP("Change &encoding");
- cmd->icon = "encoding";
- cmd->menu_id = 0;
- cmd->menu_grp = 0;
- cmd->bar_id = BarHistory;
- cmd->bar_grp = 0x8080;
- cmd->popup_id = MenuEncoding;
- EventCommandCreate(cmd).process();
-
cmd->id = CmdContactGroup;
cmd->text = I18N_NOOP("Add to &group");
cmd->icon = QString::null;
@@ -1732,6 +1176,7 @@
removeTranslator();
installTranslator();
initData();
+ EventUpdateCommandState(CmdOnline).process();
}
break;
}
@@ -2025,7 +1470,7 @@
CommandDef *c;
while ((c = ++itc) != NULL){
c->param = (void*)(contact_id);
- if(EventCheckState(c).process()) {
+ if(EventCheckCommandState(c).process()) {
return EventCommandExec(c).process();
}
}
@@ -2164,8 +1609,8 @@
m_focus = NULL;
return true;
}
- case eEventCheckState:{
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState:{
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->menu_id == MenuEncoding){
if (cmd->id == CmdChangeEncoding){
@@ -2605,7 +2050,7 @@
cmd->flags |= COMMAND_CHECKED;
return true;
}
- if ((cmd->menu_id == MenuLocation) && (cmd->id == CmdLocation)){
+ if ((cmd->menu_id == MenuPhoneLocation) && (cmd->id == CmdPhoneLocation)){
unsigned n = 2;
QString phones = getContacts()->owner()->getPhones();
while (!phones.isEmpty()){
@@ -2614,9 +2059,9 @@
}
CommandDef *cmds = new CommandDef[n];
n = 0;
- cmds[n].id = CmdLocation;
+ cmds[n].id = CmdPhoneLocation;
cmds[n].text = I18N_NOOP("Not available");
- cmds[n].menu_id = MenuLocation;
+ cmds[n].menu_id = MenuPhoneLocation;
phones = getContacts()->owner()->getPhones();
bool bActive = false;
while (!phones.isEmpty()){
@@ -2626,9 +2071,9 @@
QString number = getToken(item, ',');
getToken(item, ',');
unsigned long icon = getToken(item, ',').toULong();
- cmds[n].id = CmdLocation + n;
+ cmds[n].id = CmdPhoneLocation + n;
cmds[n].text = "_";
- cmds[n].menu_id = MenuLocation;
+ cmds[n].menu_id = MenuPhoneLocation;
cmds[n].text_wrk = number;
if (!item.isEmpty()){
cmds[n].flags = COMMAND_CHECKED;
@@ -2789,6 +2234,10 @@
}
return true;
}
+ case eEventUpdateCommandState:{
+ EventUpdateCommandState *eucs = static_cast<EventUpdateCommandState*>(e);
+ return updateMainToolbar(eucs->commandID());
+ }
case eEventCommandExec:{
EventCommandExec *ece = static_cast<EventCommandExec*>(e);
CommandDef *cmd = ece->cmd();
@@ -3098,9 +2547,9 @@
}
return true;
}
- if (cmd->menu_id == MenuLocation){
+ if (cmd->menu_id == MenuPhoneLocation){
Contact *owner = getContacts()->owner();
- unsigned n = cmd->id - CmdLocation;
+ unsigned n = cmd->id - CmdPhoneLocation;
QString res;
QString phones = owner->getPhones();
while (!phones.isEmpty()){
@@ -3165,7 +2614,7 @@
}
return true;
}
- if (cmd->id == CmdChange){
+ if (cmd->id == CmdProfileChange){
QTimer::singleShot(0, this, SLOT(selectProfile()));
return true;
}
@@ -3512,6 +2961,7 @@
if (!cmd_line_profile.isEmpty()){
bCmdLineProfile = true;
setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
QString profileDir = user_file(cmd_line_profile);
QDir d(profileDir);
if (d.exists()) {
@@ -3573,6 +3023,7 @@
QString name;
setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
QDir d(user_file(QString::null));
while(1) {
if (!bCmdLineProfile){
@@ -3649,6 +3100,7 @@
m_main = new MainWindow(data.geometry);
m_view = new UserView;
+ bNew = bInit;
if (!bNew){
QString containers = getContainers();
while (!containers.isEmpty()){
@@ -3722,6 +3174,7 @@
{
QString saveProfile = getProfile();
setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
bool bOK = false;
QString baseName = user_file(QString::null);
QDir dir(baseName);
@@ -3826,7 +3279,8 @@
QString saveProfile = getProfile();
- setProfile(QString::null);
+ setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
load_data(generalCoreDataDef, &GeneralCoreData, NULL); // This will just init data
GeneralCoreData.Profile.str() = saveProfile;
@@ -4112,12 +3566,6 @@
}
EventCommandCreate(cmd).process();
- cmd->id = CmdChange;
- cmd->text = I18N_NOOP("Change profile");
- cmd->menu_grp = 0x10040;
- cmd->popup_id = 0;
- EventCommandCreate(cmd).process();
-
if (m_status == NULL)
m_status = new CommonStatus;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/core.h
^
|
@@ -28,7 +28,8 @@
#include "event.h"
#include "misc.h"
#include "plugins.h"
-
+#include "core_consts.h"
+#include "log.h"
typedef std::map<QString, unsigned> MAP_TYPES;
@@ -192,133 +193,6 @@
void addToContacts();
};
-const unsigned long CmdBase = 0x00020000;
-const unsigned long CmdInfo = (CmdBase + 0x001);
-const unsigned long CmdSearch = (CmdBase + 0x002);
-const unsigned long CmdConnections = (CmdBase + 0x003);
-const unsigned long CmdCM = (CmdBase + 0x004);
-const unsigned long CmdChange = (CmdBase + 0x005);
-const unsigned long CmdShowPanel = (CmdBase + 0x006);
-const unsigned long CmdCommonStatus = (CmdBase + 0x007);
-const unsigned long CmdTitle = (CmdBase + 0x008);
-const unsigned long CmdSetup = (CmdBase + 0x009);
-const unsigned long CmdMainWindow = (CmdBase + 0x00B); // 11
-const unsigned long CmdUserView = (CmdBase + 0x00C); // 12
-const unsigned long CmdContainer = (CmdBase + 0x00D); // 13
-const unsigned long CmdClose = (CmdBase + 0x00E); // 14
-const unsigned long CmdContainerContact = (CmdBase + 0x00F); // 15
-const unsigned long CmdContainerContacts = (CmdBase + 0x010); // 16
-const unsigned long CmdSendMessage = (CmdBase + 0x011); // 17
-const unsigned long CmdSend = (CmdBase + 0x012); // 18
-const unsigned long CmdStatusMenu = (CmdBase + 0x014); // 20
-const unsigned long CmdStatusBar = (CmdBase + 0x015); // 21
-const unsigned long CmdQuit = (CmdBase + 0x017); // 23 // FIXME: Why do CmdQuit & CmdMenu has the same numbers?
-const unsigned long CmdMenu = (CmdBase + 0x017); // 23
-const unsigned long CmdOnline = (CmdBase + 0x018); // 24
-const unsigned long CmdGroup = (CmdBase + 0x019); // 25
-const unsigned long CmdGrpOff = (CmdBase + 0x01A); // 26
-const unsigned long CmdGrpMode1 = (CmdBase + 0x01B); // 27
-const unsigned long CmdGrpMode2 = (CmdBase + 0x01C); // 28
-const unsigned long CmdGrpCreate = (CmdBase + 0x01D); // 29
-const unsigned long CmdGrpRename = (CmdBase + 0x01E); // 30
-const unsigned long CmdGrpDelete = (CmdBase + 0x01F); // 31
-const unsigned long CmdGrpTitle = (CmdBase + 0x020); // 32
-const unsigned long CmdGrpUp = (CmdBase + 0x021); // 33
-const unsigned long CmdGrpDown = (CmdBase + 0x022); // 34
-const unsigned long CmdContactTitle = (CmdBase + 0x023); // 35
-const unsigned long CmdContactRename = (CmdBase + 0x024); // 36
-const unsigned long CmdContactDelete = (CmdBase + 0x025); // 37
-const unsigned long CmdConfigure = (CmdBase + 0x026); // 38
-const unsigned long CmdMessageType = (CmdBase + 0x027); // 39
-const unsigned long CmdSendClose = (CmdBase + 0x028); // 40
-const unsigned long CmdSmile = (CmdBase + 0x029); // 41
-const unsigned long CmdMultiply = (CmdBase + 0x02A); // 42
-const unsigned long CmdSendSMS = (CmdBase + 0x02B); // 43
-const unsigned long CmdInvisible = (CmdBase + 0x02C); // 44
-const unsigned long CmdHistory = (CmdBase + 0x02D); // 45
-const unsigned long CmdHistorySave = (CmdBase + 0x02E); // 46
-const unsigned long CmdHistoryDirection = (CmdBase + 0x02F); // 47
-const unsigned long CmdHistoryNext = (CmdBase + 0x030); // 48
-const unsigned long CmdHistoryPrev = (CmdBase + 0x031); // 49
-const unsigned long CmdMsgOpen = (CmdBase + 0x033); // 51
-const unsigned long CmdMsgQuote = (CmdBase + 0x035); // 53
-const unsigned long CmdMsgAnswer = (CmdBase + 0x036); // 54
-const unsigned long CmdMsgForward = (CmdBase + 0x037); // 55
-const unsigned long CmdCopy = (CmdBase + 0x038); // 56
-const unsigned long CmdCut = (CmdBase + 0x039); // 57
-const unsigned long CmdPaste = (CmdBase + 0x03A); // 58
-const unsigned long CmdSelectAll = (CmdBase + 0x03B); // 59
-const unsigned long CmdUndo = (CmdBase + 0x03C); // 60
-const unsigned long CmdRedo = (CmdBase + 0x03D); // 61
-const unsigned long CmdClear = (CmdBase + 0x03E); // 62
-const unsigned long CmdSeparate = (CmdBase + 0x03F); // 63
-const unsigned long CmdNextMessage = (CmdBase + 0x041); // 65
-const unsigned long CmdGrantAuth = (CmdBase + 0x042); // 66
-const unsigned long CmdRefuseAuth = (CmdBase + 0x043); // 67
-const unsigned long CmdPhones = (CmdBase + 0x047); // 71
-const unsigned long CmdLocation = (CmdBase + 0x048); // 72
-const unsigned long CmdPhoneState = (CmdBase + 0x049); // 73
-const unsigned long CmdPhoneNoShow = (CmdBase + 0x04A); // 74
-const unsigned long CmdPhoneAvailable = (CmdBase + 0x04B); // 75
-const unsigned long CmdPhoneBusy = (CmdBase + 0x04C); // 76
-const unsigned long CmdPhoneBook = (CmdBase + 0x04D); // 77
-const unsigned long CmdShowAlways = (CmdBase + 0x04E); // 78
-const unsigned long CmdFileAccept = (CmdBase + 0x04F); // 79
-const unsigned long CmdFileDecline = (CmdBase + 0x050); // 80
-const unsigned long CmdDeclineWithoutReason = (CmdBase + 0x051); // 81
-const unsigned long CmdDeclineReasonInput = (CmdBase + 0x052); // 82
-const unsigned long CmdDeclineReasonBusy = (CmdBase + 0x053); // 83
-const unsigned long CmdDeclineReasonLater = (CmdBase + 0x054); // 84
-const unsigned long CmdHistoryFind = (CmdBase + 0x055); // 85
-const unsigned long CmdFileName = (CmdBase + 0x056); // 86
-const unsigned long CmdPhoneNumber = (CmdBase + 0x057); // 87
-const unsigned long CmdTranslit = (CmdBase + 0x058); // 88
-const unsigned long CmdUrlInput = (CmdBase + 0x059); // 89
-const unsigned long CmdCutHistory = (CmdBase + 0x05A); // 90
-const unsigned long CmdDeleteMessage = (CmdBase + 0x05B); // 91
-const unsigned long CmdEditList = (CmdBase + 0x05C); // 92
-const unsigned long CmdRemoveList = (CmdBase + 0x05D); // 93
-const unsigned long CmdStatusWnd = (CmdBase + 0x05E); // 94
-const unsigned long CmdEmptyGroup = (CmdBase + 0x05F); // 95
-const unsigned long CmdEnableSpell = (CmdBase + 0x060); // 96
-const unsigned long CmdSpell = (CmdBase + 0x061); // 97
-const unsigned long CmdChangeEncoding = (CmdBase + 0x062); // 98
-const unsigned long CmdAllEncodings = (CmdBase + 0x063); // 99
-const unsigned long CmdSearchInfo = (CmdBase + 0x065); // 101
-const unsigned long CmdSearchMsg = (CmdBase + 0x066); // 102
-const unsigned long CmdSearchOptions = (CmdBase + 0x067); // 103
-const unsigned long CmdFetchAway = (CmdBase + 0x068); // 104
-const unsigned long CmdHistoryAvatar = (CmdBase + 0x069); // 105
-
-const unsigned long CmdContactGroup = (CmdBase + 0x100);
-const unsigned long CmdUnread = (CmdBase + 0x200);
-const unsigned long CmdContactClients = (CmdBase + 0x300);
-const unsigned long CmdMsgSpecial = (CmdBase + 0x400);
-const unsigned long CmdClient = (CmdBase + 0x500);
-const unsigned long CmdContactResource = (CmdBase + 0x600);
-const unsigned long CmdReceived = 0x600; //FIXME: Why it does not have CmdBase in it?
-
-const unsigned long MenuConnections = (CmdBase + 0x001);
-const unsigned long MenuContainerContact = (CmdBase + 0x002);
-const unsigned long MenuStatus = (CmdBase + 0x003);
-const unsigned long MenuGroups = (CmdBase + 0x004);
-const unsigned long MenuMsgView = (CmdBase + 0x005);
-const unsigned long MenuTextEdit = (CmdBase + 0x006);
-const unsigned long MenuMsgCommand = (CmdBase + 0x007);
-const unsigned long MenuPhones = (CmdBase + 0x008);
-const unsigned long MenuLocation = (CmdBase + 0x009);
-const unsigned long MenuPhoneState = (CmdBase + 0x00A); // 10
-const unsigned long MenuFileDecline = (CmdBase + 0x00B); // 11
-const unsigned long MenuMailList = (CmdBase + 0x00C); // 12
-const unsigned long MenuPhoneList = (CmdBase + 0x00D); // 13
-const unsigned long MenuStatusWnd = (CmdBase + 0x00E); // 14
-const unsigned long MenuEncoding = (CmdBase + 0x00F); // 15
-const unsigned long MenuSearchItem = (CmdBase + 0x010); // 16
-const unsigned long MenuSearchGroups = (CmdBase + 0x011); // 17
-const unsigned long MenuSearchOptions = (CmdBase + 0x012); // 18
-
-const unsigned long BarHistory = (CmdBase + 0x001);
-const unsigned long BarHistoryAvatar = (CmdBase + 0x002);
#include "core_events.h"
@@ -508,6 +382,16 @@
QString typeName(const QString &name);
void setAutoReplies();
bool lockProfile(const QString &profile, bool bSend = false);
+
+ void createMainToolbar();
+ bool updateMainToolbar(unsigned long commandID);
+ void createHistoryToolbar();
+ void createContainerToolbar();
+ void createMsgEditToolbar();
+ void createTextEditToolbar();
+ void createMenuMsgView(); // in msgview_menu.cpp
+ void createMenuTextEdit(); // in textedit_menu.cpp
+
bool m_bInit;
QStringList m_profiles;
QWidget *m_cfg;
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/_core/core_consts.h
^
|
@@ -0,0 +1,198 @@
+/***************************************************************************
+ core_consts.h
+
+ This file defines constants for Command IDs, Menu IDs and ToolBar
+ IDs.
+
+ Command ID (const named CmdXXXXX) is an unic int number which is
+ associated with certain command. In most cases commands are
+ associtated with menu(or toolbar) items, so one may say that CmdXXXXXX
+ is an unique id of menu(or toolbar) item.
+
+ Menu ID (const named MenuXXXXX) is a unique number which is
+ associated with each menu(main menu, context menu, etc... any menu in
+ Sim-IM has it's own Menu ID). It is used for creating and showing
+ certain menu, and, as well, to specify pull down menu for certain menu
+ item.
+
+ ToolBar ID (const namedToolBarXXXXXX) - an unique number that
+ identifies certain toolbar.
+
+ -------------------
+ begin : Tue Nov 30 2008
+ based on : core.h of Sim-IM by Vladimir Shutoff
+ and Sim-IM team
+ copyright : (C) 2002 - 2004 Vladimir Shutoff
+ (C) 2004 - 2008 Sim-IM Development Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _CORE_CONSTS_H
+#define _CORE_CONSTS_H
+
+const unsigned long CmdBase = 0x00020000;
+const unsigned long CmdInfo = (CmdBase + 0x001);
+const unsigned long CmdSearch = (CmdBase + 0x002);
+const unsigned long CmdConnections = (CmdBase + 0x003);
+const unsigned long CmdCM = (CmdBase + 0x004);
+const unsigned long CmdProfileChange = (CmdBase + 0x005);
+const unsigned long CmdShowPanel = (CmdBase + 0x006);
+const unsigned long CmdCommonStatus = (CmdBase + 0x007);
+const unsigned long CmdTitle = (CmdBase + 0x008);
+const unsigned long CmdSetup = (CmdBase + 0x009);
+const unsigned long CmdMainWindow = (CmdBase + 0x00B); // 11
+const unsigned long CmdUserView = (CmdBase + 0x00C); // 12
+const unsigned long CmdContainer = (CmdBase + 0x00D); // 13
+const unsigned long CmdClose = (CmdBase + 0x00E); // 14
+const unsigned long CmdContainerContact = (CmdBase + 0x00F); // 15
+const unsigned long CmdContainerContacts = (CmdBase + 0x010); // 16
+const unsigned long CmdSendMessage = (CmdBase + 0x011); // 17
+const unsigned long CmdSend = (CmdBase + 0x012); // 18
+const unsigned long CmdStatusMenu = (CmdBase + 0x014); // 20
+const unsigned long CmdStatusBar = (CmdBase + 0x015); // 21
+const unsigned long CmdMenu = (CmdBase + 0x017); // 23
+const unsigned long CmdOnline = (CmdBase + 0x018); // 24 //FIXME: Rename to CmdShowOfflineContacts to make code more sensible
+const unsigned long CmdGroup = (CmdBase + 0x019); // 25
+const unsigned long CmdGrpOff = (CmdBase + 0x01A); // 26
+const unsigned long CmdGrpMode1 = (CmdBase + 0x01B); // 27
+const unsigned long CmdGrpMode2 = (CmdBase + 0x01C); // 28
+const unsigned long CmdGrpCreate = (CmdBase + 0x01D); // 29
+const unsigned long CmdGrpRename = (CmdBase + 0x01E); // 30
+const unsigned long CmdGrpDelete = (CmdBase + 0x01F); // 31
+const unsigned long CmdGrpTitle = (CmdBase + 0x020); // 32
+const unsigned long CmdGrpUp = (CmdBase + 0x021); // 33
+const unsigned long CmdGrpDown = (CmdBase + 0x022); // 34
+const unsigned long CmdContactTitle = (CmdBase + 0x023); // 35
+const unsigned long CmdContactRename = (CmdBase + 0x024); // 36
+const unsigned long CmdContactDelete = (CmdBase + 0x025); // 37
+const unsigned long CmdConfigure = (CmdBase + 0x026); // 38
+const unsigned long CmdMessageType = (CmdBase + 0x027); // 39
+const unsigned long CmdSendClose = (CmdBase + 0x028); // 40
+const unsigned long CmdSmile = (CmdBase + 0x029); // 41
+const unsigned long CmdMultiply = (CmdBase + 0x02A); // 42
+const unsigned long CmdSendSMS = (CmdBase + 0x02B); // 43
+const unsigned long CmdInvisible = (CmdBase + 0x02C); // 44
+const unsigned long CmdHistory = (CmdBase + 0x02D); // 45
+const unsigned long CmdHistorySave = (CmdBase + 0x02E); // 46
+const unsigned long CmdHistoryDirection = (CmdBase + 0x02F); // 47
+const unsigned long CmdHistoryNext = (CmdBase + 0x030); // 48
+const unsigned long CmdHistoryPrev = (CmdBase + 0x031); // 49
+const unsigned long CmdMsgOpen = (CmdBase + 0x033); // 51
+const unsigned long CmdMsgQuote = (CmdBase + 0x035); // 53
+const unsigned long CmdMsgAnswer = (CmdBase + 0x036); // 54
+const unsigned long CmdMsgForward = (CmdBase + 0x037); // 55
+const unsigned long CmdCopy = (CmdBase + 0x038); // 56
+const unsigned long CmdCut = (CmdBase + 0x039); // 57
+const unsigned long CmdPaste = (CmdBase + 0x03A); // 58
+const unsigned long CmdSelectAll = (CmdBase + 0x03B); // 59
+const unsigned long CmdUndo = (CmdBase + 0x03C); // 60
+const unsigned long CmdRedo = (CmdBase + 0x03D); // 61
+const unsigned long CmdClear = (CmdBase + 0x03E); // 62
+const unsigned long CmdSeparate = (CmdBase + 0x03F); // 63
+const unsigned long CmdNextMessage = (CmdBase + 0x041); // 65
+const unsigned long CmdGrantAuth = (CmdBase + 0x042); // 66
+const unsigned long CmdRefuseAuth = (CmdBase + 0x043); // 67
+const unsigned long CmdPhones = (CmdBase + 0x047); // 71
+const unsigned long CmdPhoneLocation = (CmdBase + 0x048); // 72
+const unsigned long CmdPhoneState = (CmdBase + 0x049); // 73
+const unsigned long CmdPhoneNoShow = (CmdBase + 0x04A); // 74
+const unsigned long CmdPhoneAvailable = (CmdBase + 0x04B); // 75
+const unsigned long CmdPhoneBusy = (CmdBase + 0x04C); // 76
+const unsigned long CmdPhoneBook = (CmdBase + 0x04D); // 77
+const unsigned long CmdShowAlways = (CmdBase + 0x04E); // 78
+const unsigned long CmdFileAccept = (CmdBase + 0x04F); // 79
+const unsigned long CmdFileDecline = (CmdBase + 0x050); // 80
+const unsigned long CmdDeclineWithoutReason = (CmdBase + 0x051); // 81
+const unsigned long CmdDeclineReasonInput = (CmdBase + 0x052); // 82
+const unsigned long CmdDeclineReasonBusy = (CmdBase + 0x053); // 83
+const unsigned long CmdDeclineReasonLater = (CmdBase + 0x054); // 84
+const unsigned long CmdHistoryFind = (CmdBase + 0x055); // 85
+const unsigned long CmdFileName = (CmdBase + 0x056); // 86
+const unsigned long CmdPhoneNumber = (CmdBase + 0x057); // 87
+const unsigned long CmdTranslit = (CmdBase + 0x058); // 88
+const unsigned long CmdUrlInput = (CmdBase + 0x059); // 89
+const unsigned long CmdCutHistory = (CmdBase + 0x05A); // 90
+const unsigned long CmdDeleteMessage = (CmdBase + 0x05B); // 91
+const unsigned long CmdEditList = (CmdBase + 0x05C); // 92
+const unsigned long CmdRemoveList = (CmdBase + 0x05D); // 93
+const unsigned long CmdStatusWnd = (CmdBase + 0x05E); // 94
+const unsigned long CmdEmptyGroup = (CmdBase + 0x05F); // 95
+const unsigned long CmdEnableSpell = (CmdBase + 0x060); // 96
+const unsigned long CmdSpell = (CmdBase + 0x061); // 97
+const unsigned long CmdChangeEncoding = (CmdBase + 0x062); // 98
+const unsigned long CmdAllEncodings = (CmdBase + 0x063); // 99
+const unsigned long CmdSearchInfo = (CmdBase + 0x065); // 101
+const unsigned long CmdSearchMsg = (CmdBase + 0x066); // 102
+const unsigned long CmdSearchOptions = (CmdBase + 0x067); // 103
+const unsigned long CmdFetchAway = (CmdBase + 0x068); // 104
+const unsigned long CmdHistoryAvatar = (CmdBase + 0x069); // 105
+const unsigned long CmdQuit = (CmdBase + 0x070); // 106
+const unsigned long CmdGroupToolbarButton = (CmdBase + 0x071); // 107
+
+const unsigned long CmdContactGroup = (CmdBase + 0x100);
+const unsigned long CmdUnread = (CmdBase + 0x200);
+const unsigned long CmdContactClients = (CmdBase + 0x300);
+const unsigned long CmdMsgSpecial = (CmdBase + 0x400);
+const unsigned long CmdClient = (CmdBase + 0x500);
+const unsigned long CmdContactResource = (CmdBase + 0x600);
+const unsigned long CmdReceived = 0x600; //FIXME: Why it does not have CmdBase in it?
+
+// These consts are really defined at textshow.h, but listed here
+// as a comments, in order to have a full comand list in one file:
+//
+//const unsigned TextCmdBase = 0x00030000;
+//const unsigned CmdBgColor = TextCmdBase;
+//const unsigned CmdFgColor = TextCmdBase + 1;
+//const unsigned CmdBold = TextCmdBase + 2;
+//const unsigned CmdItalic = TextCmdBase + 3;
+//const unsigned CmdUnderline = TextCmdBase + 4;
+//const unsigned CmdFont = TextCmdBase + 5;
+
+// *** Here we defines ids for all menus used in _core plugin ***
+
+// Main menu and it's submenus
+const unsigned MenuMain = 0x0001;
+const unsigned MenuStatus = 0x0002;
+const unsigned MenuGroups = 0x0003;
+const unsigned MenuPhones = 0x0004;
+const unsigned MenuPhoneLocation = 0x0005;
+const unsigned MenuPhoneState = 0x0006;
+const unsigned MenuConnections = 0x0007;
+// other menus
+const unsigned MenuGroup = 0x1001; // Context menu for Group item in userlist
+const unsigned MenuContact = 0x1002; // Context menu for Contact item in userlist
+const unsigned MenuContactGroup = 0x1003;
+const unsigned MenuContainer = 0x1004;
+const unsigned MenuMessage = 0x1005;
+const unsigned MenuContainerContact = 0x1006;
+const unsigned MenuMsgView = 0x1007;
+const unsigned MenuTextEdit = 0x1008;
+const unsigned MenuMsgCommand = 0x1009;
+const unsigned MenuFileDecline = 0x100A;
+const unsigned MenuMailList = 0x100B;
+const unsigned MenuPhoneList = 0x100C;
+const unsigned MenuStatusWnd = 0x100D;
+const unsigned MenuEncoding = 0x100E;
+const unsigned MenuSearchItem = 0x100F;
+const unsigned MenuSearchGroups = 0x1010;
+const unsigned MenuSearchOptions = 0x1011;
+
+// *** Here we defines ids for all toolbars used in _core plugin ***
+
+const unsigned ToolBarMain = 1;
+const unsigned ToolBarContainer = 2;
+const unsigned ToolBarTextEdit = 3;
+const unsigned ToolBarMsgEdit = 4;
+const unsigned ToolBarHistory = 5;
+const unsigned ToolBarHistoryAvatar = 6;
+
+
+#endif
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/filetransfer.cpp
^
|
@@ -213,7 +213,7 @@
}
FileTransferDlg::FileTransferDlg(FileMessage *msg)
- : FileTransferBase(NULL, "filetransfer", false, WDestructiveClose)
+ : FileTransferBase(NULL, "filetransfer", false, Qt::WDestructiveClose | Qt::WStyle_Title| Qt::WStyle_NormalBorder |Qt::WStyle_Customize | Qt::WStyle_MinMax | Qt::WStyle_SysMenu)
{
m_msg = msg;
SET_WNDPROC("filetransfer")
@@ -494,6 +494,8 @@
void FileTransferDlg::action(int nAct, void*)
{
+ if(!m_msg->m_transfer)
+ return;
FileTransferDlgNotify *notify = static_cast<FileTransferDlgNotify*>(m_msg->m_transfer->notify());
FileTransfer *ft = m_msg->m_transfer;
switch (nAct){
@@ -519,10 +521,14 @@
{
if (m_dir.isEmpty())
return;
- QString path = "file:" + m_dir;
+#ifdef WIN32
+ QString path = QString("file:") + QString("\"") + m_dir + QString("\"");
+#else
+ QString path = QString("file:") + m_dir;
+#endif
/* Now replace spaces with %20 so the path isn't truncated
are there any other separators we need to care of ?*/
- path.replace(' ',"%20");
+ //path.replace(' ',"%20");
EventGoURL e(path);
e.process();
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/historywnd.cpp
^
|
@@ -93,7 +93,7 @@
m_view = new MsgViewBase(this, NULL, id);
setCentralWidget(m_view);
- EventToolbar eHistoryBar(BarHistory, this);
+ EventToolbar eHistoryBar(ToolBarHistory, this);
eHistoryBar.process();
m_bar = eHistoryBar.toolBar();
m_bar->setParam((void*)m_id);
@@ -133,8 +133,8 @@
}
if (!img.isNull()) {
- EventToolbar(BarHistoryAvatar, EventToolbar::eAdd).process();
- EventToolbar e(BarHistoryAvatar, this);
+ EventToolbar(ToolBarHistoryAvatar, EventToolbar::eAdd).process();
+ EventToolbar e(ToolBarHistoryAvatar, this);
e.process();
m_avatar_bar = e.toolBar();
m_avatar_bar->setOrientation(Qt::Vertical);
@@ -144,7 +144,7 @@
Command cmd;
cmd->id = CmdHistoryAvatar;
- cmd->bar_id = BarHistoryAvatar;
+ cmd->bar_id = ToolBarHistoryAvatar;
cmd->bar_grp = 0x2000;
cmd->text = QString::null;
cmd->icon = "empty";
@@ -205,8 +205,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->id == CmdHistoryDirection) && ((unsigned long)(cmd->param) == m_id)){
cmd->flags &= ~COMMAND_CHECKED;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/logindlg.cpp
^
|
@@ -77,12 +77,11 @@
connect(btnRename, SIGNAL(clicked()), this, SLOT(profileRename()));
profileChanged(cmbProfile->currentItem());
- CorePlugin::m_plugin->setProfile(QString::null); // This will minimize the risk of loosing current profile on
- // QApplication::commitData() when no profile is selected yet.
-
- // FIXME: To completely remove this risk, one should not setProfile before profile is
- // really loaded, or set a flag, that profile is not really loaded and check in when
- // writing configure files
+ //CorePlugin::m_plugin->setProfile(CorePlugin::m_plugin->getProfile()); //This was a temporary testfix ;)
+ //init setProfile with QString::null is here a bad idea because f.e. on icq-disconnect or any bad login/password combination this dialog comes up,
+ //the profile-name is still the same, but get lost if empty initialized, and SIM saves all content, history, styles, pictures not in Profile but in GLOBAL Folder, this has to be prevented.
+
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
}
LoginDialog::~LoginDialog()
@@ -133,6 +132,7 @@
CorePlugin::m_plugin->setSavePasswd(chkSave->isChecked());
CorePlugin::m_plugin->setNoShow(chkNoShow->isChecked());
CorePlugin::m_plugin->setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
CorePlugin::m_plugin->changeProfile();
LoginDialogBase::accept();
return;
@@ -192,6 +192,9 @@
return;
}
LoginDialogBase::accept();
+ EventLoginStart ev;
+ ev.process();
+
}
void LoginDialog::reject()
@@ -350,6 +353,7 @@
}else{
cmbProfile->setCurrentItem(cmbProfile->count() - 1);
CorePlugin::m_plugin->setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
}
}
@@ -389,6 +393,7 @@
CorePlugin::m_plugin->setProfile(curProfile);
rmDir(user_file(""));
CorePlugin::m_plugin->setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
CorePlugin::m_plugin->changeProfile();
CorePlugin::m_plugin->m_profiles.clear();
CorePlugin::m_plugin->loadDir();
@@ -408,6 +413,7 @@
QString name = old_name;
CorePlugin::m_plugin->setProfile(QString::null);
+ //log(L_WARN, QString("PROFILE SET TO QString::null in File: %1 Function: %2 Line: %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
QString profileDir=user_file("");
QDir d(user_file(""));
while(1) {
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/maininfo.cpp
^
|
@@ -93,7 +93,7 @@
}
Command cmd;
cmd->id = CmdPhones;
- if (!EventCheckState(cmd).process()){
+ if (!EventCheckCommandState(cmd).process()){
lblCurrent->hide();
cmbCurrent->hide();
lblStatus->hide();
@@ -128,8 +128,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->menu_id == MenuMailList){
if ((cmd->id != CmdEditList) && (cmd->id != CmdRemoveList))
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgauth.cpp
^
|
@@ -55,8 +55,8 @@
bool MsgAuth::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgcontacts.cpp
^
|
@@ -90,8 +90,8 @@
bool MsgContacts::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgedit.cpp
^
|
@@ -103,7 +103,7 @@
c->id = cmd->id;
c->menu_id = MenuMessage;
c->param = (void*)(m_edit->m_userWnd->id());
- if (EventCheckState(c).process())
+ if (EventCheckCommandState(c).process())
break;
delete msg;
msg = NULL;
@@ -1024,13 +1024,13 @@
cmd->param = (void*)(m_userWnd->m_id);
cmd->id = m_userWnd->getMessageType();
if (m_userWnd->getMessageType() != m_type) {
- if(EventCheckState(cmd).process()) {
+ if(EventCheckCommandState(cmd).process()) {
if (setType(m_userWnd->getMessageType()))
return true;
}
}
cmd->id = m_type;
- if(EventCheckState(cmd).process())
+ if(EventCheckCommandState(cmd).process())
return true;
EventMenuGetDef eMenu(MenuMessage);
eMenu.process();
@@ -1043,7 +1043,7 @@
if (c->id == CmdContactClients)
continue;
c->param = (void*)(m_userWnd->m_id);
- if (!EventCheckState(c).process())
+ if (!EventCheckCommandState(c).process())
continue;
if (setType(c->id)){
bSet = true;
@@ -1097,8 +1097,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->param == this) && (cmd->id == CmdTranslit)){
Contact *contact = getContacts()->contact(m_userWnd->id());
@@ -1334,7 +1334,7 @@
CommandDef *c;
while ((c = ++itc) != NULL){
c->param = (void*)(m_userWnd->m_id);
- if (EventCheckState(c).process()){
+ if (EventCheckCommandState(c).process()){
Message *msg;
CommandDef *def = CorePlugin::m_plugin->messageTypes.find(c->id);
if (def == NULL)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgfile.cpp
^
|
@@ -122,8 +122,8 @@
bool MsgFile::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msggen.cpp
^
|
@@ -89,8 +89,8 @@
bool MsgGen::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgrecv.cpp
^
|
@@ -110,8 +110,8 @@
}
}
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
@@ -127,7 +127,7 @@
if (msg){
c.id -= CmdReceived;
c.param = msg;
- if (EventCheckState(&c).process())
+ if (EventCheckCommandState(&c).process())
cmd->flags &= ~BTN_HIDE;
if (m_msg == NULL)
delete msg;
@@ -149,7 +149,7 @@
if (msg){
CommandDef c = *d;
c.param = msg;
- if (EventCheckState(&c).process())
+ if (EventCheckCommandState(&c).process())
cmd->flags &= ~BTN_HIDE;
if (m_msg == NULL)
delete msg;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgsms.cpp
^
|
@@ -178,8 +178,8 @@
bool MsgSMS::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgurl.cpp
^
|
@@ -102,8 +102,8 @@
bool MsgUrl::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/msgview.cpp
^
|
@@ -925,8 +925,8 @@
if (e->type() == eEventHistoryColors) {
setColors();
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->param != this) || (cmd->menu_id != MenuMsgView))
return false;
@@ -1001,7 +1001,7 @@
CommandDef cmd = *c;
cmd.menu_id = MenuMsgCommand;
cmd.param = msg;
- if (!EventCheckState(&cmd).process())
+ if (!EventCheckCommandState(&cmd).process())
continue;
cmd.flags &= ~COMMAND_CHECK_STATE;
cmds[n++] = cmd;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/search.cpp
^
|
@@ -374,8 +374,8 @@
}
break;
}
- case eEventCheckState:{
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState:{
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->id == CmdSearchOptions) && (cmd->menu_id == MenuSearchItem)){
EventMenuGetDef eMenu(MenuSearchOptions);
@@ -395,7 +395,7 @@
while ((s = ++list) != NULL){
if (s->flags & COMMAND_CHECK_STATE){
CommandDef cCheck = *s;
- if (!EventCheckState(&cCheck).process())
+ if (!EventCheckCommandState(&cCheck).process())
continue;
}
if (prev && ((prev & 0xFF00) != (s->menu_grp & 0xFF00)))
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/searchall.h
^
|
@@ -18,6 +18,9 @@
#ifndef _SEARCHALL_H
#define _SEARCHALL_H
+#ifdef __OS2__ // to make it compileable under OS/2 (gcc 3.3.5)
+#include "simapi.h"
+#endif
#include "searchallbase.h"
typedef std::map<QWidget*, QStringList> WND_MAP;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/status.cpp
^
|
@@ -395,8 +395,8 @@
rebuildStatus();
break;
}
- case eEventCheckState:{
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState:{
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *def = ecs->cmd();
if (def->menu_id == MenuStatus){
if (def->id == CmdInvisible){
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/statuswnd.cpp
^
|
@@ -184,8 +184,8 @@
delete l;
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->menu_id == MenuStatusWnd) && (cmd->id == CmdStatusWnd)){
unsigned n = 0;
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/_core/toolbar_container.cpp
^
|
@@ -0,0 +1,143 @@
+/***************************************************************************
+ toolbar_container.cpp
+
+ This file contains subroutine that creates toolbar and it's submenu
+ for container window (One might call it chat-window, but in Sim-IM
+ terminology it is calld container).
+ Note that only static items are created here. Some items of MenuMessage
+ are created by MsgEdit::setupMessages(); (msgedit.cpp) while creating
+ message types. Some items somewhere else (I (shaplov) did not explore this
+ issue yet)
+ -------------------
+ begin : Tue Nov 26 2008
+ based on : core.cpp of Sim-IM by Vladimir Shutoff
+ and Sim-IM team
+ copyright : (C) 2002 - 2004 Vladimir Shutoff
+ (C) 2004 - 2008 Sim-IM Development Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "core.h"
+
+using namespace SIM;
+
+void CorePlugin::createContainerToolbar()
+{
+ Command cmd;
+
+ EventToolbar(ToolBarContainer, EventToolbar::eAdd).process();
+
+ cmd->id = CmdMessageType;
+ cmd->text = I18N_NOOP("Message");
+ cmd->icon = "message";
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0x2000;
+ cmd->menu_id = 0;
+ cmd->menu_grp = 0;
+ cmd->popup_id = MenuMessage;
+ cmd->flags = BTN_PICT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdContainerContact;
+ cmd->text = I18N_NOOP("Contact");
+ cmd->icon = "empty";
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0x6000;
+ cmd->popup_id = MenuContainerContact;
+ cmd->flags = BTN_PICT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdContactGroup;
+ cmd->text = I18N_NOOP("Group");
+ cmd->icon = "grp_on";
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0x7000;
+ cmd->popup_id = MenuContactGroup;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdInfo;
+ cmd->text = I18N_NOOP("User &info");
+ cmd->icon = "info";
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0x8000;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdHistory;
+ cmd->text = I18N_NOOP("&History");
+ cmd->icon = "history";
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0x8010;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdChangeEncoding;
+ cmd->text = I18N_NOOP("Change &encoding");
+ cmd->icon = "encoding";
+ cmd->menu_id = 0;
+ cmd->menu_grp = 0;
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0x8080;
+ cmd->popup_id = MenuEncoding;
+ cmd->flags = COMMAND_CHECK_STATE;
+
+ EventCommandCreate(cmd).process();
+ cmd->id = CmdClose;
+ cmd->text = I18N_NOOP("Close");
+ cmd->icon = "exit";
+ cmd->bar_id = ToolBarContainer;
+ cmd->bar_grp = 0xF000;
+ cmd->accel = "Esc";
+ cmd->flags = COMMAND_DEFAULT;
+ cmd->popup_id = 0;
+ EventCommandCreate(cmd).process();
+
+
+ // First menu of this tootbar: list of message types that can be sent to the contact
+ // displayed in chat window, and also list of different contact entities of meta-contact
+ // (if we have meta-contact) also with types of messages can be send to particular contact.
+
+ // Some items ot this menu are added by MsgEdit::setupMessages(); (msgedit.cpp), witch is called at
+ // CorePlugin constructor, right after this function. MsgEdit::setupMessages() creates message
+ // types and creatins of message types creates menu item in MenuMessage (strange idea, isn't it?)
+ // And there are also plases where this menu is filled. Please use 'grep' to find them
+
+ EventMenu(MenuMessage, EventMenu::eAdd).process();
+
+ cmd->id = CmdContactClients;
+ cmd->text = "_";
+ cmd->icon = "NULL";
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuMessage;
+ cmd->menu_grp = 0x30FF;
+ cmd->accel = QString::null;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+
+ // Second menu of this toolbar: list of chats that are opened in this container
+ // To see where this menu is filled please use 'grep CmdContainerContacts *'
+ EventMenu(MenuContainerContact, EventMenu::eAdd).process();
+
+ cmd->id = CmdContainerContacts;
+ cmd->text = "_";
+ cmd->icon = QString::null;
+ cmd->menu_id = MenuContainerContact;
+ cmd->menu_grp = 0x1000;
+ cmd->bar_id = 0;
+ cmd->bar_grp = 0;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+}
\ No newline at end of file
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/_core/toolbar_history.cpp
^
|
@@ -0,0 +1,85 @@
+/***************************************************************************
+ toolbar_history.cpp
+
+ This file contains subroutine that creates toolbar for history window
+ -------------------
+ begin : Tue Nov 26 2008
+ based on : core.cpp of Sim-IM by Vladimir Shutoff
+ and Sim-IM team
+ copyright : (C) 2002 - 2004 Vladimir Shutoff
+ (C) 2004 - 2008 Sim-IM Development Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "core.h"
+
+using namespace SIM;
+
+void CorePlugin::createHistoryToolbar()
+{
+ EventToolbar(ToolBarHistory, EventToolbar::eAdd).process();
+ Command cmd;
+
+ cmd->id = CmdHistoryDirection;
+ cmd->text = I18N_NOOP("&Direction");
+ cmd->icon = "1uparrow";
+ cmd->icon_on = "1downarrow";
+ cmd->bar_id = ToolBarHistory;
+ cmd->bar_grp = 0x2000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdHistoryFind;
+ cmd->text = I18N_NOOP("&Filter");
+ cmd->icon = "filter";
+ cmd->icon_on = "filter";
+ cmd->bar_id = ToolBarHistory;
+ cmd->bar_grp = 0x3000;
+ cmd->flags = BTN_COMBO_CHECK;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdHistoryPrev;
+ cmd->text = I18N_NOOP("&Previous page");
+ cmd->icon = "1leftarrow";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarHistory;
+ cmd->bar_grp = 0x5000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdHistoryNext;
+ cmd->text = I18N_NOOP("&Next page");
+ cmd->icon = "1rightarrow";
+ cmd->bar_id = ToolBarHistory;
+ cmd->bar_grp = 0x5001;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdHistorySave;
+ cmd->text = I18N_NOOP("&Save as text");
+ cmd->icon = "filesave";
+ cmd->accel = "Ctrl+S";
+ cmd->bar_id = ToolBarHistory;
+ cmd->bar_grp = 0x6000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdChangeEncoding;
+ cmd->text = I18N_NOOP("Change &encoding");
+ cmd->icon = "encoding";
+ cmd->menu_id = 0;
+ cmd->bar_id = ToolBarHistory;
+ cmd->bar_grp = 0x8080;
+ cmd->popup_id = MenuEncoding;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+}
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/_core/toolbar_main.cpp
^
|
@@ -0,0 +1,353 @@
+/***************************************************************************
+ toolbar_main.cpp
+
+ This file contains subroutines for creating and processing main window
+ toolbar and it's pull-down menus.
+ -------------------
+ begin : Tue Nov 26 2008
+ based on : core.cpp of Sim-IM by Vladimir Shutoff
+ and Sim-IM team
+ copyright : (C) 2002 - 2004 Vladimir Shutoff
+ (C) 2004 - 2008 Sim-IM Development Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "core.h"
+
+using namespace SIM;
+
+
+void CorePlugin::createMainToolbar()
+{
+ Command cmd;
+
+ // **** Main ToolBar ****
+ EventToolbar(ToolBarMain, EventToolbar::eAdd).process();
+
+ cmd->id = CmdOnline;
+ cmd->text = I18N_NOOP("Show &offline");
+ cmd->icon = "online_off";
+ cmd->icon_on = "online_on";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0x4000;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0;
+ if (getShowOnLine()) cmd->flags |= COMMAND_CHECKED;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdGroupToolbarButton;
+ cmd->text = I18N_NOOP("&Groups");
+ cmd->icon = getGroupMode() ? "grp_on" : "grp_off";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0x4000;
+ cmd->menu_id = 0;
+ cmd->popup_id = MenuGroups;
+ EventCommandCreate(cmd).process();
+
+ // Status toolbar item is created at status.cpp line 197. May be it should be moved here too...
+
+ cmd->id = CmdMenu;
+ cmd->text = I18N_NOOP("&Menu");
+ cmd->icon = "1downarrow";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0x8000;
+ cmd->menu_id = 0;
+ cmd->menu_grp = 0;
+ cmd->popup_id = MenuMain;
+ cmd->flags = 0;
+ EventCommandCreate(cmd).process();
+
+ // **** Main Menu ****
+
+ EventMenu(MenuMain, EventMenu::eAdd).process();
+
+ cmd->id = CmdSearch;
+ cmd->text = I18N_NOOP("Search / Add contact");
+ cmd->icon = "find";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x2080;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdSendSMS;
+ cmd->text = I18N_NOOP("&Send SMS");
+ cmd->icon = "sms";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x2081;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdUnread;
+ cmd->text = I18N_NOOP("Unread messages");
+ cmd->icon = "message";
+ cmd->bar_id = 0;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x3000;
+ cmd->flags = COMMAND_IMPORTANT | COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ // Status menu item is created at status.cpp line 56. May be it should be moved here too...
+
+ cmd->id = CmdGroup;
+ cmd->text = I18N_NOOP("&Groups");
+ cmd->icon = "grp_on";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x6001;
+ cmd->popup_id = MenuGroups;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdPhones;
+ cmd->text = I18N_NOOP("&Phone service");
+ cmd->icon = "phone";
+ cmd->bar_id = 0;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x60F0;
+ cmd->popup_id = MenuPhones;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ // "Always on top" menu item is created by "ontop" plugin
+
+ // "Network monitor" menu item is created by "netmonitor" plugin
+
+ // "Connections" or "Connection manager" menu item (whitch one depends on number of
+ // client plugins loaded) is created by CorePlugin::loadMenu() in core.cpp
+ // May be should moved here once...
+
+ cmd->id = CmdConfigure;
+ cmd->text = I18N_NOOP("Setup");
+ cmd->icon = "configure";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x8080;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ // "About KDE" menu item is created by "about" plugin if KDE is enabled
+
+ // "Bug report / Requests" menu item is created by "about" plugin
+
+ // "About Sim-IM" menu item is created by "about" plugin
+
+ cmd->id = CmdProfileChange;
+ cmd->text = I18N_NOOP("Change profile");
+ cmd->icon = QString::null;
+ cmd->bar_id = 0;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x10040;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_DEFAULT; // May be COMMAND_IMPORTANT? Do we need this menu item in tray menu by default?
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdQuit;
+ cmd->text = I18N_NOOP("Quit");
+ cmd->icon = "exit";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0;
+ cmd->menu_id = MenuMain;
+ cmd->menu_grp = 0x10080;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_IMPORTANT;
+ EventCommandCreate(cmd).process();
+
+ // **** Groups menu ****
+
+ EventMenu(MenuGroups, EventMenu::eAdd).process();
+
+ cmd->id = CmdGrpOff;
+ cmd->text = I18N_NOOP("Do&n't show groups");
+ cmd->icon = "grp_off";
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0x1000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdGrpMode1;
+ cmd->text = I18N_NOOP("Group mode 1");
+ cmd->icon = "grp_on";
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0x1001;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdGrpMode2;
+ cmd->text = I18N_NOOP("Group mode 2");
+ cmd->icon = "grp_on"; //TODO: Make icon for GroupMode2 independant from icon for GroupMode1
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0x1002;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdOnline;
+ cmd->text = I18N_NOOP("Show &offline");
+ cmd->icon = "online_off";
+ cmd->icon_on = "online_on";
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0x8000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdEmptyGroup;
+ cmd->text = I18N_NOOP("Show &empty groups");
+ cmd->icon = QString::null;
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0x8001;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdGrpCreate;
+ cmd->text = I18N_NOOP("&Create group");
+ cmd->icon = "grp_create";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0xA000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ // **** Phone service submenu ****
+
+ EventMenu(MenuPhones, EventMenu::eAdd).process();
+
+ cmd->id = CmdPhoneLocation;
+ cmd->text = I18N_NOOP("&Location");
+ cmd->icon = QString::null;
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhones;
+ cmd->menu_grp = 0x1000;
+ cmd->popup_id = MenuPhoneLocation;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ EventMenu(MenuPhoneLocation, EventMenu::eAdd).process();
+
+ cmd->id = CmdPhoneLocation; //FIXME: Is it ok that we have two CmdPhoneLocation menu items in different menus?
+ cmd->text = "_";
+ cmd->icon = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhoneLocation;
+ cmd->menu_grp = 0x1000;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdPhoneState;
+ cmd->text = I18N_NOOP("&Status");
+ cmd->icon = QString::null;
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhones;
+ cmd->menu_grp = 0x1010;
+ cmd->popup_id = MenuPhoneState;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+
+ EventMenu(MenuPhoneState, EventMenu::eAdd).process();
+
+ cmd->id = CmdPhoneNoShow;
+ cmd->text = I18N_NOOP("&No show");
+ cmd->icon = QString::null;
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhoneState;
+ cmd->menu_grp = 0x1000;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdPhoneAvailable;
+ cmd->text = I18N_NOOP("&Available");
+ cmd->icon = "phone";
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhoneState;
+ cmd->menu_grp = 0x1001;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdPhoneBusy;
+ cmd->text = I18N_NOOP("&Busy");
+ cmd->icon = "nophone";
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhoneState;
+ cmd->menu_grp = 0x1002;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdPhoneBook;
+ cmd->text = I18N_NOOP("&Phone book");
+ cmd->icon = QString::null;
+ cmd->icon_on = QString::null;
+ cmd->bar_id = 0;
+ cmd->menu_id = MenuPhones;
+ cmd->menu_grp = 0x1020;
+ cmd->popup_id = 0;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+}
+
+bool CorePlugin::updateMainToolbar(unsigned long commandID)
+{
+ bool bUpdateAll = (commandID == ~((unsigned long) 0));
+
+ if ( ( commandID == CmdGroupToolbarButton ) || bUpdateAll )
+ {
+ Command cmd;
+ cmd->id = CmdGroupToolbarButton;
+ cmd->text = I18N_NOOP("&Groups");
+ cmd->icon = getGroupMode() ? "grp_on" : "grp_off";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0x4000;
+ cmd->menu_id = 0;
+ cmd->menu_grp = 0;
+ cmd->popup_id = MenuGroups;
+ EventCommandChange(cmd).process();
+ }
+
+ if ( ( commandID == CmdOnline ) || bUpdateAll )
+ {
+ Command cmd;
+ cmd->id = CmdOnline;
+ cmd->text = I18N_NOOP("Show &offline");
+ cmd->icon = "online_off";
+ cmd->icon_on = "online_on";
+ cmd->bar_id = ToolBarMain;
+ cmd->bar_grp = 0x4000;
+ cmd->menu_id = MenuGroups;
+ cmd->menu_grp = 0x8000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ if (getShowOnLine()) cmd->flags |= COMMAND_CHECKED;
+ EventCommandChange(cmd).process();
+ }
+ return bUpdateAll;
+}
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/_core/toolbar_msgedit.cpp
^
|
@@ -0,0 +1,196 @@
+/***************************************************************************
+ toolbar_msgedit.cpp
+
+ This file contains subroutine that creates toolbar for MsgEdit part of
+ chat window.
+ Note that not all items of that menu created here. Some items is a result
+ of some other actions. Such items only mentions as a comments here, with
+ specifing where the item is relly created.
+ -------------------
+ begin : Tue Nov 26 2008
+ based on : core.cpp of Sim-IM by Vladimir Shutoff
+ and Sim-IM team
+ copyright : (C) 2002 - 2004 Vladimir Shutoff
+ (C) 2004 - 2008 Sim-IM Development Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "core.h"
+#include "textshow.h" // for CmdBgColor and all others...
+#include "icons.h" // for getIcons(), getSmiles()
+using namespace SIM;
+
+void CorePlugin::createMsgEditToolbar()
+{
+ Command cmd;
+
+ EventToolbar(ToolBarMsgEdit, EventToolbar::eAdd).process();
+
+ cmd->id = CmdBgColor;
+ cmd->text = I18N_NOOP("Back&ground color");
+ cmd->icon = "bgcolor";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdFgColor;
+ cmd->text = I18N_NOOP("Fo®round color");
+ cmd->icon = "fgcolor";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1001;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdBold;
+ cmd->text = I18N_NOOP("&Bold");
+ cmd->icon = "text_bold";
+ cmd->icon_on = "text_bold";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1002;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdItalic;
+ cmd->text = I18N_NOOP("It&alic");
+ cmd->icon = "text_italic";
+ cmd->icon_on = "text_italic";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1003;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdUnderline;
+ cmd->text = I18N_NOOP("&Underline");
+ cmd->icon = "text_under";
+ cmd->icon_on = "text_under";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1004;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdFont;
+ cmd->text = I18N_NOOP("Select f&ont");
+ cmd->icon = "text";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1005;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdFileName;
+ cmd->text = I18N_NOOP("Select &file");
+ cmd->icon = "file";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1010;
+ cmd->flags = BTN_EDIT | COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdPhoneNumber;
+ cmd->text = I18N_NOOP("&Phone number");
+ cmd->icon = "cell";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x1020;
+ cmd->flags = BTN_COMBO | BTN_NO_BUTTON | COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ /***** URL (CmdUrlInput, grp=0x1030) *****/
+ // Toolbar item 'URL' is created in plugins/icq/icqmessage.cpp in function ICQPlugin::registerMessages()
+ // And this item will exist even if icq plugin is not loaded. Because it were loaded while initing Sim-IM
+ // and 'URL' menu item were created. Then it was not destroed somehow.
+ // FIXME: may be 'URL' toolbar item _should_ be destroed when icq plugin is unloaded. Check it.
+
+ // **** Quote (CmdMsgQuote + CmdReceived, grp=0x1041) *****/
+ // Theoreticly another toolbar item should be created here... It is "Quote" item, and it is created while
+ // creating MenuMsgCommand. But (FIXME:) for some reason this item is missing when looking at item list
+ // when costumising toolbar. Why I do not know....
+
+ /***** Forward (CmdMsgForward + CmdReceived, grp=0x1042) *****/
+ // Same as Quote. (FIXME: see fixme note for Quote few lines beforee)
+
+ /***** Grant (CmdGrantAuth, grp=0x1080) *****/
+ // Toolbar item is defined at msgedit.cpp in authRequestCommands structure and created at MsgEdit::setupMessages
+ // while creating MessageAuthRequest. So make sure MsgEdit::setupMessages is called after createMsgEditToolbar()
+
+ /***** Refuse (CmdRefuseAuth, grp=0x1081) *****/
+ // Same as for Grant.
+
+ /***** Accept (CmdFileAccept, grp=0x1090) *****/
+ // Toolbar item is defined at msgedit.cpp in fileCommands structure and created at MsgEdit::setupMessages
+ // while creating MessageFile. So make sure MsgEdit::setupMessages is called after createMsgEditToolbar()
+
+ /***** Decline (CmdFileDecline, grp=0x1091) *****/
+ // Same as for Accept.
+
+ cmd->id = CmdSmile;
+ cmd->text = I18N_NOOP("I&nsert smile");
+ cmd->icon = QString::null;
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x7000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ // Now checking are there any smile icons... if yes use one as item icon, if no hide 'Insert Smile' toolbar item
+ QStringList smiles;
+ getIcons()->getSmiles(smiles);
+ if (smiles.empty()) cmd->flags |= BTN_HIDE;
+ else cmd->icon = smiles.front();
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdTranslit;
+ cmd->text = I18N_NOOP("Send in &translit");
+ cmd->icon = "translit";
+ cmd->icon_on = "translit";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x7010;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdSendClose;
+ cmd->text = I18N_NOOP("C&lose after send");
+ cmd->icon = "fileclose";
+ cmd->icon_on = "fileclose";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x7020;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdSend;
+ cmd->text = I18N_NOOP("&Send");
+ cmd->icon = "mail_generic";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x8000;
+ cmd->flags = BTN_PICT | COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdNextMessage;
+ cmd->text = I18N_NOOP("&Next");
+ cmd->icon = "message";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0x8000;
+ cmd->flags = BTN_PICT | COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ /***** Answer (CmdMsgAnswer grp= 0x8000) *****/
+ // This toolbar item is created while creating MenuMsgCommand
+
+ cmd->id = CmdMultiply;
+ cmd->text = I18N_NOOP("Multi&ply send");
+ cmd->icon = "1rightarrow";
+ cmd->icon_on = "1leftarrow";
+ cmd->bar_id = ToolBarMsgEdit;
+ cmd->bar_grp = 0xF010;
+ cmd->flags = COMMAND_DEFAULT;
+ EventCommandCreate(cmd).process();
+}
+
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/_core/toolbar_textedit.cpp
^
|
@@ -0,0 +1,88 @@
+/***************************************************************************
+ toolbar_textedit.cpp
+
+ This file contains subroutine that creates ToolBarTextEdit toolbar and
+ fills that toolbar with toolbar items. This toolbar is used as a default
+ toolbar for RichTextEdit (sim/textshow.cpp), but I (shaplov) have not
+ found any plase where this toolbar is really shown, so:
+ TODO: Check if this toolbar is really used, and may be remove it as unused code.
+ -------------------
+ begin : Tue Nov 26 2008
+ based on : core.cpp of Sim-IM by Vladimir Shutoff
+ and Sim-IM team
+ copyright : (C) 2002 - 2004 Vladimir Shutoff
+ (C) 2004 - 2008 Sim-IM Development Team
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+#include "core.h"
+#include "textshow.h" // for CmdBgColor and all others...
+
+using namespace SIM;
+
+void CorePlugin::createTextEditToolbar()
+{
+ EventToolbar(ToolBarTextEdit, EventToolbar::eAdd).process();
+
+ Command cmd;
+
+ cmd->id = CmdBgColor;
+ cmd->text = I18N_NOOP("Back&ground color");
+ cmd->icon = "bgcolor";
+ cmd->icon_on = QString::null;
+ cmd->bar_id = ToolBarTextEdit;
+ cmd->bar_grp = 0x1000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdFgColor;
+ cmd->text = I18N_NOOP("Fo®round color");
+ cmd->icon = "fgcolor";
+ cmd->bar_id = ToolBarTextEdit;
+ cmd->bar_grp = 0x1010;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdBold;
+ cmd->text = I18N_NOOP("&Bold");
+ cmd->icon = "text_bold";
+ cmd->icon_on = "text_bold";
+ cmd->bar_id = ToolBarTextEdit;
+ cmd->bar_grp = 0x2000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdItalic;
+ cmd->text = I18N_NOOP("It&alic");
+ cmd->icon = "text_italic";
+ cmd->icon_on = "text_italic";
+ cmd->bar_id = ToolBarTextEdit;
+ cmd->bar_grp = 0x2010;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdUnderline;
+ cmd->text = I18N_NOOP("&Underline");
+ cmd->icon = "text_under";
+ cmd->icon_on = "text_under";
+ cmd->bar_id = ToolBarTextEdit;
+ cmd->bar_grp = 0x2020;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+
+ cmd->id = CmdFont;
+ cmd->text = I18N_NOOP("Select f&ont");
+ cmd->icon = "text";
+ cmd->icon_on = "text";
+ cmd->bar_id = ToolBarTextEdit;
+ cmd->bar_grp = 0x3000;
+ cmd->flags = COMMAND_CHECK_STATE;
+ EventCommandCreate(cmd).process();
+}
\ No newline at end of file
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/userlist.cpp
^
|
@@ -853,18 +853,19 @@
break;
}
}
- QListViewItem *item;
+ GroupItem *grpItem;
switch (m_groupMode){
case 1:
- *item = findGroupItem(g->id());
- deleteItem(item);
+ grpItem = findGroupItem(g->id());
+ deleteItem(grpItem);
break;
case 2:
+ QListViewItem *item;
for (item = firstChild(); item; item = item->nextSibling()){
UserViewItemBase *i = static_cast<UserViewItemBase*>(item);
if (i->type() != DIV_ITEM) continue;
DivItem *divItem = static_cast<DivItem*>(i);
- GroupItem *grpItem = findGroupItem(g->id(), divItem);
+ grpItem = findGroupItem(g->id(), divItem);
deleteItem(grpItem);
}
break;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/_core/userview.cpp
^
|
@@ -637,8 +637,8 @@
}
break;
}
- case eEventCheckState:{
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState:{
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->menu_id == MenuGroups){
cmd->flags = cmd->flags & (~COMMAND_CHECKED);
@@ -721,7 +721,7 @@
c->id = cmd->id - CmdSendMessage;
c->menu_id = MenuMessage;
c->param = cmd->param;
- bool res = EventCheckState(c).process();
+ bool res = EventCheckCommandState(c).process();
if (res && (c->flags & COMMAND_RECURSIVE)){
cmd->flags |= COMMAND_RECURSIVE;
cmd->param = c->param;
@@ -920,18 +920,7 @@
return;
CorePlugin::m_plugin->setGroupMode(mode);
m_groupMode = mode;
- Command cmd;
- cmd->id = CmdGroup;
- cmd->text = I18N_NOOP("&Groups");
- cmd->icon = CorePlugin::m_plugin->getGroupMode() ? "grp_on" : "grp_off";
- cmd->bar_id = ToolBarMain;
- cmd->bar_grp = 0x4000;
- cmd->menu_id = MenuMain;
- cmd->menu_grp = 0x6001;
- cmd->popup_id = MenuGroups;
-
- EventCommandCreate(cmd).process();
-
+ EventUpdateCommandState(CmdGroupToolbarButton).process();
fill();
}
@@ -1525,7 +1514,7 @@
cmd->id = type;
cmd->menu_id = MenuMessage;
cmd->param = (void*)(static_cast<ContactItem*>(item)->id());
- if (EventCheckState(cmd).process())
+ if (EventCheckCommandState(cmd).process())
break;
}
}
@@ -1666,12 +1655,12 @@
if (static_cast<UserViewItemBase*>(item)->type() != USR_ITEM)
return;
QString name = item->text(CONTACT_TEXT);
- log(L_DEBUG, "Contact List search: Examining name %s", (const char *)name.local8Bit());
+ //log(L_DEBUG, "Contact List search: Examining name %s", (const char *)name.local8Bit());
//Search from the beginning of contact name
//if (name.left(m_search.length()).upper() == m_search.upper())
//Search for substring in contact name
- if (name.upper().find(m_search.upper())>-1) {
- log(L_DEBUG, "Contact List search: Found name %s", (const char *)name.local8Bit());
+ if (name.contains(m_search,false)>0) {
+ //log(L_DEBUG, "Contact List search: Found name %s", (const char *)name.local8Bit());
item->parent()->setOpen(true);
items.push_back(item);
} else {
@@ -1683,9 +1672,9 @@
if (client == NULL)
continue;
QString contactName = client->contactName(data);
- log(L_DEBUG, "Contact List search: Examining ID %s", (const char *)contactName.local8Bit());
- if (contactName.upper().find(m_search.upper())>-1) {
- log(L_DEBUG, "Contact List search: Found ID %s", (const char *)contactName.local8Bit());
+ //log(L_DEBUG, "Contact List search: Examining ID %s", (const char *)contactName.local8Bit());
+ if (contactName.contains(m_search,false)>0) {
+ //log(L_DEBUG, "Contact List search: Found ID %s", (const char *)contactName.local8Bit());
item->parent()->setOpen(true);
items.push_back(item);
break;
@@ -1706,7 +1695,7 @@
item = itemAt(pos);
}else if (pos.y() > viewport()->height()){
pos = QPoint(pos.x(), viewport()->height() - 1);
- item = itemAt(pos); //<== crash, it does not return item, sometimes in QGList append() no mem allocation is possible :-/ ???
+ item = itemAt(pos); //<== FIXME: crash, it does not return item, sometimes in QGList append() no mem allocation is possible :-/ ???
if (item){
pos = QPoint(pos.x(), viewport()->height() - 1 + item->height());
item = itemAt(pos);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/about/about.cpp
^
|
@@ -29,6 +29,7 @@
#include "about.h"
#include "aboutdata.h"
+#include "core_consts.h"
using namespace SIM;
@@ -71,7 +72,7 @@
about = NULL;
cmd->id = CmdAbout;
- cmd->text = I18N_NOOP("&About SIM");
+ cmd->text = I18N_NOOP("&About Sim-IM");
cmd->icon = "SIM";
EventCommandCreate(cmd).process();
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/about/aboutdlgbase.ui
^
|
@@ -17,7 +17,7 @@
</property>
<property>
<name>caption</name>
- <string>About SIM</string>
+ <string>About Sim-IM</string>
</property>
<grid>
<property>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/action/action.cpp
^
|
@@ -127,8 +127,8 @@
bool ActionPlugin::processEvent(Event *e)
{
switch (e->type() ) {
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->id == CmdAction) && (cmd->menu_id == MenuContact)){
Contact *contact = getContacts()->contact((unsigned long)(cmd->param));
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/action/additem.cpp
^
|
@@ -19,6 +19,7 @@
#include "additem.h"
#include "ballonmsg.h"
#include "core.h"
+#include "core_events.h"
#include "editfile.h"
#include <qpixmap.h>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/autoaway/autoaway.cpp
^
|
@@ -40,6 +40,10 @@
#elif defined(HAVE_CARBON_CARBON_H) && !defined(HAVE_X)
#include <Carbon/Carbon.h>
+#elif defined(__OS2__)
+#define INCL_WIN
+#include <os2.h>
+#include "sysglit.h"
#else
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -205,6 +209,8 @@
// nothing to do
#elif defined(HAVE_CARBON_CARBON_H) && !defined(HAVE_X)
RemoveEventLoopTimer(mTimerRef);
+#elif defined(__OS2__)
+ // ---
#else
// We load static Xss in our autoaway.so's process space, but the bastard
// registers for shutdown in the XDisplay variable, so after autoaway.so
@@ -355,6 +361,12 @@
return IdleUIGetLastInputTime();
#elif defined(HAVE_CARBON_CARBON_H) && !defined(HAVE_X)
return mSecondsIdle;
+#elif defined(__OS2__)
+ ULONG lastInp = WinGetLastInputTime();
+ if ( lastInp == 0 ) {
+ return 0;
+ }
+ return (WinGetCurrentTime(WinQueryAnchorBlock(HWND_DESKTOP)) - lastInp) / 1000;
#else
QWidgetList *list = QApplication::topLevelWidgets();
QWidgetListIt it(*list);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/dock/dock.cpp
^
|
@@ -100,7 +100,7 @@
Command cmd;
cmd->id = CmdTitle;
- cmd->text = I18N_NOOP("SIM");
+ cmd->text = I18N_NOOP("Sim-IM");
cmd->icon = "SIM";
cmd->menu_id = DockMenu;
cmd->menu_grp = 0x1000;
@@ -251,8 +251,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *def = ecs->cmd();
if (def->id == CmdToggle){
def->flags &= ~COMMAND_CHECKED;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/filter/filter.cpp
^
|
@@ -19,7 +19,6 @@
#include "ballonmsg.h"
#include "unquot.h"
-#include "core.h"
#include "msgedit.h"
#include "msgview.h"
#include "userwnd.h"
@@ -189,8 +188,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdIgnore){
cmd->flags &= ~BTN_HIDE;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/floaty/floaty.cpp
^
|
@@ -141,8 +141,8 @@
}
break;
}
- case eEventCheckState:{
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState:{
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdFloaty){
Contact *contact = getContacts()->contact((unsigned long)(cmd->param));
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/floaty/floatywnd.cpp
^
|
@@ -522,7 +522,7 @@
cmd->id = type;
cmd->menu_id = MenuMessage;
cmd->param = (void*)m_id;
- if (EventCheckState(cmd).process())
+ if (EventCheckCommandState(cmd).process())
break;
}
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/gpg/gpg.cpp
^
|
@@ -23,7 +23,6 @@
#include "userwnd.h"
#include "passphrase.h"
#include "ballonmsg.h"
-#include "core.h"
#include "gpg.h"
#include "gpgcfg.h"
@@ -401,15 +400,15 @@
bool GpgPlugin::processEvent(Event *e)
{
switch (e->type()){
- case eEventCheckState:{
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState:{
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->menu_id == MenuMessage){
if (cmd->id == MessageGPGKey){
cmd->flags &= ~COMMAND_CHECKED;
CommandDef c = *cmd;
c.id = MessageGeneric;
- return EventCheckState(&c).process();
+ return EventCheckCommandState(&c).process();
}
if (cmd->id == MessageGPGUse){
cmd->flags &= ~COMMAND_CHECKED;
@@ -902,8 +901,8 @@
bool MsgGPGKey::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/CMakeLists.txt
^
|
@@ -40,6 +40,7 @@
warndlg.cpp
workinfo.cpp
xml.cpp
+ snac.cpp
)
SET(icq_HDRS
@@ -56,6 +57,7 @@
icqconfig.h
icqinfo.h
icqmessage.h
+ icqdirect.h
icqpicture.h
icqsearch.h
icqsecure.h
@@ -69,6 +71,7 @@
warndlg.h
workinfo.h
xml.h
+ snac.h
)
SET(icq_UICS
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/Makefile.am
^
|
@@ -60,7 +60,8 @@
verifydlg.cpp \
verifydlgbase.ui \
xml.cpp \
- icqssbi.cpp
+ icqssbi.cpp \
+ snac.cpp
SUBDIRS = sounds
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/Makefile.in
^
|
@@ -69,7 +69,7 @@
icqsecure.lo icqsearch.lo advsearch.lo icqpicture.lo \
icqmessage.lo securedlg.lo aimconfig.lo aiminfo.lo \
aimsearch.lo aimservices.lo warndlg.lo encodingdlg.lo \
- rtfgen.lo rtf.lo verifydlg.lo xml.lo icqssbi.lo
+ rtfgen.lo rtf.lo verifydlg.lo xml.lo icqssbi.lo snac.lo
#>- icq_la_OBJECTS = $(am_icq_la_OBJECTS)
#>+ 12
icq_la_final_OBJECTS = icq_la.all_cc.lo rtf.lo icq_la.all_cpp.lo
@@ -81,7 +81,7 @@
icqsecure.lo icqsearch.lo advsearch.lo icqpicture.lo \
icqmessage.lo securedlg.lo aimconfig.lo aiminfo.lo \
aimsearch.lo aimservices.lo warndlg.lo encodingdlg.lo \
- rtfgen.lo rtf.lo verifydlg.lo xml.lo icqssbi.lo icqconfigbase.lo icqinfobase.lo homeinfobase.lo moreinfobase.lo workinfobase.lo aboutinfobase.lo interestsinfobase.lo pastinfobase.lo icqsecurebase.lo icqsearchbase.lo advsearchbase.lo icqpicturebase.lo securedlgbase.lo aimconfigbase.lo aiminfobase.lo aimsearchbase.lo warndlgbase.lo encodingdlgbase.lo verifydlgbase.lo
+ rtfgen.lo rtf.lo verifydlg.lo xml.lo icqssbi.lo snac.lo icqconfigbase.lo icqinfobase.lo homeinfobase.lo moreinfobase.lo workinfobase.lo aboutinfobase.lo interestsinfobase.lo pastinfobase.lo icqsecurebase.lo icqsearchbase.lo advsearchbase.lo icqpicturebase.lo securedlgbase.lo aimconfigbase.lo aiminfobase.lo aimsearchbase.lo warndlgbase.lo encodingdlgbase.lo verifydlgbase.lo
@KDE_USE_FINAL_FALSE@icq_la_OBJECTS = $(icq_la_nofinal_OBJECTS)
@KDE_USE_FINAL_TRUE@icq_la_OBJECTS = $(icq_la_final_OBJECTS)
@ENABLE_ICQ_TRUE@am_icq_la_rpath = -rpath $(sim_plugindir)
@@ -494,8 +494,9 @@
#>- verifydlg.cpp \
#>- verifydlgbase.ui \
#>- xml.cpp \
-#>- icqssbi.cpp
-#>+ 59
+#>- icqssbi.cpp \
+#>- snac.cpp
+#>+ 60
icq_la_SOURCES=\
icq.cpp \
icqconfig.cpp \
@@ -554,7 +555,8 @@
verifydlg.cpp \
\
xml.cpp \
- icqssbi.cpp icqconfigbase.cc icqinfobase.cc homeinfobase.cc moreinfobase.cc workinfobase.cc aboutinfobase.cc interestsinfobase.cc pastinfobase.cc icqsecurebase.cc icqsearchbase.cc advsearchbase.cc icqpicturebase.cc securedlgbase.cc aimconfigbase.cc aiminfobase.cc aimsearchbase.cc warndlgbase.cc encodingdlgbase.cc verifydlgbase.cc
+ icqssbi.cpp \
+ snac.cpp icqconfigbase.cc icqinfobase.cc homeinfobase.cc moreinfobase.cc workinfobase.cc aboutinfobase.cc interestsinfobase.cc pastinfobase.cc icqsecurebase.cc icqsearchbase.cc advsearchbase.cc icqpicturebase.cc securedlgbase.cc aimconfigbase.cc aiminfobase.cc aimsearchbase.cc warndlgbase.cc encodingdlgbase.cc verifydlgbase.cc
SUBDIRS = sounds
INCLUDES = -I$(srcdir)/../../sim -I../_core -I$(srcdir)/../_core $(all_includes)
@@ -685,6 +687,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtfgen.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/securedlg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snac.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verifydlg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/warndlg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/workinfo.Plo@am__quote@
@@ -1153,6 +1156,13 @@
mocs: moreinfo.moc
#>+ 3
+icqdirect.moc: $(srcdir)/icqdirect.h
+ $(MOC) $(srcdir)/icqdirect.h -o icqdirect.moc
+
+#>+ 2
+mocs: icqdirect.moc
+
+#>+ 3
advsearch.moc: $(srcdir)/advsearch.h
$(MOC) $(srcdir)/advsearch.h -o advsearch.moc
@@ -1196,10 +1206,10 @@
#>+ 3
clean-metasources:
- -rm -f homeinfo.moc aiminfo.moc icqconfig.moc securedlg.moc aimsearch.moc pastinfo.moc icqpicture.moc encodingdlg.moc interestsinfo.moc icqclient.moc aboutinfo.moc icqinfo.moc workinfo.moc polling.moc icqsecure.moc moreinfo.moc advsearch.moc icqsearch.moc aimconfig.moc verifydlg.moc icqssbi.moc warndlg.moc
+ -rm -f homeinfo.moc aiminfo.moc icqconfig.moc securedlg.moc aimsearch.moc pastinfo.moc icqpicture.moc encodingdlg.moc interestsinfo.moc icqclient.moc aboutinfo.moc icqinfo.moc workinfo.moc polling.moc icqsecure.moc moreinfo.moc icqdirect.moc advsearch.moc icqsearch.moc aimconfig.moc verifydlg.moc icqssbi.moc warndlg.moc
#>+ 2
-KDE_DIST=aimconfigbase.ui icq_events.h interestsinfobase.ui icqpicture.h icqsearch.h aimsearchbase.ui securedlgbase.ui verifydlgbase.ui polling.h aboutinfobase.ui icqinfobase.ui moreinfo.h encodingdlg.h icqconfigbase.ui xml.h warndlg.h icqsecure.h advsearch.h icqmessage.h homeinfo.h aiminfobase.ui interestsinfo.h Makefile.in icqssbi.h icqbuffer.h icq_pch.h icqinfo.h pastinfo.h icqpicturebase.ui icq.vcproj icq.h homeinfobase.ui workinfo.h aiminfo.h encodingdlgbase.ui securedlg.h aboutinfo.h warndlgbase.ui advsearchbase.ui moreinfobase.ui icq.rc aimconfig.h icqconfig.h icqclient.h workinfobase.ui verifydlg.h configure.in.in CMakeLists.txt aimsearch.h icqsecurebase.ui pastinfobase.ui icqsearchbase.ui Makefile.am
+KDE_DIST=aimconfigbase.ui icq_events.h interestsinfobase.ui icqpicture.h icqsearch.h aimsearchbase.ui securedlgbase.ui verifydlgbase.ui polling.h aboutinfobase.ui icqinfobase.ui icqbuddy.h moreinfo.h encodingdlg.h icqconfigbase.ui xml.h warndlg.h icqsecure.h advsearch.h icqmessage.h homeinfo.h aiminfobase.ui interestsinfo.h Makefile.in icqssbi.h snac.h icqbuffer.h icq_pch.h icqinfo.h pastinfo.h icqpicturebase.ui icqservice.h icq.vcproj icq.h homeinfobase.ui workinfo.h aiminfo.h encodingdlgbase.ui securedlg.h aboutinfo.h warndlgbase.ui advsearchbase.ui moreinfobase.ui icq.rc aimconfig.h icqconfig.h icqclient.h workinfobase.ui verifydlg.h configure.in.in CMakeLists.txt icqdirect.h aimsearch.h icqsecurebase.ui pastinfobase.ui icqsearchbase.ui Makefile.am
#>+ 22
clean-ui:
@@ -1270,7 +1280,7 @@
#>+ 11
-icq_la.all_cc.cc: $(srcdir)/Makefile.in icqconfigbase.cc icqinfobase.cc homeinfobase.cc moreinfobase.cc workinfobase.cc aboutinfobase.cc interestsinfobase.cc pastinfobase.cc icqsecurebase.cc icqsearchbase.cc advsearchbase.cc icqpicturebase.cc securedlgbase.cc aimconfigbase.cc aiminfobase.cc aimsearchbase.cc warndlgbase.cc encodingdlgbase.cc verifydlgbase.cc homeinfo.moc icqconfig.moc aiminfo.moc securedlg.moc pastinfo.moc encodingdlg.moc interestsinfo.moc aboutinfo.moc icqinfo.moc polling.moc verifydlg.moc aimsearch.moc icqpicture.moc icqclient.moc workinfo.moc moreinfo.moc icqsecure.moc advsearch.moc icqsearch.moc aimconfig.moc icqssbi.moc warndlg.moc
+icq_la.all_cc.cc: $(srcdir)/Makefile.in icqconfigbase.cc icqinfobase.cc homeinfobase.cc moreinfobase.cc workinfobase.cc aboutinfobase.cc interestsinfobase.cc pastinfobase.cc icqsecurebase.cc icqsearchbase.cc advsearchbase.cc icqpicturebase.cc securedlgbase.cc aimconfigbase.cc aiminfobase.cc aimsearchbase.cc warndlgbase.cc encodingdlgbase.cc verifydlgbase.cc homeinfo.moc icqconfig.moc aiminfo.moc securedlg.moc pastinfo.moc encodingdlg.moc interestsinfo.moc aboutinfo.moc icqinfo.moc polling.moc icqdirect.moc verifydlg.moc aimsearch.moc icqpicture.moc icqclient.moc workinfo.moc moreinfo.moc icqsecure.moc advsearch.moc icqsearch.moc aimconfig.moc icqssbi.moc warndlg.moc
@echo 'creating icq_la.all_cc.cc ...'; \
rm -f icq_la.all_cc.files icq_la.all_cc.final; \
echo "#define KDE_USE_FINAL 1" >> icq_la.all_cc.final; \
@@ -1282,11 +1292,11 @@
rm -f icq_la.all_cc.final icq_la.all_cc.files
#>+ 11
-icq_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/icq.cpp $(srcdir)/icqconfig.cpp $(srcdir)/icqclient.cpp $(srcdir)/icqdirect.cpp $(srcdir)/icqlogin.cpp $(srcdir)/icqbos.cpp $(srcdir)/icqbuddy.cpp $(srcdir)/icqbuffer.cpp $(srcdir)/icqicmb.cpp $(srcdir)/icqlists.cpp $(srcdir)/icqlocation.cpp $(srcdir)/icqping.cpp $(srcdir)/icqservice.cpp $(srcdir)/icqvarious.cpp $(srcdir)/polling.cpp $(srcdir)/icqinfo.cpp $(srcdir)/homeinfo.cpp $(srcdir)/moreinfo.cpp $(srcdir)/workinfo.cpp $(srcdir)/aboutinfo.cpp $(srcdir)/interestsinfo.cpp $(srcdir)/pastinfo.cpp $(srcdir)/icqsecure.cpp $(srcdir)/icqsearch.cpp $(srcdir)/advsearch.cpp $(srcdir)/icqpicture.cpp $(srcdir)/icqmessage.cpp $(srcdir)/securedlg.cpp $(srcdir)/aimconfig.cpp $(srcdir)/aiminfo.cpp $(srcdir)/aimsearch.cpp $(srcdir)/aimservices.cpp $(srcdir)/warndlg.cpp $(srcdir)/encodingdlg.cpp $(srcdir)/rtfgen.cpp $(srcdir)/verifydlg.cpp $(srcdir)/xml.cpp $(srcdir)/icqssbi.cpp homeinfo.moc icqconfig.moc aiminfo.moc securedlg.moc pastinfo.moc encodingdlg.moc interestsinfo.moc aboutinfo.moc icqinfo.moc polling.moc verifydlg.moc aimsearch.moc icqpicture.moc icqclient.moc workinfo.moc moreinfo.moc icqsecure.moc advsearch.moc icqsearch.moc aimconfig.moc icqssbi.moc warndlg.moc
+icq_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/icq.cpp $(srcdir)/icqconfig.cpp $(srcdir)/icqclient.cpp $(srcdir)/icqdirect.cpp $(srcdir)/icqlogin.cpp $(srcdir)/icqbos.cpp $(srcdir)/icqbuddy.cpp $(srcdir)/icqbuffer.cpp $(srcdir)/icqicmb.cpp $(srcdir)/icqlists.cpp $(srcdir)/icqlocation.cpp $(srcdir)/icqping.cpp $(srcdir)/icqservice.cpp $(srcdir)/icqvarious.cpp $(srcdir)/polling.cpp $(srcdir)/icqinfo.cpp $(srcdir)/homeinfo.cpp $(srcdir)/moreinfo.cpp $(srcdir)/workinfo.cpp $(srcdir)/aboutinfo.cpp $(srcdir)/interestsinfo.cpp $(srcdir)/pastinfo.cpp $(srcdir)/icqsecure.cpp $(srcdir)/icqsearch.cpp $(srcdir)/advsearch.cpp $(srcdir)/icqpicture.cpp $(srcdir)/icqmessage.cpp $(srcdir)/securedlg.cpp $(srcdir)/aimconfig.cpp $(srcdir)/aiminfo.cpp $(srcdir)/aimsearch.cpp $(srcdir)/aimservices.cpp $(srcdir)/warndlg.cpp $(srcdir)/encodingdlg.cpp $(srcdir)/rtfgen.cpp $(srcdir)/verifydlg.cpp $(srcdir)/xml.cpp $(srcdir)/icqssbi.cpp $(srcdir)/snac.cpp homeinfo.moc icqconfig.moc aiminfo.moc securedlg.moc pastinfo.moc encodingdlg.moc interestsinfo.moc aboutinfo.moc icqinfo.moc polling.moc icqdirect.moc verifydlg.moc aimsearch.moc icqpicture.moc icqclient.moc workinfo.moc moreinfo.moc icqsecure.moc advsearch.moc icqsearch.moc aimconfig.moc icqssbi.moc warndlg.moc
@echo 'creating icq_la.all_cpp.cpp ...'; \
rm -f icq_la.all_cpp.files icq_la.all_cpp.final; \
echo "#define KDE_USE_FINAL 1" >> icq_la.all_cpp.final; \
- for file in icq.cpp icqconfig.cpp icqclient.cpp icqdirect.cpp icqlogin.cpp icqbos.cpp icqbuddy.cpp icqbuffer.cpp icqicmb.cpp icqlists.cpp icqlocation.cpp icqping.cpp icqservice.cpp icqvarious.cpp polling.cpp icqinfo.cpp homeinfo.cpp moreinfo.cpp workinfo.cpp aboutinfo.cpp interestsinfo.cpp pastinfo.cpp icqsecure.cpp icqsearch.cpp advsearch.cpp icqpicture.cpp icqmessage.cpp securedlg.cpp aimconfig.cpp aiminfo.cpp aimsearch.cpp aimservices.cpp warndlg.cpp encodingdlg.cpp rtfgen.cpp verifydlg.cpp xml.cpp icqssbi.cpp ; do \
+ for file in icq.cpp icqconfig.cpp icqclient.cpp icqdirect.cpp icqlogin.cpp icqbos.cpp icqbuddy.cpp icqbuffer.cpp icqicmb.cpp icqlists.cpp icqlocation.cpp icqping.cpp icqservice.cpp icqvarious.cpp polling.cpp icqinfo.cpp homeinfo.cpp moreinfo.cpp workinfo.cpp aboutinfo.cpp interestsinfo.cpp pastinfo.cpp icqsecure.cpp icqsearch.cpp advsearch.cpp icqpicture.cpp icqmessage.cpp securedlg.cpp aimconfig.cpp aiminfo.cpp aimsearch.cpp aimservices.cpp warndlg.cpp encodingdlg.cpp rtfgen.cpp verifydlg.cpp xml.cpp icqssbi.cpp snac.cpp ; do \
echo "#include \"$$file\"" >> icq_la.all_cpp.files; \
test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> icq_la.all_cpp.final; \
done; \
@@ -1317,8 +1327,9 @@
kde-rpo-clean:
-rm -f *.rpo
-#>+ 86
+#>+ 89
aiminfo.lo: aiminfo.moc
+icqdirect.lo: icqdirect.moc
icqpicture.lo: icqpicture.moc
$(srcdir)/icqping.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
homeinfo.lo: homeinfo.moc
@@ -1377,10 +1388,11 @@
$(srcdir)/icqlocation.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
aboutinfo.o: aboutinfo.moc
icqsecure.lo: icqsecure.moc
-securedlg.lo: securedlg.moc
$(srcdir)/icqservice.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
+securedlg.lo: securedlg.moc
interestsinfo.lo: interestsinfo.moc
icqpicture.o: icqpicture.moc
+icqdirect.o: icqdirect.moc
$(srcdir)/workinfo.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
pastinfo.lo: pastinfo.moc
$(srcdir)/icqssbi.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
@@ -1393,6 +1405,7 @@
$(srcdir)/aboutinfo.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
$(srcdir)/rtfgen.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
aimsearch.lo: aimsearch.moc
+$(srcdir)/snac.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
verifydlg.o: verifydlg.moc
nmcheck:
$(srcdir)/encodingdlg.cpp: icqconfigbase.h icqinfobase.h homeinfobase.h moreinfobase.h workinfobase.h aboutinfobase.h interestsinfobase.h pastinfobase.h icqsecurebase.h icqsearchbase.h advsearchbase.h icqpicturebase.h securedlgbase.h aimconfigbase.h aiminfobase.h aimsearchbase.h warndlgbase.h encodingdlgbase.h verifydlgbase.h
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/aiminfo.cpp
^
|
@@ -18,7 +18,6 @@
#include "icons.h"
#include "aiminfo.h"
#include "icqclient.h"
-#include "core.h"
#include <qlineedit.h>
#include <qmultilineedit.h>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/aimservices.cpp
^
|
@@ -28,7 +28,7 @@
{
m_client = client;
m_id = id;
- m_client->m_services.push_back(this);
+ m_client->m_snacService->addService(this);
m_socket = NULL;
m_bConnected = false;
@@ -36,12 +36,7 @@
ServiceSocket::~ServiceSocket()
{
- for (list<ServiceSocket*>::iterator it = m_client->m_services.begin(); it != m_client->m_services.end(); ++it){
- if ((*it) == this){
- m_client->m_services.erase(it);
- break;
- }
- }
+ m_client->m_snacService->deleteService(this);
delete m_socket;
}
@@ -81,7 +76,7 @@
OscarSocket::packet_ready();
}
-void ServiceSocket::packet()
+void ServiceSocket::packet(unsigned long size) //Fixme: Unsed Parameter size
{
EventLog::log_packet(m_socket->readBuffer(), false,ICQPlugin::icq_plugin->OscarPacket);
switch (m_nChannel){
@@ -375,16 +370,10 @@
unsigned short ICQClient::aimEMailSearch(const QString &name)
{
- SearchSocket *s = NULL;
- for (list<ServiceSocket*>::iterator it = m_services.begin(); it != m_services.end(); ++it){
- if ((*it)->id() == USER_DIRECTORY_SERVICE){
- s = static_cast<SearchSocket*>(*it);
- break;
- }
- }
+ SearchSocket *s = static_cast<SearchSocket*>(m_snacService->getService(USER_DIRECTORY_SERVICE));
if (s == NULL){
s = new SearchSocket(this);
- requestService(s);
+ snacService()->requestService(s);
}
QStringList sl;
sl.append(name);
@@ -396,16 +385,11 @@
const QString &city, const QString &nick, const QString &zip,
const QString &state)
{
- SearchSocket *s = NULL;
- for (list<ServiceSocket*>::iterator it = m_services.begin(); it != m_services.end(); ++it){
- if ((*it)->id() == USER_DIRECTORY_SERVICE){
- s = static_cast<SearchSocket*>(*it);
- break;
- }
- }
- if (s == NULL){
+ SearchSocket *s = static_cast<SearchSocket*>(m_snacService->getService(USER_DIRECTORY_SERVICE));
+ if(s == NULL)
+ {
s = new SearchSocket(this);
- requestService(s);
+ snacService()->requestService(s);
}
QStringList info;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icq.vcproj
^
|
@@ -963,6 +963,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\snac.cpp"
+ >
+ </File>
+ <File
RelativePath="verifydlg.cpp"
>
<FileConfiguration
@@ -1714,6 +1718,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\moc_icqdirect.cpp"
+ >
+ </File>
+ <File
RelativePath="moc_icqinfo.cpp"
>
<FileConfiguration
@@ -2558,6 +2566,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\icqbuddy.h"
+ >
+ </File>
+ <File
RelativePath=".\icqbuffer.h"
>
</File>
@@ -2610,6 +2622,30 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\icqdirect.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc'ing $(InputName).h ..."
+ CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp
"
+ Outputs="$(InputDir)moc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc'ing $(InputName).h ..."
+ CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp
"
+ Outputs="$(InputDir)moc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="icqinfo.h"
>
<FileConfiguration
@@ -2718,6 +2754,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\icqservice.h"
+ >
+ </File>
+ <File
RelativePath=".\icqssbi.h"
>
<FileConfiguration
@@ -2862,6 +2902,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\snac.h"
+ >
+ </File>
+ <File
RelativePath="verifydlg.h"
>
<FileConfiguration
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqbuddy.cpp
^
|
@@ -32,6 +32,7 @@
#include <qfileinfo.h>
#include "log.h"
+#include "icqbuddy.h"
using namespace SIM;
@@ -63,442 +64,496 @@
return str;
}
-void ICQClient::snac_buddy(unsigned short type, unsigned short)
+
+SnacIcqBuddy::SnacIcqBuddy(ICQClient* client) : SnacHandler(client, 0x0003)
+{
+}
+
+SnacIcqBuddy::~SnacIcqBuddy()
+{
+}
+
+bool SnacIcqBuddy::process(unsigned short subtype, ICQBuffer* buf)
{
- switch (type){
+ switch (subtype)
+ {
case ICQ_SNACxBDY_RIGHTSxGRANTED:
log(L_DEBUG, "Buddy rights granted");
break;
- case ICQ_SNACxBDY_USEROFFLINE: {
- Contact *contact;
- QString screen = socket()->readBuffer().unpackScreen();
- ICQUserData *data = findContact(screen, NULL, false, contact);
- if(!data)
- break;
- if (data->Status.toULong() != ICQ_STATUS_OFFLINE){
- setOffline(data);
- StatusMessage *m = new StatusMessage;
- m->setContact(contact->id());
- m->setClient(dataName(data));
- m->setStatus(STATUS_OFFLINE);
- m->setFlags(MESSAGE_RECEIVED);
- EventMessageReceived e(m);
- if(!e.process())
- delete m;
- } else {
- // hack for trillian
- EventContact e(contact, EventContact::eOnline);
- e.process();
- }
- break;
- }
- case ICQ_SNACxBDY_USERONLINE: {
- Contact *contact;
- QString screen = socket()->readBuffer().unpackScreen();
- ICQUserData *data = findContact(screen, NULL, false, contact);
- if (data){
- bool bChanged = false;
- bool bAwayChanged = false;
- unsigned long prevStatus = data->Status.toULong();
-
- unsigned short level, len;
- socket()->readBuffer() >> level >> len;
- data->WarningLevel.asULong() = level;
-
- TlvList tlv(socket()->readBuffer());
-
- Tlv *tlvClass = tlv(TLV_USER_CLASS);
- if (tlvClass){
- unsigned short userClass = *tlvClass;
- if (userClass != data->Class.toULong()){
- if ((userClass & CLASS_AWAY) != (data->Class.toULong() & CLASS_AWAY)){
- data->StatusTime.asULong() = (unsigned long)time(NULL);
- bAwayChanged = true;
- }
- data->Class.asULong() = userClass;
- bChanged = true;
- }
- if (data->Uin.toULong() == 0){
- if (userClass & CLASS_AWAY){
- fetchAwayMessage(data);
- }else{
- data->AutoReply.str() = QString::null;
- }
- }
- }
-
- // Status TLV
- Tlv *tlvStatus = tlv(TLV_USER_STATUS);
- if (tlvStatus){
- uint32_t status = *tlvStatus;
- if (status != data->Status.toULong()){
- data->Status.asULong() = status;
- if ((status & 0xFF) == 0)
- data->AutoReply.str() = QString::null;
- data->StatusTime.asULong() = (unsigned long)time(NULL);
- }
- }else if (data->Status.toULong() == ICQ_STATUS_OFFLINE){
- data->Status.asULong() = ICQ_STATUS_ONLINE;
- data->StatusTime.asULong() = (unsigned long)time(NULL);
- }
-
- // Online time TLV
- Tlv *tlvOnlineTime = tlv(TLV_USER_SIGNON_TIME);
- if (tlvOnlineTime){
- uint32_t OnlineTime = *tlvOnlineTime;
- if (OnlineTime != data->OnlineTime.toULong()){
- data->OnlineTime.asULong() = OnlineTime;
- bChanged = true;
- }
- }
- Tlv *tlvNATime = tlv(0x0004);
- if (tlvNATime){
- unsigned short na_time = *tlvNATime;
- unsigned long StatusTime = (unsigned long)time(NULL) - na_time * 60;
- if (StatusTime != data->StatusTime.toULong()){
- data->StatusTime.asULong() = StatusTime;
- bChanged = true;
- }
- }
-
- // IP TLV
- Tlv *tlvIP = tlv(TLV_USER_EXT_IP);
- if (tlvIP)
- bChanged |= set_ip(&data->IP, htonl((uint32_t)(*tlvIP)));
-
- // short caps tlv
- Tlv *tlvCapShort = tlv(TLV_USER_NEWCAPS);
- if(tlvCapShort) {
- data->Caps.asULong() = 0;
- data->Caps2.asULong() = 0;
-
- ICQBuffer info(*tlvCapShort);
-
- for (; info.readPos() < info.size(); ){
- unsigned char shortcap[2];
- info.unpack((char*)shortcap, sizeof(shortcap));
- for (unsigned i = 0;; i++) {
- if(!memcmp(&capabilities[i][2], shortcap, sizeof(shortcap))) {
- setCap(data, (cap_id_t)i);
- break;
- }
- // we don't go through all caps, only the first ones starting with 0x09
- if (*capabilities[i] != '\x09') {
- log( L_DEBUG, "%lu unknown cap %s", data->Uin.toULong(),
- makeCapStr( shortcap, sizeof(shortcap) ).latin1() );
- break;
- }
- }
- }
- }
- // normal cap tlv
- Tlv *tlvCapability = tlv(TLV_USER_CAPS);
- if (tlvCapability) {
- if (!tlvCapShort) {
- data->Caps.asULong() = 0;
- data->Caps2.asULong() = 0;
- }
- ICQBuffer info(*tlvCapability);
- for (; info.readPos() < info.size(); ){
- capability cap;
- info.unpack((char*)cap, sizeof(capability));
- for (unsigned i = 0;; i++){
- unsigned size = sizeof(capability);
- if (i == CAP_SIMOLD)
- size--;
-
- if (*capabilities[i] == 0) {
- log( L_DEBUG, "%lu unknown cap %s", data->Uin.toULong(), makeCapStr( cap, size ).latin1() );
- break;
- }
- if ((i == CAP_MICQ) || (i == CAP_LICQ) || (i == CAP_SIM) || (i == CAP_KOPETE))
- size -= 4;
- if ((i == CAP_ANDRQ))
- size -= 7;
- if ((i == CAP_MIRANDA))
- size -= 8;
- if ((i == CAP_JIMM))
- size -= 11;
-
- if (i == CAP_ICQJP)
- size -= (16 - 4);
-
- if (!memcmp(cap, capabilities[i], size)){
- if (i == CAP_SIMOLD){
- unsigned char build = cap[sizeof(capability)-1];
- if (build && ((build == 0x92) || (build < (1 << 6)))) continue;
- data->Build.asULong() = build;
- }
- if ((i == CAP_MICQ) || (i == CAP_LICQ) || (i == CAP_SIM) || (i == CAP_KOPETE)){
- unsigned char *p = (unsigned char*)cap;
- p += 12;
- data->Build.asULong() = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
- }
- if ((i == CAP_ANDRQ)) {
- unsigned char *p = (unsigned char*)cap;
- p += 9;
- data->Build.asULong() = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
- }
- if ((i == CAP_MIRANDA)) {
- unsigned char *p = (unsigned char*)cap;
- p += 8;
- data->Build.asULong() = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
- }
- if ((i == CAP_JIMM)) {
- char *p = (char*)cap;
- p += 5;
- QString str = QString::fromAscii(p, 10);
- QStringList sl = QStringList::split('.', str);
- unsigned char maj = 0, min = 0;
- unsigned short rev = 0;
- if(sl.count() > 0)
- maj = sl[0].toUShort();
- if(sl.count() > 1)
- min = sl[1].toUShort();
- if(sl.count() > 2)
- rev = sl[2].toUShort();
-
- data->Build.asULong() = (maj << 24) + (min << 16) + rev;
- }
- if (i == CAP_ICQJP) {
- log(L_DEBUG, "%lu ICQJP cap is set", data->Uin.toULong());
- data->Build.asULong() = cap[0x4] << 0x18 | cap[0x5] << 0x10 |
- cap[0x6] << 8 | cap[0x7];
- }
- setCap(data, (cap_id_t)i);
- break;
- }
- }
- }
- }
-
- // buddy info
- Tlv *tlvBuddy = tlv(TLV_USER_BUDDYINFO);
- if (tlvBuddy) {
- const QByteArray &ba = data->buddyHash.toBinary();
- unsigned short iconID;
- unsigned char iconFlags, hashSize;
- ICQBuffer info(*tlvBuddy);
- QByteArray hash(16);
- QString fname = pictureFile(data);
- QFileInfo fi(fname);
-
- info >> iconID >> iconFlags >> hashSize;
- hash.resize(hashSize);
- info.unpack(hash.data(), hashSize);
- if( data->buddyID.toULong() != iconID ||
- ba != hash ||
- !fi.exists() || fi.size() == 0) {
- data->buddyID.asULong() = iconID;
- data->buddyHash.asBinary() = hash;
- requestBuddy(data);
- }
- }
-
- unsigned long infoUpdateTime = 0;
- unsigned long pluginInfoTime = 0;
- unsigned long pluginStatusTime = 0;
-
- // Direct connection info
- Tlv *tlvDirect = tlv(TLV_USER_DC_INFO);
- if (tlvDirect){
- ICQBuffer info(*tlvDirect);
- unsigned long realIP;
- unsigned short port;
- char mode, version, junk;
- info >> realIP;
- info.incReadPos(2);
- info >> port;
- if (realIP == 0x7F000001)
- realIP = 0;
- bChanged |= set_ip(&data->RealIP, htonl(realIP));
- data->Port.asULong() = port;
- unsigned long DCcookie;
- info >> mode >> junk >> version >> DCcookie;
- data->DCcookie.asULong() = DCcookie;
- info.incReadPos(8);
- info
- >> infoUpdateTime
- >> pluginInfoTime
- >> pluginStatusTime;
- if (mode == MODE_DENIED) mode = MODE_INDIRECT;
- if ((mode != MODE_DIRECT) && (mode != MODE_INDIRECT))
- mode = MODE_INDIRECT;
- data->Mode.asULong() = mode;
- data->Version.asULong() = version;
- }
-
- Tlv *tlvPlugin = tlv(0x0011);
- if (tlvPlugin && data->Uin.toULong()){
- ICQBuffer info(*tlvPlugin);
- char type;
- unsigned long time;
- info >> type;
- info.unpack(time);
- plugin p;
- unsigned plugin_index;
- unsigned long plugin_status;
- switch (type){
- case 1:
- addFullInfoRequest(data->Uin.toULong());
- break;
- case 2:
- if ((getInvisible() && data->VisibleId.toULong()) ||
- (!getInvisible() && (data->InvisibleId.toULong() == 0))){
- info.incReadPos(6);
- info.unpack((char*)p, sizeof(p));
- data->PluginInfoTime.asULong() = time;
- for (plugin_index = 0; plugin_index < PLUGIN_NULL; plugin_index++)
- if (!memcmp(p, plugins[plugin_index], sizeof(p)))
- break;
- switch (plugin_index){
- case PLUGIN_PHONEBOOK:
- log(L_DEBUG, "Updated phonebook");
- addPluginInfoRequest(data->Uin.toULong(), plugin_index);
- break;
- case PLUGIN_PICTURE:
- log(L_DEBUG, "Updated picture");
- // when buddyID -> new avatar support, no need to ask for old picture plugin
- if(data->buddyID.toULong() == 0 || data->buddyHash.toBinary().size() != 16) {
- data->buddyID.asULong() = 0;
- addPluginInfoRequest(data->Uin.toULong(), plugin_index);
- }
- break;
- case PLUGIN_QUERYxINFO:
- log(L_DEBUG, "Updated info plugin list");
- addPluginInfoRequest(data->Uin.toULong(), plugin_index);
- break;
- default:
- if (plugin_index >= PLUGIN_NULL)
- log(L_WARN, "Unknown plugin sign (%04X %04X)",
- type, plugin_index);
- }
- }
- break;
- case 3:
- info.incReadPos(6);
- info.unpack((char*)p, sizeof(p));
- info.incReadPos(1);
- info.unpack(plugin_status);
- data->PluginStatusTime.asULong() = time;
- for (plugin_index = 0; plugin_index < PLUGIN_NULL; plugin_index++)
- if (!memcmp(p, plugins[plugin_index], sizeof(p)))
- break;
- switch (plugin_index){
- case PLUGIN_FOLLOWME:
- if (data->FollowMe.toULong() == plugin_status)
- break;
- data->FollowMe.asULong() = plugin_status;
- bChanged = true;
- break;
- case PLUGIN_FILESERVER:
- if ((data->SharedFiles.toBool() != 0) == (plugin_status != 0))
- break;
- data->SharedFiles.asBool() = (plugin_status != 0);
- bChanged = true;
- break;
- case PLUGIN_ICQPHONE:
- if (data->ICQPhone.toULong() == plugin_status)
- break;
- data->ICQPhone.asULong() = plugin_status;
- bChanged = true;
- break;
- default:
- if (plugin_index >= PLUGIN_NULL)
- log(L_WARN, "Unknown plugin sign (%04X %04X)",
- type, plugin_index);
- }
- break;
-
- }
- }else{
- data->InfoUpdateTime.asULong() = infoUpdateTime;
- data->PluginInfoTime.asULong() = pluginInfoTime;
- data->PluginStatusTime.asULong() = pluginStatusTime;
- if (!getDisableAutoUpdate() &&
- ((getInvisible() && data->VisibleId.toULong()) ||
- (!getInvisible() && (data->InvisibleId.toULong() == 0)))){
- if (infoUpdateTime == 0)
- infoUpdateTime = 1;
- if (infoUpdateTime != data->InfoFetchTime.toULong())
- addFullInfoRequest(data->Uin.toULong());
- if ((data->PluginInfoTime.toULong() != data->PluginInfoFetchTime.toULong())){
- if (data->PluginInfoTime.toULong())
- addPluginInfoRequest(data->Uin.toULong(), PLUGIN_QUERYxINFO);
- }
- if ((data->PluginInfoTime.toULong() != data->PluginInfoFetchTime.toULong()) ||
- (data->PluginStatusTime.toULong() != data->PluginStatusFetchTime.toULong())){
- if (data->SharedFiles.toBool()){
- data->SharedFiles.asBool() = false;
- bChanged = true;
- }
- if (data->FollowMe.toULong()){
- data->FollowMe.asULong() = 0;
- bChanged = true;
- }
- if (data->ICQPhone.toULong()){
- data->ICQPhone.asULong() = 0;
- bChanged = true;
- }
- if (data->PluginStatusTime.toULong())
- addPluginInfoRequest(data->Uin.toULong(), PLUGIN_QUERYxSTATUS);
- }
- }
- }
- if (data->bInvisible.toBool()){
- data->bInvisible.asBool() = false;
- bChanged = true;
- }
- if (bChanged){
- EventContact(contact, EventContact::eChanged).process();
- }
- if ((data->Status.toULong() != prevStatus) || bAwayChanged){
- unsigned status = STATUS_OFFLINE;
- if ((data->Status.toULong() & 0xFFFF) != ICQ_STATUS_OFFLINE){
- status = STATUS_ONLINE;
- if (data->Status.toULong() & ICQ_STATUS_DND){
- status = STATUS_DND;
- }else if (data->Status.toULong() & ICQ_STATUS_OCCUPIED){
- status = STATUS_OCCUPIED;
- }else if (data->Status.toULong() & ICQ_STATUS_NA){
- status = STATUS_NA;
- }else if (data->Status.toULong() & ICQ_STATUS_AWAY){
- status = STATUS_AWAY;
- }else if (data->Status.toULong() & ICQ_STATUS_FFC){
- status = STATUS_FFC;
- }
- }
- if ((status == STATUS_ONLINE) && (data->Class.toULong() & CLASS_AWAY))
- status = STATUS_AWAY;
- StatusMessage *m = new StatusMessage();
- m->setContact(contact->id());
- m->setClient(dataName(data));
- m->setStatus(status);
- m->setFlags(MESSAGE_RECEIVED);
- EventMessageReceived e(m);
- if(!e.process())
- delete m;
- if (!contact->getIgnore() &&
- ((data->Class.toULong() & CLASS_AWAY) == 0) &&
- (((data->Status.toULong() & 0xFF) == ICQ_STATUS_ONLINE) &&
- (((prevStatus & 0xFF) != ICQ_STATUS_ONLINE)) || bAwayChanged) &&
- (((prevStatus & 0xFFFF) != ICQ_STATUS_OFFLINE) ||
- (data->OnlineTime.toULong() > this->data.owner.OnlineTime.toULong()))){
- EventContact e(contact, EventContact::eOnline);
- e.process();
- }
- if (!getDisableAutoReplyUpdate() && ((data->Status.toULong() & 0xFF) != ICQ_STATUS_ONLINE)){
- if ((getInvisible() && data->VisibleId.toULong()) ||
- (!getInvisible() && (data->InvisibleId.toULong() == 0)))
- addPluginInfoRequest(data->Uin.toULong(), PLUGIN_AR);
- }
- }
- }
- break;
- }
+ case ICQ_SNACxBDY_USEROFFLINE:
+ {
+ Contact *contact;
+ QString screen = buf->unpackScreen();
+ ICQUserData *data = m_client->findContact(screen, NULL, false, contact);
+ if(!data)
+ break;
+ if(data->Status.toULong() != ICQ_STATUS_OFFLINE)
+ {
+ m_client->setOffline(data);
+ StatusMessage *m = new StatusMessage;
+ m->setContact(contact->id());
+ m->setClient(m_client->dataName(data));
+ m->setStatus(STATUS_OFFLINE);
+ m->setFlags(MESSAGE_RECEIVED);
+ EventMessageReceived e(m);
+ if(!e.process())
+ delete m;
+ }
+ else
+ {
+ // hack for trillian
+ EventContact e(contact, EventContact::eOnline);
+ e.process();
+ }
+ break;
+ }
+ case ICQ_SNACxBDY_USERONLINE:
+ {
+ Contact *contact;
+ QString screen = buf->unpackScreen();
+ ICQUserData *data = m_client->findContact(screen, NULL, false, contact);
+ if(data)
+ {
+ bool bChanged = false;
+ bool bAwayChanged = false;
+ unsigned long prevStatus = data->Status.toULong();
+
+ unsigned short level, len;
+ (*buf) >> level >> len;
+ data->WarningLevel.asULong() = level;
+
+ TlvList tlv((*buf));
+ Tlv* tlvClass = tlv(TLV_USER_CLASS);
+ if(tlvClass)
+ {
+ unsigned short userClass = *tlvClass;
+ if(userClass != data->Class.toULong())
+ {
+ if ((userClass & CLASS_AWAY) != (data->Class.toULong() & CLASS_AWAY))
+ {
+ data->StatusTime.asULong() = (unsigned long)time(NULL);
+ bAwayChanged = true;
+ }
+ data->Class.asULong() = userClass;
+ bChanged = true;
+ }
+ if(data->Uin.toULong() == 0)
+ {
+ if (userClass & CLASS_AWAY)
+ {
+ m_client->fetchAwayMessage(data);
+ }
+ else
+ {
+ data->AutoReply.str() = QString::null;
+ }
+ }
+ }
+
+ // Status TLV
+ Tlv *tlvStatus = tlv(TLV_USER_STATUS);
+ if(tlvStatus)
+ {
+ uint32_t status = *tlvStatus;
+ if (status != data->Status.toULong())
+ {
+ data->Status.asULong() = status;
+ if ((status & 0xFF) == 0)
+ data->AutoReply.str() = QString::null;
+ data->StatusTime.asULong() = (unsigned long)time(NULL);
+ }
+ }
+ else if(data->Status.toULong() == ICQ_STATUS_OFFLINE)
+ {
+ data->Status.asULong() = ICQ_STATUS_ONLINE;
+ data->StatusTime.asULong() = (unsigned long)time(NULL);
+ }
+
+ // Online time TLV
+ Tlv *tlvOnlineTime = tlv(TLV_USER_SIGNON_TIME);
+ if(tlvOnlineTime)
+ {
+ uint32_t OnlineTime = *tlvOnlineTime;
+ if(OnlineTime != data->OnlineTime.toULong())
+ {
+ data->OnlineTime.asULong() = OnlineTime;
+ bChanged = true;
+ }
+ }
+ Tlv *tlvNATime = tlv(0x0004);
+ if(tlvNATime)
+ {
+ unsigned short na_time = *tlvNATime;
+ unsigned long StatusTime = (unsigned long)time(NULL) - na_time * 60;
+ if(StatusTime != data->StatusTime.toULong())
+ {
+ data->StatusTime.asULong() = StatusTime;
+ bChanged = true;
+ }
+ }
+
+ // IP TLV
+ Tlv *tlvIP = tlv(TLV_USER_EXT_IP);
+ if(tlvIP)
+ bChanged |= set_ip(&data->IP, htonl((uint32_t)(*tlvIP)));
+
+ // short caps tlv
+ Tlv *tlvCapShort = tlv(TLV_USER_NEWCAPS);
+ if(tlvCapShort)
+ {
+ data->Caps.asULong() = 0;
+ data->Caps2.asULong() = 0;
+
+ ICQBuffer info(*tlvCapShort);
+
+ for (; info.readPos() < info.size(); )
+ {
+ unsigned char shortcap[2];
+ info.unpack((char*)shortcap, sizeof(shortcap));
+ for (unsigned i = 0;; i++)
+ {
+ if(!memcmp(&m_client->capabilities[i][2], shortcap, sizeof(shortcap)))
+ {
+ m_client->setCap(data, (cap_id_t)i);
+ break;
+ }
+ // we don't go through all caps, only the first ones starting with 0x09
+ if (*m_client->capabilities[i] != '\x09')
+ {
+ log(L_DEBUG, "%lu unknown cap %s", data->Uin.toULong(),
+ makeCapStr(shortcap, sizeof(shortcap)).latin1());
+ break;
+ }
+ }
+ }
+ }
+ // normal cap tlv
+ Tlv *tlvCapability = tlv(TLV_USER_CAPS);
+ if (tlvCapability)
+ {
+ if(!tlvCapShort)
+ {
+ data->Caps.asULong() = 0;
+ data->Caps2.asULong() = 0;
+ }
+ ICQBuffer info(*tlvCapability);
+ for(; info.readPos() < info.size(); )
+ {
+ capability cap;
+ info.unpack((char*)cap, sizeof(capability));
+ for(unsigned i = 0;; i++)
+ {
+ unsigned size = sizeof(capability);
+ if (i == CAP_SIMOLD)
+ size--;
+
+ if (*m_client->capabilities[i] == 0)
+ {
+ log( L_DEBUG, "%lu unknown cap %s", data->Uin.toULong(), makeCapStr( cap, size ).latin1() );
+ break;
+ }
+ if ((i == CAP_MICQ) || (i == CAP_LICQ) || (i == CAP_SIM) || (i == CAP_KOPETE))
+ size -= 4;
+ if ((i == CAP_ANDRQ))
+ size -= 7;
+ if ((i == CAP_MIRANDA))
+ size -= 8;
+ if ((i == CAP_JIMM))
+ size -= 11;
+
+ if (i == CAP_ICQJP)
+ size -= (16 - 4);
+
+ if (!memcmp(cap, m_client->capabilities[i], size))
+ {
+ if (i == CAP_SIMOLD)
+ {
+ unsigned char build = cap[sizeof(capability)-1];
+ if (build && ((build == 0x92) || (build < (1 << 6)))) continue;
+ data->Build.asULong() = build;
+ }
+ if ((i == CAP_MICQ) || (i == CAP_LICQ) || (i == CAP_SIM) || (i == CAP_KOPETE))
+ {
+ unsigned char *p = (unsigned char*)cap;
+ p += 12;
+ data->Build.asULong() = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
+ }
+ if ((i == CAP_ANDRQ))
+ {
+ unsigned char *p = (unsigned char*)cap;
+ p += 9;
+ data->Build.asULong() = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
+ }
+ if ((i == CAP_MIRANDA))
+ {
+ unsigned char *p = (unsigned char*)cap;
+ p += 8;
+ data->Build.asULong() = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
+ }
+ if ((i == CAP_JIMM))
+ {
+ char *p = (char*)cap;
+ p += 5;
+ QString str = QString::fromAscii(p, 10);
+ QStringList sl = QStringList::split('.', str);
+ unsigned char maj = 0, min = 0;
+ unsigned short rev = 0;
+ if(sl.count() > 0)
+ maj = sl[0].toUShort();
+ if(sl.count() > 1)
+ min = sl[1].toUShort();
+ if(sl.count() > 2)
+ rev = sl[2].toUShort();
+
+ data->Build.asULong() = (maj << 24) + (min << 16) + rev;
+ }
+ if (i == CAP_ICQJP)
+ {
+ log(L_DEBUG, "%lu ICQJP cap is set", data->Uin.toULong());
+ data->Build.asULong() = cap[0x4] << 0x18 | cap[0x5] << 0x10 |
+ cap[0x6] << 8 | cap[0x7];
+ }
+ m_client->setCap(data, (cap_id_t)i);
+ break;
+ }
+ }
+ }
+ }
+
+ // buddy info
+ Tlv *tlvBuddy = tlv(TLV_USER_BUDDYINFO);
+ if (tlvBuddy)
+ {
+ const QByteArray &ba = data->buddyHash.toBinary();
+ unsigned short iconID;
+ unsigned char iconFlags, hashSize;
+ ICQBuffer info(*tlvBuddy);
+ QByteArray hash(16);
+ QString fname = m_client->pictureFile(data);
+ QFileInfo fi(fname);
+
+ info >> iconID >> iconFlags >> hashSize;
+ hash.resize(hashSize);
+ info.unpack(hash.data(), hashSize);
+ if(data->buddyID.toULong() != iconID ||
+ ba != hash ||
+ !fi.exists() || fi.size() == 0) {
+ data->buddyID.asULong() = iconID;
+ data->buddyHash.asBinary() = hash;
+ m_client->requestBuddy(data);
+ }
+ }
+
+ unsigned long infoUpdateTime = 0;
+ unsigned long pluginInfoTime = 0;
+ unsigned long pluginStatusTime = 0;
+
+ // Direct connection info
+ Tlv *tlvDirect = tlv(TLV_USER_DC_INFO);
+ if(tlvDirect)
+ {
+ ICQBuffer info(*tlvDirect);
+ unsigned long realIP;
+ unsigned short port;
+ char mode, version, junk;
+ info >> realIP;
+ info.incReadPos(2);
+ info >> port;
+ if (realIP == 0x7F000001)
+ realIP = 0;
+ bChanged |= set_ip(&data->RealIP, htonl(realIP));
+ data->Port.asULong() = port;
+ unsigned long DCcookie;
+ info >> mode >> junk >> version >> DCcookie;
+ data->DCcookie.asULong() = DCcookie;
+ info.incReadPos(8);
+ info
+ >> infoUpdateTime
+ >> pluginInfoTime
+ >> pluginStatusTime;
+ if (mode == MODE_DENIED) mode = MODE_INDIRECT;
+ if ((mode != MODE_DIRECT) && (mode != MODE_INDIRECT))
+ mode = MODE_INDIRECT;
+ data->Mode.asULong() = mode;
+ data->Version.asULong() = version;
+ }
+
+ Tlv *tlvPlugin = tlv(0x0011);
+ if(tlvPlugin && data->Uin.toULong())
+ {
+ ICQBuffer info(*tlvPlugin);
+ char type;
+ unsigned long time;
+ info >> type;
+ info.unpack(time);
+ plugin p;
+ unsigned plugin_index;
+ unsigned long plugin_status;
+ switch (type){
+ case 1:
+ m_client->addFullInfoRequest(data->Uin.toULong());
+ break;
+ case 2:
+ if ((m_client->getInvisible() && data->VisibleId.toULong()) ||
+ (!m_client->getInvisible() && (data->InvisibleId.toULong() == 0))){
+ info.incReadPos(6);
+ info.unpack((char*)p, sizeof(p));
+ data->PluginInfoTime.asULong() = time;
+ for (plugin_index = 0; plugin_index < PLUGIN_NULL; plugin_index++)
+ if (!memcmp(p, m_client->plugins[plugin_index], sizeof(p)))
+ break;
+ switch (plugin_index)
+ {
+ case PLUGIN_PHONEBOOK:
+ log(L_DEBUG, "Updated phonebook");
+ m_client->addPluginInfoRequest(data->Uin.toULong(), plugin_index);
+ break;
+ case PLUGIN_PICTURE:
+ log(L_DEBUG, "Updated picture");
+ // when buddyID -> new avatar support, no need to ask for old picture plugin
+ if(data->buddyID.toULong() == 0 || data->buddyHash.toBinary().size() != 16) {
+ data->buddyID.asULong() = 0;
+ m_client->addPluginInfoRequest(data->Uin.toULong(), plugin_index);
+ }
+ break;
+ case PLUGIN_QUERYxINFO:
+ log(L_DEBUG, "Updated info plugin list");
+ m_client->addPluginInfoRequest(data->Uin.toULong(), plugin_index);
+ break;
+ default:
+ if (plugin_index >= PLUGIN_NULL)
+ log(L_WARN, "Unknown plugin sign (%04X %04X)",
+ type, plugin_index);
+ }
+ }
+ break;
+ case 3:
+ info.incReadPos(6);
+ info.unpack((char*)p, sizeof(p));
+ info.incReadPos(1);
+ info.unpack(plugin_status);
+ data->PluginStatusTime.asULong() = time;
+ for (plugin_index = 0; plugin_index < PLUGIN_NULL; plugin_index++)
+ if (!memcmp(p, m_client->plugins[plugin_index], sizeof(p)))
+ break;
+ switch (plugin_index){
+ case PLUGIN_FOLLOWME:
+ if (data->FollowMe.toULong() == plugin_status)
+ break;
+ data->FollowMe.asULong() = plugin_status;
+ bChanged = true;
+ break;
+ case PLUGIN_FILESERVER:
+ if ((data->SharedFiles.toBool() != 0) == (plugin_status != 0))
+ break;
+ data->SharedFiles.asBool() = (plugin_status != 0);
+ bChanged = true;
+ break;
+ case PLUGIN_ICQPHONE:
+ if (data->ICQPhone.toULong() == plugin_status)
+ break;
+ data->ICQPhone.asULong() = plugin_status;
+ bChanged = true;
+ break;
+ default:
+ if (plugin_index >= PLUGIN_NULL)
+ log(L_WARN, "Unknown plugin sign (%04X %04X)",
+ type, plugin_index);
+ }
+ break;
+
+ }
+ }
+ else
+ {
+ data->InfoUpdateTime.asULong() = infoUpdateTime;
+ data->PluginInfoTime.asULong() = pluginInfoTime;
+ data->PluginStatusTime.asULong() = pluginStatusTime;
+ if (!m_client->getDisableAutoUpdate() &&
+ ((m_client->getInvisible() && data->VisibleId.toULong()) ||
+ (!m_client->getInvisible() && (data->InvisibleId.toULong() == 0)))){
+ if (infoUpdateTime == 0)
+ infoUpdateTime = 1;
+ if (infoUpdateTime != data->InfoFetchTime.toULong())
+ m_client->addFullInfoRequest(data->Uin.toULong());
+ if ((data->PluginInfoTime.toULong() != data->PluginInfoFetchTime.toULong())){
+ if (data->PluginInfoTime.toULong())
+ m_client->addPluginInfoRequest(data->Uin.toULong(), PLUGIN_QUERYxINFO);
+ }
+ if ((data->PluginInfoTime.toULong() != data->PluginInfoFetchTime.toULong()) ||
+ (data->PluginStatusTime.toULong() != data->PluginStatusFetchTime.toULong())){
+ if (data->SharedFiles.toBool()){
+ data->SharedFiles.asBool() = false;
+ bChanged = true;
+ }
+ if (data->FollowMe.toULong()){
+ data->FollowMe.asULong() = 0;
+ bChanged = true;
+ }
+ if (data->ICQPhone.toULong()){
+ data->ICQPhone.asULong() = 0;
+ bChanged = true;
+ }
+ if (data->PluginStatusTime.toULong())
+ m_client->addPluginInfoRequest(data->Uin.toULong(), PLUGIN_QUERYxSTATUS);
+ }
+ }
+ }
+ if (data->bInvisible.toBool()){
+ data->bInvisible.asBool() = false;
+ bChanged = true;
+ }
+ if (bChanged){
+ EventContact(contact, EventContact::eChanged).process();
+ }
+ if ((data->Status.toULong() != prevStatus) || bAwayChanged){
+ unsigned status = STATUS_OFFLINE;
+ if ((data->Status.toULong() & 0xFFFF) != ICQ_STATUS_OFFLINE){
+ status = STATUS_ONLINE;
+ if (data->Status.toULong() & ICQ_STATUS_DND){
+ status = STATUS_DND;
+ }else if (data->Status.toULong() & ICQ_STATUS_OCCUPIED){
+ status = STATUS_OCCUPIED;
+ }else if (data->Status.toULong() & ICQ_STATUS_NA){
+ status = STATUS_NA;
+ }else if (data->Status.toULong() & ICQ_STATUS_AWAY){
+ status = STATUS_AWAY;
+ }else if (data->Status.toULong() & ICQ_STATUS_FFC){
+ status = STATUS_FFC;
+ }
+ }
+ if((status == STATUS_ONLINE) && (data->Class.toULong() & CLASS_AWAY))
+ status = STATUS_AWAY;
+ StatusMessage *m = new StatusMessage();
+ m->setContact(contact->id());
+ m->setClient(m_client->dataName(data));
+ m->setStatus(status);
+ m->setFlags(MESSAGE_RECEIVED);
+ EventMessageReceived e(m);
+ if(!e.process())
+ delete m;
+ if (!contact->getIgnore() &&
+ ((data->Class.toULong() & CLASS_AWAY) == 0) &&
+ (((data->Status.toULong() & 0xFF) == ICQ_STATUS_ONLINE) &&
+ (((prevStatus & 0xFF) != ICQ_STATUS_ONLINE)) || bAwayChanged) &&
+ (((prevStatus & 0xFFFF) != ICQ_STATUS_OFFLINE) ||
+ (data->OnlineTime.toULong() > m_client->data.owner.OnlineTime.toULong()))){
+ EventContact e(contact, EventContact::eOnline);
+ e.process();
+ }
+ if (!m_client->getDisableAutoReplyUpdate() && ((data->Status.toULong() & 0xFF) != ICQ_STATUS_ONLINE)){
+ if ((m_client->getInvisible() && data->VisibleId.toULong()) ||
+ (!m_client->getInvisible() && (data->InvisibleId.toULong() == 0)))
+ m_client->addPluginInfoRequest(data->Uin.toULong(), PLUGIN_AR);
+ }
+ }
+ }
+ break;
+ }
default:
- log(L_WARN, "Unknown buddy foodgroup type %04X", type);
+ log(L_WARN, "Unknown buddy foodgroup type %04X", subtype);
}
+ return false;
}
void ICQClient::buddyRequest()
@@ -535,49 +590,49 @@
sendPacket(true);
}
-void ICQClient::addBuddy(Contact *contact)
+void SnacIcqBuddy::addBuddy(Contact *contact)
{
- if (getState() != Connected)
+ if (m_client->getState() != ICQClient::Connected)
return;
if (contact->id() == 0)
return;
ICQUserData *data;
- ClientDataIterator it_data(contact->clientData, this);
- while ((data = toICQUserData(++it_data)) != NULL){
- QStringList::iterator it = buddies.find(screen(data));
- if (it != buddies.end())
+ ClientDataIterator it_data(contact->clientData, m_client);
+ while ((data = m_client->toICQUserData(++it_data)) != NULL){
+ QStringList::iterator it = m_client->buddies.find(m_client->screen(data));
+ if (it != m_client->buddies.end())
continue;
if ((data->IgnoreId.toULong() == 0) && (data->WaitAuth.toBool() || (data->GrpId.toULong() == 0))){
- snac(ICQ_SNACxFOOD_BUDDY, ICQ_SNACxBDY_ADDxTOxLIST);
- socket()->writeBuffer().packScreen(screen(data));
- sendPacket(true);
- buddies.push_back(screen(data));
+ m_client->snac(ICQ_SNACxFOOD_BUDDY, ICQ_SNACxBDY_ADDxTOxLIST);
+ m_client->socket()->writeBuffer().packScreen(m_client->screen(data));
+ m_client->sendPacket(true);
+ m_client->buddies.push_back(m_client->screen(data));
}
}
}
-void ICQClient::removeBuddy(Contact *contact)
+void SnacIcqBuddy::removeBuddy(Contact *contact)
{
- if (getState() != Connected)
+ if (m_client->getState() != ICQClient::Connected)
return;
if (contact->id() == 0)
return;
ICQUserData *data;
- ClientDataIterator it_data(contact->clientData, this);
- while ((data = toICQUserData(++it_data)) != NULL){
- QStringList::iterator it = buddies.find(screen(data));
- if (it == buddies.end())
+ ClientDataIterator it_data(contact->clientData, m_client);
+ while ((data = m_client->toICQUserData(++it_data)) != NULL){
+ QStringList::iterator it = m_client->buddies.find(m_client->screen(data));
+ if (it == m_client->buddies.end())
continue;
- if(data->WantAuth.toBool()) {
+ if(data->WantAuth.toBool())
+ {
Message *msg = new Message;
msg->setText(i18n("removed from buddy list"));
- sendAuthRefused(msg, data);
+ m_client->sendAuthRefused(msg, data);
}
- snac(ICQ_SNACxFOOD_BUDDY, ICQ_SNACxBDY_REMOVExFROMxLIST);
- socket()->writeBuffer().packScreen(screen(data));
- sendPacket(true);
- buddies.erase(it);
+ m_client->snac(ICQ_SNACxFOOD_BUDDY, ICQ_SNACxBDY_REMOVExFROMxLIST);
+ m_client->socket()->writeBuffer().packScreen(m_client->screen(data));
+ m_client->sendPacket(true);
+ m_client->buddies.erase(it);
}
}
-
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/icq/icqbuddy.h
^
|
@@ -0,0 +1,20 @@
+
+#ifndef _ICQBUDDY_H
+#define _ICQBUDDY_H
+
+#include "snac.h"
+#include "contacts.h"
+
+class ICQClient;
+class SnacIcqBuddy : public SnacHandler
+{
+public:
+ SnacIcqBuddy(ICQClient* client);
+ virtual ~SnacIcqBuddy();
+
+ virtual bool process(unsigned short subtype, ICQBuffer* buf);
+ void addBuddy(SIM::Contact *contact);
+ void removeBuddy(SIM::Contact *contact);
+};
+
+#endif
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqbuffer.cpp
^
|
@@ -48,6 +48,10 @@
memcpy(m_data.data(), data, m_nSize);
m_data[(int)m_nSize] = 0;
}
+Tlv::Tlv(unsigned short num, QByteArray& array) : m_nNum(num), m_nSize(array.size())
+{
+ m_data.duplicate(array);
+}
Tlv::operator uint16_t () const
{
@@ -65,7 +69,8 @@
TlvList::TlvList(ICQBuffer &b, unsigned nTlvs)
{
- for (unsigned n = 0; (b.readPos() < b.size()) && (n < nTlvs); n++){
+ for(unsigned n = 0; (b.readPos() < b.size()) && (n < nTlvs); n++)
+ {
unsigned short num, size;
b >> num >> size;
if (b.readPos() + size > b.size())
@@ -387,7 +392,6 @@
SWAP_L(i);
pack((char*)&i, 4);
}
-
bool ICQBuffer::unpackStr(QString &str)
{
unsigned short s;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqbuffer.h
^
|
@@ -28,6 +28,7 @@
{
public:
Tlv(unsigned short num = 0, unsigned short size = 0, const char *data = NULL);
+ Tlv(unsigned short num, QByteArray& array);
unsigned short Num() const { return m_nNum; }
unsigned short Size() const { return m_nSize; }
const char *Data() const { return m_data.data(); }
@@ -101,6 +102,7 @@
void pack(const QString &s);
void pack(const QCString &s);
void pack(const char *d, unsigned size) { Buffer::pack(d, size); }
+ void pack(const unsigned char *d, unsigned size) { Buffer::pack((const char*)d, size); }
void pack(char c) { *this << c; }
void pack(unsigned char c) { *this << c; }
void pack(unsigned short c);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqclient.cpp
^
|
@@ -44,7 +44,6 @@
#include "socket.h"
#include "unquot.h"
#include "log.h"
-#include "core.h"
#include "icq.h"
#include "icqconfig.h"
@@ -67,6 +66,11 @@
#include "encodingdlg.h"
#include "warndlg.h"
+#include "icqbuddy.h"
+#include "icqservice.h"
+
+#include "icqdirect.h"
+
using namespace std;
using namespace SIM;
@@ -168,6 +172,9 @@
{ "", DATA_ULONG, 1, 0}, // buddyRosterID
{ "buddyID", DATA_ULONG, 1, 0},
{ "buddyHash", DATA_BINARY, 1, 0},
+ { "unknown2", DATA_BINARY, 1, 0},
+ { "unknown4", DATA_BINARY, 1, 0},
+ { "unknown5", DATA_BINARY, 1, 0},
{ NULL, DATA_UNKNOWN, 0, 0 }
};
@@ -210,46 +217,54 @@
ICQClient::ICQClient(Protocol *protocol, Buffer *cfg, bool bAIM)
: TCPClient(protocol, cfg, HighPriority - 1)
{
- m_bAIM = bAIM;
+ m_bAIM = bAIM;
+
+ m_listener = NULL;
+ load_data(icqClientData, &data, cfg);
+ if (data.owner.Uin.toULong() != 0)
+ m_bAIM = false;
+ if (!data.owner.Screen.str().isEmpty())
+ m_bAIM = true;
+
+ m_bVerifying = false;
+ m_bNoSend = true;
+ m_bReady = false;
+ m_bRosters = false;
+ m_bJoin = false;
+ m_listRequest = NULL;
+ data.owner.DCcookie.asULong() = rand();
+ m_bBirthday = false;
+ m_sendTimer = new QTimer(this);
+ connect(m_sendTimer, SIGNAL(timeout()), this, SLOT(sendTimeout()));
+ m_processTimer = new QTimer(this);
+ connect(m_processTimer, SIGNAL(timeout()), this, SLOT(processSendQueue()));
+ QString requests = getListRequests();
+ while (requests.length()){
+ QString req = getToken(requests, ';');
+ QString n = getToken(req, ',');
+ ListRequest lr;
+ lr.type = n.toUInt();
+ lr.screen = req;
+ listRequests.push_back(lr);
+ }
+
+ m_snacBuddy = new SnacIcqBuddy(this);
+ m_snacService = new SnacIcqService(this);
+ addSnacHandler(m_snacBuddy);
+ addSnacHandler(m_snacService);
+
+ disconnected();
+ m_bFirstTry = false;
+ ContactList::ContactIterator it;
+ Contact *contact;
+ while ((contact = ++it) != NULL){
+ ClientDataIterator itd(contact->clientData, this);
+ ICQUserData *data;
+ while ((data = toICQUserData(++itd)) != NULL)
+ data->Alias.str() = contact->getName();
+ }
+ m_connectionLost = false;
- m_listener = NULL;
- load_data(icqClientData, &data, cfg);
- if (data.owner.Uin.toULong() != 0)
- m_bAIM = false;
- if (!data.owner.Screen.str().isEmpty())
- m_bAIM = true;
-
- m_bVerifying = false;
- m_bNoSend = true;
- m_bReady = false;
- m_bRosters = false;
- m_bJoin = false;
- m_listRequest = NULL;
- data.owner.DCcookie.asULong() = rand();
- m_bBirthday = false;
- m_sendTimer = new QTimer(this);
- connect(m_sendTimer, SIGNAL(timeout()), this, SLOT(sendTimeout()));
- m_processTimer = new QTimer(this);
- connect(m_processTimer, SIGNAL(timeout()), this, SLOT(processSendQueue()));
- QString requests = getListRequests();
- while (requests.length()){
- QString req = getToken(requests, ';');
- QString n = getToken(req, ',');
- ListRequest lr;
- lr.type = n.toUInt();
- lr.screen = req;
- listRequests.push_back(lr);
- }
- disconnected();
- m_bFirstTry = false;
- ContactList::ContactIterator it;
- Contact *contact;
- while ((contact = ++it) != NULL){
- ClientDataIterator itd(contact->clientData, this);
- ICQUserData *data;
- while ((data = toICQUserData(++itd)) != NULL)
- data->Alias.str() = contact->getName();
- }
}
ICQClient::~ICQClient()
@@ -260,7 +275,8 @@
free_data(icqClientData, &data);
if (socket())
delete socket();
- for (list<Message*>::iterator it = m_processMsg.begin(); it != m_processMsg.end(); ++it){
+ for(list<Message*>::iterator it = m_processMsg.begin(); it != m_processMsg.end(); ++it)
+ {
Message *msg = *it;
msg->setError(I18N_NOOP("Process message failed"));
// FIXME: this does not work and could crash !!!!
@@ -275,6 +291,41 @@
freeData();
}
+bool ICQClient::addSnacHandler(SnacHandler* handler)
+{
+ if(!handler)
+ return false;
+ mapSnacHandlers::iterator it = m_snacHandlers.find(handler->getType());
+ if(it != m_snacHandlers.end())
+ {
+ delete it->second;
+ }
+ m_snacHandlers[handler->getType()] = handler;
+ return true;
+}
+
+void ICQClient::clearSnacHandlers()
+{
+ // TODO
+}
+
+void ICQClient::deleteFileMessage(MessageId const& cookie)
+{
+ for(list<Message*>::iterator it = m_processMsg.begin(); it != m_processMsg.end(); ++it)
+ {
+ if((*it)->baseType() == MessageFile)
+ {
+ AIMFileMessage* afm = static_cast<AIMFileMessage*>(*it);
+ if(afm)
+ if(afm->getID_L() == cookie.id_l && afm->getID_H() == cookie.id_h)
+ {
+ m_processMsg.erase(it);
+ return;
+ }
+ }
+ }
+}
+
void ICQClient::contactsLoaded()
{
/* outdated
@@ -338,6 +389,13 @@
return "ICQ." + QString::number(data.owner.Uin.toULong());
}
+QString ICQClient::getScreen()
+{
+ if (m_bAIM)
+ return data.owner.Screen.str();
+ return QString::number(data.owner.Uin.toULong());
+}
+
QWidget *ICQClient::setupWnd()
{
if (m_bAIM)
@@ -378,6 +436,13 @@
return data.owner.Uin.toULong();
}
+void ICQClient::generateCookie(MessageId& id)
+{
+ // Just for fun:
+ id.id_h = rand() + (rand() << 16);
+ id.id_l = rand() + (rand() << 16);
+}
+
bool ICQClient::isMyData(clientData *&_data, Contact *&contact)
{
if (_data->Sign.toULong() != ICQ_SIGN)
@@ -412,7 +477,8 @@
OscarSocket::OscarSocket()
{
- m_nFlapSequence = (unsigned short)(rand() & 0x7FFF);
+ //m_nFlapSequence = (unsigned short)(rand() & 0x7FFF);
+ m_nFlapSequence = 8984;
m_nMsgSequence = 0;
}
@@ -429,6 +495,7 @@
void ICQClient::connect_ready()
{
+ log(L_DEBUG, "ICQClient::connect_ready()");
m_bFirstTry = false;
if (m_listener == NULL){
m_listener = new ICQListener(this);
@@ -533,7 +600,7 @@
}
if (status != m_status){
m_status = status;
- sendStatus();
+ snacService()->sendStatus();
EventClientChanged(this).process();
}
}
@@ -543,7 +610,7 @@
if (bState != getInvisible()){
TCPClient::setInvisible(bState);
if (getState() == Connected)
- setInvisible();
+ snacService()->setInvisible();
EventClientChanged(this).process();
}
}
@@ -586,21 +653,18 @@
m_acceptMsg.clear();
m_bRosters = false;
m_nMsgSequence = 0;
- m_bIdleTime = false;
m_bNoSend = true;
m_bReady = false;
m_cookie.resize(0);
m_advCounter = 0;
- m_nUpdates = 0;
m_info_req.clear();
- while (!m_services.empty()){
- ServiceSocket *s = m_services.front();
- delete s;
- }
+ if(m_snacService)
+ m_snacService->clearServices();
if (m_listener){
delete m_listener;
m_listener = NULL;
}
+ m_nFlapSequence = 8984;
}
const char *icq_error_codes[] = {I18N_NOOP("Unknown error"),
@@ -639,7 +703,9 @@
void OscarSocket::packet_ready()
{
- if (m_bHeader){
+ unsigned short l_size = 0;
+ if(m_bHeader)
+ {
char c;
socket()->readBuffer() >> c;
if (c != 0x2A){
@@ -648,15 +714,16 @@
return;
}
socket()->readBuffer() >> m_nChannel;
- unsigned short sequence, size;
- socket()->readBuffer() >> sequence >> size;
+ unsigned short sequence;
+ socket()->readBuffer() >> sequence >> l_size;
m_bHeader = false;
- if (size){
- socket()->readBuffer().add(size);
+ if (l_size){
+ socket()->readBuffer().add(l_size);
return;
}
}
- packet();
+ l_size = socket()->readBuffer().size() - socket()->readBuffer().readPos();
+ packet(l_size);
}
void ICQClient::packet_ready()
@@ -664,75 +731,91 @@
OscarSocket::packet_ready();
}
-void ICQClient::packet()
+void ICQClient::packet(unsigned long size)
{
- ICQPlugin *plugin = static_cast<ICQPlugin*>(protocol()->plugin());
- EventLog::log_packet(socket()->readBuffer(), false, plugin->OscarPacket);
- switch (m_nChannel){
- case ICQ_CHNxNEW:
- chn_login();
- break;
- case ICQ_CHNxCLOSE:
- chn_close();
- break;
- case ICQ_CHNxDATA:{
- unsigned short food, type;
- unsigned short flags, seq, cmd;
- socket()->readBuffer() >> food >> type >> flags >> seq >> cmd;
- if ((flags & 0x8000)) { // some unknown data before real snac data
- // just read the length and forget it ;-)
- unsigned short unknown_length = 0;
- socket()->readBuffer() >> unknown_length;
- socket()->readBuffer().incReadPos(unknown_length);
- }
- // now just take a look at the type because 0x0001 == error
- // in all foodgroups
- if (type == 0x0001) {
- unsigned short err_code;
- socket()->readBuffer() >> err_code;
- log(L_DEBUG,"Error! foodgroup: %04X reason: %s",food,error_message(err_code));
- // now decrease for icqicmb & icqvarious
- socket()->readBuffer().decReadPos(sizeof(unsigned short));
- }
- switch (food){
- case ICQ_SNACxFOOD_SERVICE:
- snac_service(type, seq);
- break;
- case ICQ_SNACxFOOD_LOCATION:
- snac_location(type, seq);
- break;
- case ICQ_SNACxFOOD_BUDDY:
- snac_buddy(type, seq);
- break;
- case ICQ_SNACxFOOD_MESSAGE:
- snac_icmb(type, seq);
- break;
- case ICQ_SNACxFOOD_BOS:
- snac_bos(type, seq);
- break;
- case ICQ_SNACxFOOD_PING:
- snac_ping(type, seq);
- break;
- case ICQ_SNACxFOOD_LISTS:
- snac_lists(type, seq);
- break;
- case ICQ_SNACxFOOD_VARIOUS:
- snac_various(type, seq);
- break;
- case ICQ_SNACxFOOD_LOGIN:
- snac_login(type, seq);
- break;
- default:
- log(L_WARN, "Unknown foodgroup %04X", food);
- }
- break;
- }
- default:
- log(L_ERROR, "Unknown channel %u", m_nChannel & 0xFF);
- }
- socket()->readBuffer().init(6);
- socket()->readBuffer().packetStart();
- m_bHeader = true;
+ ICQPlugin *plugin = static_cast<ICQPlugin*>(protocol()->plugin());
+ EventLog::log_packet(socket()->readBuffer(), false, plugin->OscarPacket);
+ switch (m_nChannel){
+ case ICQ_CHNxNEW:
+ chn_login();
+ break;
+ case ICQ_CHNxCLOSE:
+ chn_close();
+ break;
+ case ICQ_CHNxDATA:
+ {
+ unsigned short food, type;
+ unsigned short flags, seq, cmd;
+ socket()->readBuffer() >> food >> type >> flags >> cmd >> seq;
+ unsigned short unknown_length = 0;
+ if ((flags & 0x8000)) { // some unknown data before real snac data
+ // just read the length and forget it ;-)
+ socket()->readBuffer() >> unknown_length;
+ socket()->readBuffer().incReadPos(unknown_length);
+ }
+ // now just take a look at the type because 0x0001 == error
+ // in all foodgroups
+ if (type == 0x0001) {
+ unsigned short err_code;
+ socket()->readBuffer() >> err_code;
+ log(L_DEBUG,"Error! foodgroup: %04X reason: %s",food,error_message(err_code));
+ // now decrease for icqicmb & icqvarious
+ socket()->readBuffer().decReadPos(sizeof(unsigned short));
+ }
+ switch (food){
+ //case ICQ_SNACxFOOD_SERVICE:
+ // snac_service(type, seq);
+ // break;
+ case ICQ_SNACxFOOD_LOCATION:
+ snac_location(type, seq);
+ break;
+ //case ICQ_SNACxFOOD_BUDDY:
+ // snac_buddy(type, seq);
+ // break;
+ case ICQ_SNACxFOOD_MESSAGE:
+ snac_icmb(type, seq);
+ break;
+ case ICQ_SNACxFOOD_BOS:
+ snac_bos(type, seq);
+ break;
+ case ICQ_SNACxFOOD_PING:
+ snac_ping(type, seq);
+ break;
+ case ICQ_SNACxFOOD_LISTS:
+ snac_lists(type, seq);
+ break;
+ case ICQ_SNACxFOOD_VARIOUS:
+ snac_various(type, seq);
+ break;
+ case ICQ_SNACxFOOD_LOGIN:
+ snac_login(type, seq);
+ break;
+ default:
+ {
+ mapSnacHandlers::iterator it = m_snacHandlers.find(food);
+ if(it == m_snacHandlers.end())
+ {
+ log(L_WARN, "Unknown foodgroup %04X", food);
+ }
+ else
+ {
+ ICQBuffer b;
+ b.resize(size - unknown_length);
+ b.setReadPos(0);
+ b.setWritePos(size - unknown_length);
+ socket()->readBuffer().unpack(b.data(), size - unknown_length);
+ it->second->process(type, &b);
+ }
+ }
+ }
+ break;
+ }
+ default:
+ log(L_ERROR, "Unknown channel %u", m_nChannel & 0xFF);
+ }
+ socket()->readBuffer().init(6);
+ socket()->readBuffer().packetStart();
+ m_bHeader = true;
}
void OscarSocket::flap(char channel)
@@ -751,8 +834,8 @@
<< food
<< type
<< 0x0000
- << (msgId ? ++m_nMsgSequence : 0x0000)
- << (bType ? type : (unsigned short)0);
+ << (bType ? type : (unsigned short)0)
+ << (msgId ? ++m_nMsgSequence : 0x0000);
}
void OscarSocket::sendPacket(bool bSend)
@@ -763,11 +846,11 @@
packet[4] = (char)((size >> 8) & 0xFF);
packet[5] = (char)(size & 0xFF);
if (bSend){
- ++m_nFlapSequence;
packet[2] = (m_nFlapSequence >> 8);
packet[3] = m_nFlapSequence;
EventLog::log_packet(socket()->writeBuffer(), true, ICQPlugin::icq_plugin->OscarPacket);
socket()->write();
+ ++m_nFlapSequence;
}
}
@@ -826,6 +909,10 @@
res.duplicate(buf,len);
return res;
}
+unsigned long ICQClient::getFullStatus()
+{
+ return fullStatus(m_status);
+}
unsigned long ICQClient::fullStatus(unsigned s)
{
@@ -1042,14 +1129,15 @@
{
QString name = dataName(data);
for (list<Message*>::iterator it = m_acceptMsg.begin(); it != m_acceptMsg.end(); ){
- Message *msg = *it;
+ Message *msg = *it; //will sometimes not work, content: it is broken then: 0xcdcdcdcd, reason seems to be Filetransfer.. however..
+
if (msg->client() && (name == msg->client())){
EventMessageDeleted(msg).process();
delete msg;
m_acceptMsg.erase(it);
it = m_acceptMsg.begin();
}
- ++it;
+ ++it; //Exception: Client-Operator not incrementable, because variable "it" is broken at this position, anyhow
}
if (data->Direct.object()){
delete data->Direct.object();
@@ -2432,29 +2520,29 @@
listRequests.push_back(lr);
processSendQueue();
}
- removeBuddy(contact);
+ //m_snacBuddy->removeBuddy(contact);
break;
}
case EventContact::eChanged: {
if (getState() == Connected){
if (!m_bAIM)
- addBuddy(contact);
+ m_snacBuddy->addBuddy(contact);
if (contact == getContacts()->owner()){
time_t now = time(NULL);
if (getContacts()->owner()->getPhones() != data.owner.PhoneBook.str()){
data.owner.PhoneBook.str() = getContacts()->owner()->getPhones();
data.owner.PluginInfoTime.asULong() = now;
- sendPluginInfoUpdate(PLUGIN_PHONEBOOK);
+ snacService()->sendPluginInfoUpdate(PLUGIN_PHONEBOOK);
}
if (getPicture() != data.owner.Picture.str()){
data.owner.Picture.str() = getPicture();
data.owner.PluginInfoTime.asULong() = now;
- sendPluginInfoUpdate(PLUGIN_PICTURE);
+ snacService()->sendPluginInfoUpdate(PLUGIN_PICTURE);
}
if (getContacts()->owner()->getPhoneStatus() != data.owner.FollowMe.toULong()){
data.owner.FollowMe.asULong() = getContacts()->owner()->getPhoneStatus();
data.owner.PluginStatusTime.asULong() = now;
- sendPluginStatusUpdate(PLUGIN_FOLLOWME, data.owner.FollowMe.toULong());
+ snacService()->sendPluginStatusUpdate(PLUGIN_FOLLOWME, data.owner.FollowMe.toULong());
}
return false;
}
@@ -2506,10 +2594,11 @@
for (it = m_processMsg.begin(); it != m_processMsg.end(); ++it)
if (*it == msg)
break;
- if (it != m_processMsg.end()){
+ if (it != m_processMsg.end())
+ {
m_processMsg.erase(it);
delete msg;
- return msg;
+ return true;
}
if (msg->type() == MessageSMS){
for (list<SendMsg>::iterator it = smsQueue.begin(); it != smsQueue.end(); ++it){
@@ -2565,8 +2654,8 @@
}
break;
}
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdPhones){
if (!m_bAIM)
@@ -2575,6 +2664,8 @@
}
if(cmd->id == CmdFetchAway) {
Contact *contact = getContacts()->contact((unsigned long)(cmd->param));
+ if (contact == NULL)
+ return false;
ClientDataIterator it(contact->clientData, this);
ICQUserData *data;
while ((data = toICQUserData(++it)) != NULL){
@@ -2589,7 +2680,7 @@
}
return false;
}
- if ((cmd->bar_id == ToolBarContainer) || (cmd->bar_id == BarHistory)){
+ if ((cmd->bar_id == ToolBarContainer) || (cmd->bar_id == ToolBarHistory)){
if (cmd->id == CmdChangeEncoding){
Contact *contact = getContacts()->contact((unsigned long)(cmd->param));
if (contact == NULL){
@@ -2746,6 +2837,23 @@
}
break;
}
+ case eEventInterfaceDown:
+ {
+ setState(Error, "Interface down");
+ setStatus(STATUS_OFFLINE, false);
+ m_connectionLost = true;
+ break;
+ }
+ case eEventInterfaceUp:
+ {
+ if(m_connectionLost)
+ {
+ setState(Connecting);
+ setStatus(STATUS_ONLINE, false);
+ m_connectionLost = false;
+ }
+ break;
+ }
case eEventOpenMessage: {
if (getState() != Connected)
return false;
@@ -2849,23 +2957,12 @@
return sendAuthRefused(msg, data);
return false;
case MessageFile:
- if (data && ((data->Status.toULong() & 0xFFFF) != ICQ_STATUS_OFFLINE)){
- if (data->Uin.toULong()){
- DirectClient *dc = dynamic_cast<DirectClient*>(data->Direct.object());
- if (!dc){
- if (data->bNoDirect.toBool())
- return sendThruServer(msg, data);
- dc = new DirectClient(data, this, PLUGIN_NULL);
- data->Direct.setObject(dc);
- dc->connect();
- }
- return dc->sendMessage(msg);
- }
+ if (data && ((data->Status.toULong() & 0xFFFF) != ICQ_STATUS_OFFLINE))
+ {
+ log(L_DEBUG, "send: MessageFile");
if (!hasCap(data, CAP_AIM_SENDFILE))
- return false;
- m_processMsg.push_back(msg);
- AIMFileTransfer *ft = new AIMFileTransfer(static_cast<FileMessage*>(msg), data, this);
- ft->listen();
+ return false;
+ sendThruServer(msg, data);
return true;
}
return false;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqclient.h
^
|
@@ -24,6 +24,9 @@
#include <qdatetime.h>
#include "misc.h"
+#include "snac.h"
+#include "icqbuddy.h"
+#include "icqservice.h"
#include "socket.h"
#include "icq.h"
@@ -155,104 +158,108 @@
const unsigned short SEARCH_DONE = (unsigned short)(-1);
+class AIMFileTransfer;
class DirectClient;
struct ICQUserData : public SIM::clientData
{
- SIM::Data Alias;
- SIM::Data Cellular;
- SIM::Data Status;
- SIM::Data Class;
- SIM::Data StatusTime;
- SIM::Data OnlineTime;
- SIM::Data WarningLevel;
- SIM::Data IP;
- SIM::Data RealIP;
- SIM::Data Port;
- SIM::Data DCcookie;
- SIM::Data Caps;
- SIM::Data Caps2;
- SIM::Data AutoReply;
- SIM::Data Uin;
- SIM::Data Screen;
- SIM::Data IcqID;
- SIM::Data bChecked;
- SIM::Data GrpId;
- SIM::Data IgnoreId;
- SIM::Data VisibleId;
- SIM::Data ContactVisibleId;
- SIM::Data InvisibleId;
- SIM::Data ContactInvisibleId;
- SIM::Data WaitAuth;
- SIM::Data WantAuth;
- SIM::Data WebAware;
- SIM::Data InfoUpdateTime;
- SIM::Data PluginInfoTime;
- SIM::Data PluginStatusTime;
- SIM::Data InfoFetchTime;
- SIM::Data PluginInfoFetchTime;
- SIM::Data PluginStatusFetchTime;
- SIM::Data Mode;
- SIM::Data Version;
- SIM::Data Build;
- SIM::Data Nick;
- SIM::Data FirstName;
- SIM::Data LastName;
- SIM::Data MiddleName;
- SIM::Data Maiden;
- SIM::Data EMail;
- SIM::Data HiddenEMail;
- SIM::Data City;
- SIM::Data State;
- SIM::Data HomePhone;
- SIM::Data HomeFax;
- SIM::Data Address;
- SIM::Data PrivateCellular;
- SIM::Data Zip;
- SIM::Data Country;
- SIM::Data TimeZone;
- SIM::Data Age;
- SIM::Data Gender;
- SIM::Data Homepage;
- SIM::Data BirthYear;
- SIM::Data BirthMonth;
- SIM::Data BirthDay;
- SIM::Data Language;
- SIM::Data EMails;
- SIM::Data WorkCity;
- SIM::Data WorkState;
- SIM::Data WorkPhone;
- SIM::Data WorkFax;
- SIM::Data WorkAddress;
- SIM::Data WorkZip;
- SIM::Data WorkCountry;
- SIM::Data WorkName;
- SIM::Data WorkDepartment;
- SIM::Data WorkPosition;
- SIM::Data Occupation;
- SIM::Data WorkHomepage;
- SIM::Data About;
- SIM::Data Interests;
- SIM::Data Backgrounds;
- SIM::Data Affilations;
- SIM::Data FollowMe;
- SIM::Data SharedFiles;
- SIM::Data ICQPhone;
- SIM::Data Picture;
- SIM::Data PictureWidth;
- SIM::Data PictureHeight;
- SIM::Data PhoneBook;
- SIM::Data ProfileFetch;
- SIM::Data bTyping;
- SIM::Data bBadClient;
- SIM::Data Direct;
- SIM::Data DirectPluginInfo;
- SIM::Data DirectPluginStatus;
- SIM::Data bNoDirect;
- SIM::Data bInvisible;
- SIM::Data buddyRosterID;
- SIM::Data buddyID;
- SIM::Data buddyHash;
+ SIM::Data Alias;
+ SIM::Data Cellular;
+ SIM::Data Status;
+ SIM::Data Class;
+ SIM::Data StatusTime;
+ SIM::Data OnlineTime;
+ SIM::Data WarningLevel;
+ SIM::Data IP;
+ SIM::Data RealIP;
+ SIM::Data Port;
+ SIM::Data DCcookie;
+ SIM::Data Caps;
+ SIM::Data Caps2;
+ SIM::Data AutoReply;
+ SIM::Data Uin;
+ SIM::Data Screen;
+ SIM::Data IcqID;
+ SIM::Data bChecked;
+ SIM::Data GrpId;
+ SIM::Data IgnoreId;
+ SIM::Data VisibleId;
+ SIM::Data ContactVisibleId;
+ SIM::Data InvisibleId;
+ SIM::Data ContactInvisibleId;
+ SIM::Data WaitAuth;
+ SIM::Data WantAuth;
+ SIM::Data WebAware;
+ SIM::Data InfoUpdateTime;
+ SIM::Data PluginInfoTime;
+ SIM::Data PluginStatusTime;
+ SIM::Data InfoFetchTime;
+ SIM::Data PluginInfoFetchTime;
+ SIM::Data PluginStatusFetchTime;
+ SIM::Data Mode;
+ SIM::Data Version;
+ SIM::Data Build;
+ SIM::Data Nick;
+ SIM::Data FirstName;
+ SIM::Data LastName;
+ SIM::Data MiddleName;
+ SIM::Data Maiden;
+ SIM::Data EMail;
+ SIM::Data HiddenEMail;
+ SIM::Data City;
+ SIM::Data State;
+ SIM::Data HomePhone;
+ SIM::Data HomeFax;
+ SIM::Data Address;
+ SIM::Data PrivateCellular;
+ SIM::Data Zip;
+ SIM::Data Country;
+ SIM::Data TimeZone;
+ SIM::Data Age;
+ SIM::Data Gender;
+ SIM::Data Homepage;
+ SIM::Data BirthYear;
+ SIM::Data BirthMonth;
+ SIM::Data BirthDay;
+ SIM::Data Language;
+ SIM::Data EMails;
+ SIM::Data WorkCity;
+ SIM::Data WorkState;
+ SIM::Data WorkPhone;
+ SIM::Data WorkFax;
+ SIM::Data WorkAddress;
+ SIM::Data WorkZip;
+ SIM::Data WorkCountry;
+ SIM::Data WorkName;
+ SIM::Data WorkDepartment;
+ SIM::Data WorkPosition;
+ SIM::Data Occupation;
+ SIM::Data WorkHomepage;
+ SIM::Data About;
+ SIM::Data Interests;
+ SIM::Data Backgrounds;
+ SIM::Data Affilations;
+ SIM::Data FollowMe;
+ SIM::Data SharedFiles;
+ SIM::Data ICQPhone;
+ SIM::Data Picture;
+ SIM::Data PictureWidth;
+ SIM::Data PictureHeight;
+ SIM::Data PhoneBook;
+ SIM::Data ProfileFetch;
+ SIM::Data bTyping;
+ SIM::Data bBadClient;
+ SIM::Data Direct;
+ SIM::Data DirectPluginInfo;
+ SIM::Data DirectPluginStatus;
+ SIM::Data bNoDirect;
+ SIM::Data bInvisible;
+ SIM::Data buddyRosterID;
+ SIM::Data buddyID;
+ SIM::Data buddyHash;
+ SIM::Data unknown2;
+ SIM::Data unknown4;
+ SIM::Data unknown5;
};
struct ICQClientData
@@ -467,12 +474,13 @@
public:
OscarSocket();
virtual ~OscarSocket();
+
+ void snac(unsigned short food, unsigned short type, bool msgId=false, bool bType=true);
protected:
void sendPacket(bool bSend=true);
virtual ICQClientSocket *socket() = 0;
- virtual void packet() = 0;
+ virtual void packet(unsigned long size) = 0;
void flap(char channel);
- void snac(unsigned short food, unsigned short type, bool msgId=false, bool bType=true);
void connect_ready();
void packet_ready();
bool m_bHeader;
@@ -506,6 +514,7 @@
typedef std::map<SIM::my_string, alias_group> CONTACTS_MAP;
typedef std::map<unsigned, unsigned> RATE_MAP;
+typedef std::map<unsigned short, SnacHandler*> mapSnacHandlers;
class ICQClient : public SIM::TCPClient, public OscarSocket
{
@@ -514,6 +523,7 @@
ICQClient(SIM::Protocol*, Buffer *cfg, bool bAIM);
~ICQClient();
virtual QString name();
+ virtual QString getScreen();
virtual QString dataName(void*);
virtual QWidget *setupWnd();
virtual QCString getConfig();
@@ -578,8 +588,6 @@
void removeListRequest(ListRequest *lr);
virtual void setupContact(SIM::Contact*, void *data);
QString clientName(ICQUserData*);
- void sendStatus();
- void sendUpdate();
void changePassword(const QString &new_pswd);
void searchChat(unsigned short);
void randomChatInfo(unsigned long uin);
@@ -608,12 +616,38 @@
static QString addCRLF(const QString &str);
void uploadBuddy(const ICQUserData *data);
ICQUserData * toICQUserData(SIM::clientData*); // More safely type conversion from generic SIM::clientData into ICQUserData
+
+ unsigned long getFullStatus();
+
+ bool addSnacHandler(SnacHandler* handler);
+ void clearSnacHandlers();
+
+ // ICBM:
+ void sendThroughServer(const QString &screen, unsigned short type, ICQBuffer &b, const MessageId &id, bool bOffline, bool bReqAck);
+ void deleteFileMessage(MessageId const& cookie);
+ void icmbSendFile(TlvList& tlv, unsigned long primary_ip, unsigned long secondary_ip, unsigned short port,const QString &screen, MessageId const& id);
+
+ // SSI:
+ void ssiStartTransaction();
+ void ssiEndTransaction();
+ unsigned short ssiAddBuddy(QString& screen, unsigned short group_id, unsigned short buddy_id, unsigned short buddy_type, TlvList* tlvs);
+ unsigned short ssiDeleteBuddy(QString& screen, unsigned short group_id, unsigned short buddy_id, unsigned short buddy_type, TlvList* tlvs);
+ void getGroupIDs(unsigned short group_id, ICQBuffer* buf); // hack
+ unsigned short ssiAddToGroup(QString& groupname, unsigned short buddy_id, unsigned short group_id);
+ unsigned short ssiRemoveFromGroup(QString& groupname, unsigned short buddy_id, unsigned short group_id);
+ TlvList *createListTlv(ICQUserData *data, SIM::Contact *contact);
+
+ // Snac handlers accessors
+ SnacIcqService* snacService() { return m_snacService; }
+ SnacIcqBuddy* snacBuddy() { return m_snacBuddy; }
protected slots:
void ping();
void processSendQueue();
void sendTimeout();
void retry(int n, void*);
protected:
+ void generateCookie(MessageId& id);
+
void sendPacket(bool bSend);
virtual void setInvisible(bool bState);
virtual void setStatus(unsigned status, bool bCommon);
@@ -638,10 +672,8 @@
virtual QString contactName(void *clientData);
QString dataName(const QString &screen);
QByteArray m_cookie;
- virtual void packet();
- void snac_service(unsigned short, unsigned short);
+ virtual void packet(unsigned long size);
void snac_location(unsigned short, unsigned short);
- void snac_buddy(unsigned short, unsigned short);
void snac_icmb(unsigned short, unsigned short);
void snac_bos(unsigned short, unsigned short);
void snac_ping(unsigned short, unsigned short);
@@ -660,20 +692,13 @@
void addCapability(ICQBuffer &cap, cap_id_t id); // helper for sendCapability()
void sendCapability(const QString &msg=QString::null);
void sendICMB(unsigned short channel, unsigned long flags);
- void sendLogonStatus();
- void sendClientReady();
void sendMessageRequest();
- void requestRateInfo();
- void setServiceSocket(Tlv *tlv_addr, Tlv *tlv_cookie, unsigned short service);
void serverRequest(unsigned short cmd, unsigned short seq=0);
void sendServerRequest();
void sendInvisible(bool bState);
void sendContactList();
- void setInvisible();
void setOffline(ICQUserData*);
- void fillDirectInfo(ICQBuffer &directInfo);
void removeFullInfoRequest(unsigned long uin);
- void requestService(ServiceSocket*);
class SSBISocket *getSSBISocket();
unsigned long fullStatus(unsigned status);
QByteArray cryptPassword();
@@ -682,7 +707,6 @@
const char* error_message(unsigned short error);
bool m_bVerifying;
ICQListener *m_listener;
- std::list<ServiceSocket*> m_services;
QTimer *m_processTimer;
QTimer *m_sendTimer;
unsigned short m_sendSmsId;
@@ -702,8 +726,6 @@
std::list<ar_request> arRequests;
void addGroupRequest(SIM::Group *group);
void addContactRequest(SIM::Contact *contact);
- void addBuddy(SIM::Contact *contact);
- void removeBuddy(SIM::Contact *contact);
void checkListRequest();
void checkInfoRequest();
ServerRequest *findServerRequest(unsigned short id);
@@ -714,16 +736,11 @@
unsigned processListRequest();
unsigned processSMSQueue();
unsigned processInfoRequest();
- void sendIdleTime();
- void sendPluginInfoUpdate(unsigned plugin_id);
- void sendPluginStatusUpdate(unsigned plugin_id, unsigned long status);
- bool m_bIdleTime;
static bool hasCap(const ICQUserData *data, cap_id_t fcap);
static void setCap(ICQUserData *data, cap_id_t fcap);
bool isSupportPlugins(ICQUserData *data);
QString trimPhone(const QString &phone);
unsigned short getListId();
- TlvList *createListTlv(ICQUserData *data, SIM::Contact *contact);
unsigned short sendRoster(unsigned short cmd, const QString &name,
unsigned short grp_id, unsigned short usr_id,
unsigned short subCmd=0, TlvList *tlv = NULL);
@@ -742,7 +759,6 @@
void ackMessage(SendMsg &s);
void accept(SIM::Message *msg, const QString &dir, SIM::OverwriteMode overwrite);
void decline(SIM::Message *msg, const QString &reason);
- void sendThroughServer(const QString &screen, unsigned short type, ICQBuffer &b, const MessageId &id, bool bOffline, bool bReqAck);
bool sendAuthRequest(SIM::Message *msg, void *data);
bool sendAuthGranted(SIM::Message *msg, void *data);
bool sendAuthRefused(SIM::Message *msg, void *data);
@@ -779,7 +795,6 @@
INFO_REQ_MAP m_info_req;
unsigned short msgStatus();
unsigned short m_advCounter;
- unsigned m_nUpdates;
bool m_bJoin;
bool m_bFirstTry;
bool m_bHTTP;
@@ -794,6 +809,12 @@
std::list<SIM::Message*> m_processMsg;
std::list<DirectSocket*> m_sockets;
std::list<SIM::Message*> m_acceptMsg;
+ std::list<AIMFileTransfer*> m_filetransfers;
+ SnacIcqBuddy* m_snacBuddy;
+ SnacIcqService* m_snacService;
+ mapSnacHandlers m_snacHandlers;
+ bool m_connectionLost;
+
friend class ListServerRequest;
friend class FullInfoRequest;
friend class SMSRequest;
@@ -805,6 +826,9 @@
friend class ICQFileTransfer;
friend class SetBuddyRequest;
friend class SSBISocket;
+
+ friend class SnacIcqBuddy;
+ friend class SnacIcqService;
};
class ServiceSocket : public SIM::ClientSocketNotify, public OscarSocket
@@ -822,7 +846,7 @@
virtual void connect_ready();
virtual void packet_ready();
virtual ICQClientSocket *socket() { return m_socket; }
- virtual void packet();
+ virtual void packet(unsigned long size);
virtual void data(unsigned short food, unsigned short type, unsigned short seq) = 0;
unsigned short m_id;
QByteArray m_cookie;
@@ -860,6 +884,7 @@
unsigned short remotePort();
unsigned long Uin();
ICQUserData *m_data;
+ void setPort(unsigned short port) {m_port = port;}
protected slots:
void timeout();
protected:
@@ -879,6 +904,7 @@
ICQClientSocket *m_socket;
ICQClient *m_client;
unsigned long m_ip;
+ friend class AIMFileTransfer;
};
struct SendDirectMsg
@@ -977,36 +1003,6 @@
friend class ICQClient;
};
-
-class AIMFileTransfer : public SIM::FileTransfer, public DirectSocket, public SIM::ServerSocketNotify
-{
-public:
- AIMFileTransfer(SIM::FileMessage *msg, ICQUserData *data, ICQClient *client);
- ~AIMFileTransfer();
- void listen();
- void connect(unsigned short port);
- void accept();
-protected:
- enum State
- {
- None,
- Listen,
- Accept
- };
- State m_state;
-
- virtual void processPacket();
- virtual void connect_ready();
- virtual void packet_ready();
- virtual bool error_state(const QString &err, unsigned code);
- virtual void write_ready();
- virtual void startReceive(unsigned pos);
- virtual void bind_ready(unsigned short port);
- virtual bool accept(SIM::Socket *s, unsigned long ip);
- virtual bool error(const QString &err);
-
- friend class ICQClient;
-};
#endif
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqdirect.cpp
^
|
@@ -18,8 +18,11 @@
#include "icqclient.h"
#include "icqmessage.h"
+#include "icqdirect.h"
-#include "core.h"
+#include "core_events.h"
+
+#include "sockfactory.h"
#ifdef WIN32
#include <winsock.h>
@@ -53,7 +56,7 @@
const char FT_SPEED = 5;
const char FT_DATA = 6;
-const unsigned DIRECT_TIMEOUT = 20;
+const unsigned DIRECT_TIMEOUT = 10;
ICQListener::ICQListener(ICQClient *client)
{
@@ -192,6 +195,7 @@
void DirectSocket::connect()
{
+ log(L_DEBUG, "DirectSocket::connect()");
m_socket->writeBuffer().init(0);
m_socket->readBuffer().init(2);
m_socket->readBuffer().packetStart();
@@ -265,6 +269,7 @@
void DirectSocket::packet_ready()
{
+ log(L_DEBUG, "DirectSocket::packet_ready()");
if (m_bHeader){
unsigned short size;
m_socket->readBuffer().unpack(size);
@@ -374,6 +379,7 @@
void DirectSocket::sendInit()
{
+ log(L_DEBUG, "DirectSocket::sendInit()");
if (!m_bIncoming && (m_state != ReverseConnect)){
if (m_data->DCcookie.toULong() == 0){
m_socket->error_state("No direct info");
@@ -407,6 +413,7 @@
void DirectSocket::sendInitAck()
{
+ log(L_DEBUG, "DirectSocket::sendInitAck()");
m_socket->writeBuffer().packetStart();
m_socket->writeBuffer().pack((unsigned short)0x0004);
m_socket->writeBuffer().pack((unsigned short)0x0001);
@@ -418,6 +425,7 @@
void DirectSocket::connect_ready()
{
+ log(L_DEBUG, "DirectSocket::connect_ready()");
QTimer::singleShot(DIRECT_TIMEOUT * 1000, this, SLOT(timeout()));
if (m_bIncoming){
if (m_state == ReverseConnect)
@@ -498,6 +506,7 @@
void DirectClient::processPacket()
{
+ log(L_DEBUG, "DirectSocket::processPacket()");
switch (m_state){
case None:
m_socket->error_state("Bad state process packet");
@@ -756,7 +765,7 @@
delete m;
}
}else{
- plugin p;
+ plugin p; //Fixme: Local declaration of 'p' hides declaration of the same name in outer scope, see previous declaration at line '609'
m_socket->readBuffer().unpack((char*)p, sizeof(p));
unsigned plugin_index;
for (plugin_index = 0; plugin_index < PLUGIN_NULL; plugin_index++){
@@ -764,7 +773,7 @@
break;
}
ICQBuffer info;
- unsigned short type = 1;
+ unsigned short type = 1; //Fixme: Local declaration of 'type' hides declaration of the same name in outer scope, see previous declaration at line '665'
switch (plugin_index){
case PLUGIN_FILESERVER:
case PLUGIN_FOLLOWME:
@@ -830,7 +839,7 @@
}
MessageId id;
id.id_l = seq;
- Message *m = m_client->parseMessage(type, m_client->screen(m_data), msg_str, m_socket->readBuffer(), id, 0);
+ Message *m = m_client->parseMessage(type, m_client->screen(m_data), msg_str, m_socket->readBuffer(), id, 0); //Fixme: Local declaration of 'm' hides declaration of the same name in outer scope, see previous declaration at line '671'
switch (msg->type()){
#ifdef ENABLE_OPENSSL
case MessageCloseSecure:
@@ -878,7 +887,7 @@
if (m_client->ackMessage(msg, ackFlags, msg_str)){
if ((msg->getFlags() & MESSAGE_NOHISTORY) == 0){
if (msg->type() == MessageGeneric){
- Message m;
+ Message m; //Fixme: Local declaration of 'm' hides declaration of the same name in outer scope, see previous declaration at line '842'
m.setContact(msg->contact());
m.setClient(msg->client());
if ((*it).type == CAP_RTF){
@@ -905,7 +914,7 @@
break;
}
if (!itDeleted && (m_queue.size() == 0 || it == m_queue.end())){
- list<Message*>::iterator it;
+ list<Message*>::iterator it; //Fixme: Local declaration of 'it' hides declaration of the same name in outer scope, see previous declaration at line '805'
for (it = m_client->m_acceptMsg.begin(); it != m_client->m_acceptMsg.end(); ++it){
QString name = m_client->dataName(m_data);
Message *msg = *it;
@@ -947,6 +956,7 @@
void DirectClient::connect_ready()
{
+ log(L_DEBUG, "DirectSocket::connect_ready()");
if (m_state == None){
m_state = WaitLogin;
DirectSocket::connect_ready();
@@ -1009,6 +1019,7 @@
void DirectClient::sendInit2()
{
+ log(L_DEBUG, "DirectSocket::sendInit2()");
m_socket->writeBuffer().packetStart();
m_socket->writeBuffer().pack((unsigned short)0x0021);
m_socket->writeBuffer().pack((char) 0x03);
@@ -1031,6 +1042,7 @@
bool DirectClient::error_state(const QString &_err, unsigned code)
{
+ //Fixme: Dereferencing NULL pointer 'm_data': Lines: 1045, 1046, 1048, 1058, 1059, 1060, 1061, 1062, 1069
QString err = _err;
if (!err.isEmpty() && !DirectSocket::error_state(err, code))
return false;
@@ -1065,6 +1077,7 @@
void DirectClient::sendAck(unsigned short seq, unsigned short type, unsigned short flags,
const char *msg, unsigned short status, Message *m)
{
+ log(L_DEBUG, "DirectSocket::sendAck()");
bool bAccept = true;
if (status == ICQ_TCPxACK_ACCEPT){
switch (m_client->getStatus()){
@@ -1166,6 +1179,7 @@
void DirectClient::startPacket(unsigned short cmd, unsigned short seq)
{
+ log(L_DEBUG, "DirectSocket::startPacket()");
m_socket->writeBuffer().packetStart();
m_socket->writeBuffer()
<< (unsigned short)0; // size
@@ -1188,6 +1202,7 @@
void DirectClient::sendPacket()
{
+ log(L_DEBUG, "DirectSocket::sendPacket()");
unsigned size = m_socket->writeBuffer().size() - m_socket->writeBuffer().packetStartPos() - 2;
unsigned char *p = (unsigned char*)(m_socket->writeBuffer().data(m_socket->writeBuffer().packetStartPos()));
p[0] = (unsigned char)(size & 0xFF);
@@ -1235,6 +1250,7 @@
void DirectClient::acceptMessage(Message *msg)
{
+ log(L_DEBUG, "DirectSocket::acceptMessage()");
unsigned short seq = 0;
switch (msg->type()){
case MessageICQFile:
@@ -1536,6 +1552,7 @@
void ICQFileTransfer::connect(unsigned short port)
{
+ log(L_DEBUG, "ICQFileTransfer::connect()");
m_port = port;
FileTransfer::m_state = FileTransfer::Connect;
if (m_notify)
@@ -1553,6 +1570,7 @@
void ICQFileTransfer::processPacket()
{
+ log(L_DEBUG, "ICQFileTransfer::processPacket()");
char cmd;
m_socket->readBuffer() >> cmd;
if (cmd != FT_DATA){
@@ -1776,6 +1794,7 @@
void ICQFileTransfer::connect_ready()
{
+ log(L_DEBUG, "ICQFileTransfer::connect_ready()");
if (m_state == None){
m_state = WaitLogin;
DirectSocket::connect_ready();
@@ -1934,7 +1953,11 @@
s2 = getContacts()->fromUnicode(m_client->getContact(m_data), dir);
string ssc1 = s1.data();
string ssc2 = s2.data();
+#ifdef __OS2__ // to make it compileable under OS/2 (gcc 3.3.5)
+ m_socket->writeBuffer() << ssc1.c_str() << ssc2.c_str();
+#else
m_socket->writeBuffer() << ssc1 << ssc2;
+#endif
m_socket->writeBuffer().pack((unsigned long)m_fileSize);
m_socket->writeBuffer().pack((unsigned long)0);
m_socket->writeBuffer().pack((unsigned long)m_speed);
@@ -1982,58 +2005,370 @@
m_notify->transfer(true);
}
+
AIMFileTransfer::AIMFileTransfer(FileMessage *msg, ICQUserData *data, ICQClient *client)
- : FileTransfer(msg), DirectSocket(data, client)
+ : FileTransfer(msg)
{
m_msg = msg;
m_client = client;
- m_state = None;
+ m_data = data;
+ m_ip = 0;
+ m_proxy = false;
+ m_proxyActive = true;
+ m_packetLength = 1000;
+ m_socket = new ICQClientSocket(this);
+ client->m_filetransfers.push_back(this);
+ log(L_DEBUG, "AIMFileTransfer::AIMFileTransfer: %p", this);
}
AIMFileTransfer::~AIMFileTransfer()
{
+ if(m_client)
+ {
+ for(std::list<AIMFileTransfer*>::iterator it = m_client->m_filetransfers.begin(); it != m_client->m_filetransfers.end(); ++it)
+ {
+ if((*it) == this) // FIXME make comparison by cookie
+ {
+ m_client->m_filetransfers.erase(it);
+ break;
+ }
+ }
+ }
+ delete m_socket;
+ log(L_DEBUG, "AIMFileTransfer::~AIMFileTransfer");
}
-void AIMFileTransfer::listen()
+void AIMFileTransfer::requestFT()
{
- m_state = Listen;
- bind(m_client->getMinPort(), m_client->getMaxPort(), m_client);
+ log(L_DEBUG, "AIMFileTransfer::requestFT m_stage = %d", m_stage);
+ log(L_DEBUG, "Description: %s", m_msg->getDescription().ascii());
+ log(L_DEBUG, "filename: %s", filename().ascii());
+ ICQBuffer b;
+ bool bWide = false;
+ for(int i = 0; i < (int)(filename().length()); i++)
+ {
+ if (filename()[i].unicode() > 0x7F)
+ {
+ bWide = true;
+ break;
+ }
+ }
+ QString charset = bWide ? "utf-8" : "us-ascii";
+
+ unsigned short this_port = (unsigned short)(m_proxy ? m_cookie2 : m_port);
+
+ b << (unsigned short)0;
+ b << m_cookie.id_l << m_cookie.id_h;
+ b.pack((char*)m_client->capabilities[CAP_AIM_SENDFILE], sizeof(capability));
+ b.tlv(0x0A, (unsigned short)m_stage);
+ b.tlv(0x0F);
+ b.tlv(0x03, (unsigned long)htonl(get_ip(m_client->data.owner.RealIP)));
+ b.tlv(0x04, (unsigned long)htonl(get_ip(m_client->data.owner.IP)));
+ b.tlv(0x05, this_port);
+
+ this_port = ~(htons(m_port));
+ b.tlv(0x17, this_port);
+
+ unsigned long this_ip = m_ip;
+ if(m_ip == 0)
+ this_ip = htonl(get_ip(m_client->data.owner.RealIP));
+
+ b.tlv(0x02, this_ip);
+ this_ip = ~this_ip;
+ b.tlv(0x16, this_ip);
+
+ if(m_proxy)
+ {
+ b.tlv(0x10);
+ }
+ ICQBuffer buf;
+ if(m_stage == 1)
+ {
+ if(files() == 1)
+ {
+ buf << ((unsigned short)0x0001) << ((unsigned short)0x0001);
+ }
+ else
+ {
+ buf << ((unsigned short)0x0002) << ((unsigned short)files());
+ }
+ buf << ((unsigned long)totalSize());
+
+ if(!m_proxy && (files() == 1))
+ {
+ if(bWide)
+ {
+ QCString decodedfname = filename().utf8();
+ buf.pack(decodedfname.data(), decodedfname.length() + 1);
+ }
+ else
+ {
+ buf.pack(filename().data(), filename().length() + 1);
+ }
+ }
+ else
+ {
+ buf.pack((unsigned char)0);
+ }
+ }
+ b.tlv(0x2711, buf);
+ if(m_stage == 1)
+ {
+ b.tlv(0x2712, charset.ascii(), charset.length());
+ }
+ m_client->sendThroughServer(m_client->screen(m_data), 2, b, m_cookie, false, true);
}
void AIMFileTransfer::accept()
{
- m_state = Accept;
- bind(m_client->getMinPort(), m_client->getMaxPort(), m_client);
}
-void AIMFileTransfer::connect(unsigned short port)
+unsigned short AIMFileTransfer::remotePort()
{
- m_port = port;
- FileTransfer::m_state = FileTransfer::Connect;
- if (m_notify)
- m_notify->process();
- DirectSocket::connect();
+ return m_port;
}
void AIMFileTransfer::processPacket()
{
+ log(L_DEBUG, "AIMFileTransfer::processPacket");
}
-void AIMFileTransfer::packet_ready()
+void AIMFileTransfer::setICBMCookie(MessageId const& cookie)
{
- if (m_socket->readBuffer().readPos() <= m_socket->readBuffer().writePos())
- return;
- ICQPlugin *plugin = static_cast<ICQPlugin*>(m_client->protocol()->plugin());
- EventLog::log_packet(m_socket->readBuffer(), false, plugin->AIMDirectPacket, m_client->screen(m_data));
- m_socket->readBuffer().init(0);
+ m_cookie = cookie;
+}
+
+void AIMFileTransfer::setICBMCookie2(unsigned short cookie2)
+{
+ m_cookie2 = cookie2;
+}
+
+bool AIMFileTransfer::readOFT(OftData* oft)
+{
+ log(L_DEBUG, "reading OFT");
+ m_socket->readBuffer().unpack(oft->magic);
+
+ if(oft->magic != OFT_magic)
+ {
+ log(L_DEBUG, "Invalid magic for OFT in stream %08x", oft->magic);
+ return false;
+ }
+
+ m_socket->readBuffer().unpack(oft->unknown);
+ m_socket->readBuffer().unpack(oft->type);
+ m_socket->readBuffer().unpack(oft->cookie, 8);
+ m_socket->readBuffer().unpack(oft->encrypt);
+ m_socket->readBuffer().unpack(oft->compress);
+
+ m_socket->readBuffer().unpack(oft->total_files);
+ oft->total_files = ntohs(oft->total_files);
+ m_socket->readBuffer().unpack(oft->files_left);
+ oft->files_left = ntohs(oft->files_left);
+ m_socket->readBuffer().unpack(oft->total_parts);
+ oft->total_parts = ntohs(oft->total_parts);
+ m_socket->readBuffer().unpack(oft->parts_left);
+ oft->parts_left = ntohs(oft->parts_left);
+ m_socket->readBuffer().unpack(oft->total_size);
+ oft->total_size = ntohl(oft->total_size);
+ m_socket->readBuffer().unpack(oft->size);
+ oft->size = ntohl(oft->size);
+
+ m_socket->readBuffer().unpack(oft->mod_time);
+ m_socket->readBuffer().unpack(oft->checksum);
+ m_socket->readBuffer().unpack(oft->rfrcsum);
+ m_socket->readBuffer().unpack(oft->rfsize);
+ m_socket->readBuffer().unpack(oft->cretime);
+ m_socket->readBuffer().unpack(oft->rfcsum);
+ m_socket->readBuffer().unpack(oft->nrecvd);
+ m_socket->readBuffer().unpack(oft->recvcsum);
+ m_socket->readBuffer().unpack(oft->idstring, 32);
+ m_socket->readBuffer().unpack(oft->flags);
+ m_socket->readBuffer().unpack(oft->lnameoffset);
+ m_socket->readBuffer().unpack(oft->lsizeoffset);
+ m_socket->readBuffer().unpack(oft->dummy, 69);
+ m_socket->readBuffer().unpack(oft->macfileinfo, 16);
+ m_socket->readBuffer().unpack(oft->nencode);
+ m_socket->readBuffer().unpack(oft->nlanguage);
+
+ m_socket->readBuffer().unpack(oft->name, m_socket->readBuffer().size() - m_socket->readBuffer().readPos());
+
+ if(oft->nencode == 0x0200) // Hack
+ {
+ for(unsigned int i = 0; i < oft->name.size() ; i++)
+ {
+ unsigned char tmp = oft->name.data()[i + 1];
+ oft->name.data()[i + 1] = oft->name.data()[i];
+ oft->name.data()[i] = tmp;
+ }
+ }
+ oft->name.detach();
+ return true;
+}
+
+bool AIMFileTransfer::writeOFT(OftData* oft)
+{
+ log(L_DEBUG, "writing OFT");
+ m_socket->writeBuffer().pack(oft->magic);
+ m_socket->writeBuffer().pack(oft->unknown);
+ m_socket->writeBuffer().pack(oft->type);
+ m_socket->writeBuffer().pack(oft->cookie, 8);
+ m_socket->writeBuffer().pack(oft->encrypt);
+ m_socket->writeBuffer().pack(oft->compress);
+ m_socket->writeBuffer().pack((unsigned short)htons(oft->total_files));
+ m_socket->writeBuffer().pack((unsigned short)htons(oft->files_left));
+ m_socket->writeBuffer().pack((unsigned short)htons(oft->total_parts));
+ m_socket->writeBuffer().pack((unsigned short)htons(oft->parts_left));
+ m_socket->writeBuffer().pack((unsigned long)htonl(oft->total_size));
+ m_socket->writeBuffer().pack((unsigned long)htonl(oft->size));
+ m_socket->writeBuffer().pack(oft->mod_time);
+ m_socket->writeBuffer().pack(oft->checksum);
+ m_socket->writeBuffer().pack(oft->rfrcsum);
+ m_socket->writeBuffer().pack(oft->rfsize);
+ m_socket->writeBuffer().pack(oft->cretime);
+ m_socket->writeBuffer().pack(oft->rfcsum);
+ m_socket->writeBuffer().pack(oft->nrecvd);
+ m_socket->writeBuffer().pack(oft->recvcsum);
+ m_socket->writeBuffer().pack(oft->idstring, 32);
+ m_socket->writeBuffer().pack(oft->flags);
+ m_socket->writeBuffer().pack(oft->lnameoffset);
+ m_socket->writeBuffer().pack(oft->lsizeoffset);
+ m_socket->writeBuffer().pack(oft->dummy, 69);
+ m_socket->writeBuffer().pack(oft->macfileinfo, 16);
+ m_socket->writeBuffer().pack(oft->nencode);
+ m_socket->writeBuffer().pack(oft->nlanguage);
+ m_socket->writeBuffer().pack(oft->name.data(), oft->name.size() - 1);
+ if(oft->name.size() - 1 <= 0x40)
+ {
+ for(unsigned int i = 0; i < 0x40 - oft->name.size() + 1; i++)
+ {
+ m_socket->writeBuffer().pack((unsigned char)0);
+ }
+ }
+ else
+ {
+ m_socket->writeBuffer().pack((unsigned char)0);
+ }
+ return true;
+}
+
+unsigned long AIMFileTransfer::calculateChecksum()
+{
+ if(!m_file)
+ {
+ log(L_WARN, "No file for checksum calculation");
+ return 0;
+ }
+ unsigned long checksum = 0xFFFF;
+
+ QByteArray chunk(1024);
+ Q_ULONG bytesread = 0;
+ long streamposition = 0;
+ m_file->reset();
+ do
+ {
+ bytesread = m_file->readBlock(chunk.data(), chunk.size());
+ checksum = checksumChunk(&chunk, (unsigned int)bytesread, checksum);
+ streamposition += bytesread;
+
+ }
+ while (bytesread == chunk.size());
+
+ checksum = ((checksum & 0x0000ffff) + (checksum >> 16));
+ checksum = ((checksum & 0x0000ffff) + (checksum >> 16));
+
+ log(L_WARN, "Calculating checksum: %s (%08x)", m_file->name().utf8().data(), checksum);
+ return checksum;
}
-void AIMFileTransfer::connect_ready()
+unsigned long AIMFileTransfer::checksumChunk(QByteArray* filechunk, unsigned int chunklength, unsigned int start)
{
- log(L_DEBUG, "Connect ready");
+ uint32_t checksum = start, prevchecksum;
+ bool high = false;
+ for (unsigned long i = 0; i < filechunk->size() && i < chunklength; i++)
+ {
+ prevchecksum = checksum;
+
+ if(high)
+ {
+ checksum -= (((uint32_t)(filechunk->at(i)) & 0xff) << 8);
+ }
+ else
+ {
+ checksum -= ((uint32_t)(filechunk->at(i)) & 0xff);
+ }
+ high = !high;
+
+ if(checksum > prevchecksum)
+ checksum--;
+ }
+
+ return checksum;
+}
+
+void AIMFileTransfer::connectThroughProxy(const QString& host, uint16_t port, uint16_t cookie2)
+{
+ log(L_DEBUG, "Proxy connection, host = %s, port = %d", host.data(), port);
+ m_proxy = true;
+ m_port = port;
+ m_cookie2 = cookie2;
+
+ FileTransfer::m_state = FileTransfer::Connect;
+ if (m_notify)
+ m_notify->process();
+
+ m_socket->connect(host, port, NULL);
+ m_socket->writeBuffer().init(0);
m_socket->readBuffer().init(0);
m_socket->readBuffer().packetStart();
- m_socket->setRaw(true);
+ m_socket->setRaw(true);
+
+}
+
+void AIMFileTransfer::negotiateWithProxy()
+{
+ if(m_proxyActive) // We initiated proxy transfer
+ {
+ unsigned char uin_length = m_client->getScreen().length();
+ unsigned short packet_length = 0x26 + 1 + uin_length;
+ m_socket->writeBuffer() << packet_length;
+ m_socket->writeBuffer() << Chunk_status;
+ // Status chunk is made of 6 bytes, first 2 are actually status and other 4 are zeroes
+ m_socket->writeBuffer() << (unsigned short)0x0002 << (unsigned long) 0x00000000; // 0x0002 means FT request to send
+ // Then, UIN chunk goes. First byte is length.
+ m_socket->writeBuffer() << Chunk_uin << uin_length;
+ m_socket->writeBuffer().pack(m_client->getScreen().ascii(), uin_length);
+ // Next chunk is cookie chunk
+ m_socket->writeBuffer() << m_cookie.id_l << m_cookie.id_h;
+ // And the last one is magic caps chunk
+ m_socket->writeBuffer() << Chunk_cap << (unsigned short)0x0010;
+ m_socket->writeBuffer().pack(m_client->capabilities[CAP_AIM_SENDFILE], 0x10);
+ //EventLog::log_packet(m_socket->writeBuffer(), true, ICQPlugin::icq_plugin->AIMDirectPacket); //commented out due to problems with netmon while transfer
+ m_socket->write();
+ }
+ else // Remote host initiated proxy transfer
+ {
+ unsigned char uin_length = m_client->getScreen().length();
+ unsigned short packet_length = 0x28 + 1 + uin_length;
+ m_socket->writeBuffer() << packet_length;
+ m_socket->writeBuffer() << Chunk_status;
+ // Status chunk is made of 6 bytes, first 2 are actually status and other 4 are zeroes
+ m_socket->writeBuffer() << (unsigned short)0x0004 << (unsigned long) 0x00000000; // 0x0004 means FT request to receive
+ // Then, UIN chunk goes. First byte is length.
+ m_socket->writeBuffer() << Chunk_uin << uin_length;
+ m_socket->writeBuffer().pack(m_client->getScreen().ascii(), uin_length);
+ // Next chunk is cookie chunk
+ m_socket->writeBuffer() << (unsigned short)m_cookie2 << m_cookie.id_l << m_cookie.id_h;
+ // And the last one is magic caps chunk
+ m_socket->writeBuffer() << Chunk_cap << (unsigned short)0x0010;
+ m_socket->writeBuffer().pack(m_client->capabilities[CAP_AIM_SENDFILE], 0x10);
+ //EventLog::log_packet(m_socket->writeBuffer(), true, ICQPlugin::icq_plugin->AIMDirectPacket); //commented out due to problems with netmon while transfer
+ m_socket->write();
+ }
+}
+
+void AIMFileTransfer::resolve_ready(unsigned long ip)
+{
+ m_ip = ip;
}
bool AIMFileTransfer::error_state(const QString &err, unsigned)
@@ -2043,16 +2378,15 @@
return true;
}
-void AIMFileTransfer::write_ready()
-{
-}
void AIMFileTransfer::startReceive(unsigned)
{
+ log(L_DEBUG, "AIMFileTransfer::startReceive");
}
void AIMFileTransfer::bind_ready(unsigned short port)
{
+ log(L_DEBUG, "AIMFileTransfer::bind_ready(%d)", port);
for (list<Message*>::iterator it = m_client->m_processMsg.begin(); it != m_client->m_processMsg.end(); ++it){
if ((*it) == m_msg){
m_client->m_processMsg.erase(it);
@@ -2060,31 +2394,678 @@
}
}
m_port = port;
- SendMsg s;
- s.flags = (m_state == Listen) ? PLUGIN_AIM_FT : PLUGIN_AIM_FT_ACK;
- s.socket = this;
- s.screen = m_client->screen(m_data);
- s.msg = m_msg;
- m_client->sendFgQueue.push_front(s);
- m_client->processSendQueue();
}
-bool AIMFileTransfer::accept(Socket *s, unsigned long)
+bool AIMFileTransfer::error(const QString &err)
+{
+ error_state(err, 0);
+ return true;
+}
+
+void AIMFileTransfer::connect(unsigned long ip, unsigned short port)
+{
+ log(L_DEBUG, "AIMFileTransfer::connect");
+
+ m_socket->connect(ip, port, NULL);
+ m_socket->writeBuffer().init(0);
+ m_socket->readBuffer().init(0);
+ m_socket->readBuffer().packetStart();
+ m_socket->setRaw(true);
+}
+
+
+AIMIncomingFileTransfer::AIMIncomingFileTransfer(SIM::FileMessage *msg, ICQUserData *data, ICQClient *client) : AIMFileTransfer(msg, data, client), QObject(), m_connectTimer(this)
+{
+ QObject::connect(&m_connectTimer, SIGNAL(timeout()), this, SLOT(connect_timeout()));
+ m_totalBytes = 0;
+}
+
+AIMIncomingFileTransfer::~AIMIncomingFileTransfer()
+{
+ //m_client->deleteFileMessage(m_cookie);
+}
+
+bool AIMIncomingFileTransfer::error_state(const QString &err, unsigned code)
+{
+ log(L_DEBUG, "AIMFileTransfer::error_state: %s, %d", err.utf8().data(), code);
+ if(m_stage == 1)
+ {
+ // Well, this is hack, but, i think, it is not so ugly as it seems :)
+ connect_timeout();
+ return false;
+ }
+ return true;
+}
+
+bool AIMIncomingFileTransfer::accept(SIM::Socket* /*s*/, unsigned long /*ip*/)
+{
+ // TODO
+ return false;
+}
+
+void AIMIncomingFileTransfer::accept()
+{
+ log(L_DEBUG, "AIMIncomingFileTransfer::accept");
+ m_state = Connecting;
+ m_connectTimer.start(DIRECT_TIMEOUT * 1000, true);
+ FileTransfer::m_state = FileTransfer::Connect;
+ if(m_notify)
+ m_notify->process();
+
+ unsigned long ip = get_ip(m_data->RealIP);
+ if(!ip)
+ {
+ ip = get_ip(m_data->IP);
+ }
+ m_socket->connect(ip, m_port, NULL);
+}
+
+void AIMIncomingFileTransfer::connect_timeout()
+{
+ if(m_state == Connecting)
+ {
+ log(L_DEBUG, "Connecting timeout, trying reverse connection");
+ FileMessage* msg = static_cast<FileMessage*>(m_msg);
+ QString filename = msg->getDescription();
+ m_stage++;
+ requestFT();
+ m_state = ProxyConnection;
+ /*
+ m_proxy = true;
+ setProxyActive(true);
+ connectThroughProxy(AOL_PROXY_HOST, AOL_PROXY_PORT, 0);
+ */
+ // TODO Here we should really open the socket and wait for incoming connection,
+ // but we'll cheat for now - skip this step and wait for request for proxy transfer
+ }
+}
+
+void AIMIncomingFileTransfer::connect_ready()
+{
+ log(L_DEBUG, "AIMIncomingFileTransfer::connect_ready()");
+ m_connectTimer.stop();
+ m_socket->writeBuffer().init(0);
+ m_socket->readBuffer().init(0);
+ m_socket->writeBuffer().packetStart();
+ m_socket->readBuffer().packetStart();
+
+ if(!m_proxy)
+ {
+ m_state = OFTNegotiation;
+
+ ICQBuffer buf;
+ buf << 0x0002 << m_cookie.id_l << m_cookie.id_h;
+ buf.pack(m_client->capabilities[CAP_AIM_SENDFILE], 0x10);
+ m_client->sendThroughServer(m_client->screen(m_data), 0x0002, buf, m_cookie, false, true);
+
+ FileTransfer::m_state = FileTransfer::Negotiation;
+ if(m_notify)
+ m_notify->process();
+ }
+ else
+ {
+ m_state = ProxyNegotiation;
+ negotiateWithProxy();
+ }
+ m_socket->setRaw(true);
+}
+void AIMIncomingFileTransfer::packet_ready()
+{
+ //ICQPlugin *plugin = static_cast<ICQPlugin*>(m_client->protocol()->plugin()); //commented out due to problems with netmon while transfer
+ //EventLog::log_packet(m_socket->readBuffer(), false, plugin->AIMDirectPacket); //commented out due to problems with netmon while transfer
+ long size = (unsigned long)(m_socket->readBuffer().size() - m_socket->readBuffer().readPos());
+ if(size <= 0)
+ {
+ log(L_DEBUG, "size <= 0");
+ return;
+ }
+ switch(m_state)
+ {
+ case ProxyNegotiation:
+ {
+ unsigned short packet_length, chunk_id, status;
+ m_socket->readBuffer() >> packet_length;
+ m_socket->readBuffer() >> chunk_id;
+ log(L_DEBUG, "[Input]Proxy packet, length = %d, chunk_id = %04x",packet_length, chunk_id);
+ if(chunk_id == Chunk_status)
+ {
+ m_socket->readBuffer() >> status;
+ log(L_DEBUG, "status = %04x", status);
+ // TODO Handle errors
+ if(status == 0x0003)
+ {
+ m_socket->readBuffer().incReadPos(6);
+ m_socket->readBuffer() >> m_cookie2;
+ m_socket->readBuffer() >> m_ip;
+ FileMessage* msg = static_cast<FileMessage*>(m_msg);
+ QString filename = msg->getDescription();
+ m_stage++;
+ requestFT();
+ }
+ if(status == 0x0005) // Everything is allright
+ {
+ log(L_DEBUG, "Connection accepted");
+ // Read the rest of a packet:
+ m_socket->readBuffer().incReadPos(packet_length - 4);
+ ICQBuffer buf;
+ buf << (unsigned short) 0x0002 << m_cookie.id_l << m_cookie.id_h;
+ buf.pack(m_client->capabilities[CAP_AIM_SENDFILE], 0x10);
+
+ m_client->sendThroughServer(m_client->screen(m_data), 0x0002, buf, m_cookie, false, true);
+ FileTransfer::m_state = FileTransfer::Negotiation;
+ if(m_notify)
+ m_notify->process();
+ m_state = OFTNegotiation;
+ }
+ }
+ return;
+ }
+ break;
+ case OFTNegotiation:
+ if(readOFT(&m_oft))
+ {
+ if(m_oft.type == OFT_fileInfo)
+ ackOFT();
+ FileTransfer::m_state = FileTransfer::Read;
+ if(m_notify)
+ {
+ m_notify->transfer(true);
+ m_notify->process();
+ }
+ m_state = Reading;
+ }
+ break;
+
+ case Reading:
+ {
+ if(m_bytes < m_fileSize)
+ {
+ long recvd_size = (unsigned long)(m_socket->readBuffer().size() - m_socket->readBuffer().readPos());
+ if(size < 0)
+ {
+ return;
+ }
+ receiveNextBlock(recvd_size);
+ }
+ if(m_bytes >= m_fileSize)
+ {
+ /// TODO Calculate and verify checksum
+ m_oft.type = OFT_success;
+ writeOFT(&m_oft);
+ //EventLog::log_packet(m_socket->writeBuffer(), true, ICQPlugin::icq_plugin->AIMDirectPacket); //commented out due to problems with netmon while transfer
+ m_socket->write();
+
+ if(m_totalBytes >= m_totalSize)
+ {
+ if(m_notify)
+ m_notify->transfer(false);
+ ICQBuffer buf;
+ buf << (unsigned short) 0x0002 << m_cookie.id_l << m_cookie.id_h;
+ buf.pack(m_client->capabilities[CAP_AIM_SENDFILE], 0x10);
+ if(m_file)
+ m_file->flush();
+
+ m_client->sendThroughServer(m_client->screen(m_data), 0x0002, buf, m_cookie, false, true);
+ m_state = Done;
+ }
+ else
+ {
+ m_state = OFTNegotiation;
+ }
+ return;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+void AIMIncomingFileTransfer::startReceive(unsigned /*pos*/)
+{
+ m_oft.type = OFT_answer;
+ *((unsigned long*)&m_oft.cookie[0]) = htonl(m_cookie.id_l);
+ *((unsigned long*)&m_oft.cookie[4]) = htonl(m_cookie.id_h);
+ writeOFT(&m_oft);
+ //EventLog::log_packet(m_socket->writeBuffer(), true, ICQPlugin::icq_plugin->AIMDirectPacket); //commented out due to problems with netmon while transfer
+ m_socket->write();
+ m_nFile = m_oft.total_files - m_oft.files_left + 1;
+ m_nFiles = m_oft.total_files;
+ m_fileSize = m_oft.size;
+ m_totalSize = m_oft.total_size;
+}
+
+void AIMIncomingFileTransfer::ackOFT()
+{
+ log(L_DEBUG, "Sending file ack");
+ if(m_notify)
+ {
+ m_notify->transfer(false);
+ if(m_oft.nencode == 0x0200) // this is ucs2
+ {
+ m_notify->createFile(QString::fromUcs2((unsigned short*)m_oft.name.data()), m_fileSize, true);
+ }
+ else
+ {
+ m_notify->createFile(QString(m_oft.name), m_fileSize, true);
+ }
+ }
+}
+
+void AIMIncomingFileTransfer::receiveNextBlock(long size)
+{
+ m_totalBytes += size;
+ m_bytes += size;
+ m_transferBytes += size;
+ if(size)
+ {
+ if(!m_file)
+ {
+ log(L_DEBUG, "Write without file");
+ return;
+ }
+ long hret = m_file->writeBlock(m_socket->readBuffer().data(m_socket->readBuffer().readPos()), size);
+ if(hret != size)
+ {
+ log(L_DEBUG, "Error while writing to file: %d", hret);
+ m_socket->error_state("Error write file");
+ return;
+ }
+ }
+ if (m_notify)
+ m_notify->process();
+ m_socket->readBuffer().incReadPos(size);
+}
+
+void AIMIncomingFileTransfer::write_ready()
+{
+ log(L_DEBUG, "AIMIncomingFileTransfer::write_ready()");
+ if(m_state == Done)
+ {
+ FileTransfer::m_state = FileTransfer::Done;
+ //m_client->deleteFileMessage(m_cookie);
+ if(m_notify)
+ m_notify->process();
+ // I'm not sure who is responsible for connection closing in this case.
+ // If sender is icq6, it closes this socket itself. Pidgin, however, does not.
+ m_socket->close();
+ }
+}
+
+void AIMIncomingFileTransfer::connectThroughProxy(const QString& host, uint16_t port, uint16_t cookie2)
+{
+ m_state = ProxyConnection;
+ AIMFileTransfer::connectThroughProxy(host, port, cookie2);
+}
+
+AIMFileTransfer::tTransferDirection AIMIncomingFileTransfer::getDirection()
+{
+ return tdInput;
+}
+
+
+AIMOutcomingFileTransfer::AIMOutcomingFileTransfer(SIM::FileMessage *msg, ICQUserData *data, ICQClient *client) : AIMFileTransfer(msg, data, client), m_connectTimer(this)
+{
+ QObject::connect(&m_connectTimer, SIGNAL(timeout()), this, SLOT(connect_timeout()));
+ openFile();
+ m_totalBytes = 0;
+ EventMessageAcked(m_msg).process();
+}
+
+AIMOutcomingFileTransfer::~AIMOutcomingFileTransfer()
+{
+}
+
+void AIMOutcomingFileTransfer::listen()
+{
+ log(L_DEBUG, "AIMFileTransfer::listen");
+ m_state = Listen;
+ bind(m_client->getMinPort(), m_client->getMaxPort(), m_client);
+ FileTransfer::m_state = FileTransfer::Connect;
+ if(m_notify)
+ m_notify->process();
+}
+
+bool AIMOutcomingFileTransfer::accept(Socket *s, unsigned long)
{
log(L_DEBUG, "Accept AIM file transfer");
+ m_state = OFTNegotiation;
+
m_socket->setSocket(s);
m_socket->readBuffer().init(0);
m_socket->readBuffer().packetStart();
+
+ FileTransfer::m_state = FileTransfer::Negotiation;
+ if (m_notify)
+ m_notify->process();
+
m_socket->setRaw(true);
- FileTransfer::m_state = FileTransfer::Negotiation;
- if (m_notify)
- m_notify->process();
+ initOFTSending();
+
return true;
}
-bool AIMFileTransfer::error(const QString &err)
+void AIMOutcomingFileTransfer::initOFTSending()
{
- error_state(err, 0);
- return true;
+ int delta_length = filename().length() - 0x40;
+ if(delta_length < 0)
+ delta_length = 0;
+
+ m_oft.magic = OFT_magic;
+ m_oft.unknown = htons(256 + delta_length);
+ m_oft.type = OFT_fileInfo;
+
+ *((unsigned long*)&m_oft.cookie[0]) = htonl(m_cookie.id_l);
+ *((unsigned long*)&m_oft.cookie[4]) = htonl(m_cookie.id_h);
+
+ m_oft.encrypt = 0;
+ m_oft.compress = 0;
+ m_oft.total_files = files();
+ m_oft.files_left = files() - file();
+ m_oft.total_parts = 1; //FIXME if needed
+ m_oft.parts_left = 1;
+ m_oft.total_size = totalSize();
+ m_oft.size = fileSize();
+ m_oft.mod_time = time(NULL); //FIXME
+ m_oft.checksum = calculateChecksum();
+ m_oft.rfrcsum = 0x0000ffff;
+ m_oft.rfsize = 0x0;
+ m_oft.cretime = 0x0;
+ m_oft.rfcsum = 0x0000ffff;
+ m_oft.nrecvd = 0;
+ m_oft.recvcsum = 0x0000ffff;
+ memset(m_oft.idstring, 0, 32);
+ strncpy((char*)m_oft.idstring, "Cool FileXfer", 31);
+ m_oft.flags = 0x20; //FIXME magic
+ m_oft.lnameoffset = 0x1c; // ???
+ m_oft.lsizeoffset = 0x11;
+ memset(m_oft.dummy, 0, 69);
+ memset(m_oft.macfileinfo, 0, 16);
+
+// QString filename = filename();
+ bool bWide = false;
+ for(int i = 0; i < (int)(filename().length() + 1); i++)
+ {
+ if (filename()[i].unicode() > 0x7F)
+ {
+ bWide = true;
+ break;
+ }
+ }
+
+ if(bWide)
+ {
+ m_oft.nencode = 0x0200;
+ m_oft.nlanguage = 0;
+ m_oft.name.resize((filename().length() + 1) * 2);
+ for(int i = 0; i < (int)(filename().length() + 1); i++)
+ {
+ *((unsigned short*)(&m_oft.name.data()[i * 2])) = htons(filename()[i].unicode());
+ }
+ }
+ else
+ {
+ m_oft.nencode = 0x0;
+ m_oft.nlanguage = 0;
+ m_oft.name.duplicate(filename().data(), filename().length() + 1);
+ }
+ writeOFT(&m_oft);
+ //EventLog::log_packet(m_socket->writeBuffer(), true, ICQPlugin::icq_plugin->AIMDirectPacket); //commented out due to problems with netmon while transfer
+ m_socket->write();
+}
+
+void AIMOutcomingFileTransfer::packet_ready()
+{
+ log(L_DEBUG, "AIMOutcomingFileTransfer::packet_ready %d", m_state);
+ //ICQPlugin *plugin = static_cast<ICQPlugin*>(m_client->protocol()->plugin()); //commented out due to problems with netmon while transfer
+ //EventLog::log_packet(m_socket->readBuffer(), false, plugin->AIMDirectPacket, m_client->screen(m_data)); //commented out due to problems with netmon while transfer
+ switch(m_state)
+ {
+ case ProxyNegotiation:
+ {
+ unsigned short packet_length, chunk_id, status;
+ m_socket->readBuffer() >> packet_length;
+ m_socket->readBuffer() >> chunk_id;
+ log(L_DEBUG, "[Output]Proxy packet, length = %d, chunk_id = %04x",packet_length, chunk_id);
+ if(chunk_id == Chunk_status)
+ {
+ m_socket->readBuffer() >> status;
+ log(L_DEBUG, "status = %04x", status);
+ // TODO Handle errors
+ if(status == 0x0003)
+ {
+ m_socket->readBuffer().incReadPos(6);
+ m_socket->readBuffer() >> m_cookie2;
+ m_socket->readBuffer() >> m_ip;
+ FileMessage* msg = static_cast<FileMessage*>(m_msg);
+ QString filename = msg->getDescription();
+ m_stage++;
+ requestFT();
+ }
+ if(status == 0x0005) // Everything is allright
+ {
+ log(L_DEBUG, "Connection accepted");
+ // Read the rest of a packet:
+ if(!m_proxyActive)
+ {
+ ICQBuffer buf;
+ buf << (unsigned short) 0x0002 << m_cookie.id_l << m_cookie.id_h;
+ buf.pack(m_client->capabilities[CAP_AIM_SENDFILE], 0x10);
+
+ m_client->sendThroughServer(m_client->screen(m_data), 0x0002, buf, m_cookie, false, true);
+ }
+ m_socket->readBuffer().incReadPos(packet_length - 4);
+ FileTransfer::m_state = FileTransfer::Negotiation;
+ if(m_notify)
+ m_notify->process();
+ m_state = OFTNegotiation;
+
+ initOFTSending();
+ }
+ }
+ return;
+ }
+ break;
+ case OFTNegotiation:
+ {
+ log(L_DEBUG, "Output, negotiation");
+ if(!m_notify)
+ {
+ log(L_DEBUG, "m_notify == NULL!!! Achtung!! Alarm!!11");
+ }
+ OftData this_oft;
+ readOFT(&this_oft);
+ if(this_oft.magic != OFT_magic)
+ {
+ log(L_WARN, "Invalid magic in OFT");
+ // TODO cleanup
+ return;
+ }
+ if(this_oft.type == OFT_success)
+ {
+ log(L_DEBUG, "File transfer OK(3)");
+ FileTransfer::m_state = FileTransfer::Done;
+ m_socket->close();
+ if (m_notify)
+ m_notify->process();
+ m_socket->error_state(QString::null);
+ return;
+ }
+ if(this_oft.type != OFT_answer)
+ {
+ log(L_WARN, "Error in OFT");
+ // TODO cleanup
+ return;
+ }
+ m_file->reset();
+ m_state = Writing;
+ // TODO Check other fields in this_oft
+ FileTransfer::m_state = FileTransfer::Write;
+
+ if(m_notify)
+ {
+ m_notify->transfer(true);
+ m_notify->process();
+ }
+
+ log(L_DEBUG, "m_nFile = %d", file());
+ sendNextBlock();
+ }
+ break;
+ case Writing:
+ {
+ log(L_DEBUG, "Output, write");
+ OftData this_oft;
+ readOFT(&this_oft);
+ if(this_oft.magic != OFT_magic)
+ {
+ log(L_WARN, "Invalid magic in OFT");
+ // TODO cleanup
+ return;
+ }
+ if(this_oft.type == OFT_success)
+ {
+ log(L_DEBUG, "File transfer OK(4)");
+ if(totalBytes() >= totalSize())
+ {
+ FileTransfer::m_state = FileTransfer::Done;
+ m_socket->close();
+ m_socket->error_state(QString::null);
+ if(m_notify)
+ {
+ m_notify->transfer(false);
+ m_notify->process();
+ }
+ }
+ else
+ {
+ m_state = OFTNegotiation;
+ openFile();
+ log(L_DEBUG, "m_nFile = %d", file());
+ if(m_notify)
+ m_notify->process();
+ initOFTSending();
+ }
+ return;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ if (m_socket->readBuffer().readPos() <= m_socket->readBuffer().writePos())
+ {
+ return;
+ }
+ //ICQPlugin *plugin = static_cast<ICQPlugin*>(m_client->protocol()->plugin()); //commented out due to problems with netmon while transfer
+ //EventLog::log_packet(m_socket->readBuffer(), false, plugin->AIMDirectPacket, m_client->screen(m_data)); //commented out due to problems with netmon while transfer
+ m_socket->readBuffer().init(0);
+}
+
+bool AIMOutcomingFileTransfer::sendNextBlock()
+{
+ if(!m_file)
+ {
+ log(L_DEBUG, "Read without file");
+ m_socket->error_state("Read without file");
+ return false;
+ }
+
+ char* buffer = new char[m_packetLength + 1]; // FIXME replace it with QByteArray
+
+ int bytes_read = m_file->readBlock(buffer, m_packetLength);
+ if(bytes_read < 0)
+ {
+ log(L_DEBUG, "Error while reading file");
+ m_socket->error_state("Error while reading file");
+ delete [] buffer;
+ return false;
+ }
+ if(bytes_read == 0)
+ {
+ delete [] buffer;
+ return true;
+ }
+ m_socket->writeBuffer().pack(buffer, bytes_read);
+ m_socket->write();
+ m_totalBytes += bytes_read;
+ m_bytes += bytes_read;
+ m_transferBytes += bytes_read;
+
+ if(m_notify)
+ m_notify->process();
+
+ delete [] buffer;
+ return true;
+}
+
+void AIMOutcomingFileTransfer::connect_ready()
+{
+ log(L_DEBUG, "AIMOutcomingFileTransfer::connect_ready() %d %d", m_state, m_proxyActive);
+ if(m_state == ProxyConnection)
+ {
+ negotiateWithProxy();
+ m_state = ProxyNegotiation;
+ }
+}
+
+void AIMOutcomingFileTransfer::write_ready()
+{
+ if(FileTransfer::m_state != FileTransfer::Connect)
+ {
+ if(totalBytes() < totalSize())
+ {
+ if(FileTransfer::m_state == FileTransfer::Write)
+ sendNextBlock();
+ }
+ else
+ {
+ /// TODO Calculate and verify checksum
+ log(L_DEBUG, "File transfer OK(6)");
+ }
+ }
+}
+
+void AIMOutcomingFileTransfer::connect_timeout()
+{
+ if(m_state == ReverseConnection)
+ {
+ FileMessage* msg = static_cast<FileMessage*>(m_msg);
+ QString filename = msg->getDescription();
+ }
+}
+
+AIMFileTransfer::tTransferDirection AIMOutcomingFileTransfer::getDirection()
+{
+ return tdOutput;
}
+void AIMOutcomingFileTransfer::connectThroughProxy(const QString& host, uint16_t port, uint16_t cookie2)
+{
+ m_state = ProxyConnection;
+ AIMFileTransfer::connectThroughProxy(host, port, cookie2);
+}
+
+void AIMOutcomingFileTransfer::connect(unsigned long ip, unsigned short port)
+{
+ log(L_DEBUG, "AIMOutcomingFileTransfer::connect");
+
+ if(m_stage == 2)
+ {
+ m_port = port;
+ FileTransfer::m_state = FileTransfer::Connect;
+ if (m_notify)
+ m_notify->process();
+
+ m_state = ProxyConnection;
+ connectThroughProxy(AOL_PROXY_HOST, AOL_PROXY_PORT, NULL);
+ }
+ else
+ {
+ AIMFileTransfer::connect(ip, port);
+ }
+}
+
+#ifndef NO_MOC_INCLUDES
+#include "icqdirect.moc"
+#endif
+
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/icq/icqdirect.h
^
|
@@ -0,0 +1,193 @@
+
+#ifndef _ICQDIRECT_H_
+#define _ICQDIRECT_H_
+
+#include <qobject.h>
+#include <qtimer.h>
+#include <qwaitcondition.h>
+
+#define AOL_PROXY_HOST "ars.oscar.aol.com"
+#define AOL_PROXY_PORT 5190
+
+struct OftData
+{
+ unsigned long magic;
+ unsigned short unknown;
+ unsigned short type;
+ char cookie[8];
+ unsigned short encrypt;
+ unsigned short compress;
+ unsigned short total_files;
+ unsigned short files_left;
+ unsigned short total_parts;
+ unsigned short parts_left;
+ unsigned long total_size;
+ unsigned long size;
+ unsigned long mod_time;
+ unsigned long checksum;
+ unsigned long rfrcsum;
+ unsigned long rfsize;
+ unsigned long cretime;
+ unsigned long rfcsum;
+ unsigned long nrecvd;
+ unsigned long recvcsum;
+ char idstring[32];
+ unsigned char flags;
+ unsigned char lnameoffset;
+ unsigned char lsizeoffset;
+ char dummy[69];
+ char macfileinfo[16];
+ unsigned short nencode;
+ unsigned short nlanguage;
+ QByteArray name;
+};
+
+class AIMFileTransfer : public SIM::FileTransfer, public SIM::ClientSocketNotify, public SIM::ServerSocketNotify
+{
+public:
+ typedef enum
+ {
+ tdInput,
+ tdOutput
+ } tTransferDirection;
+
+ AIMFileTransfer(SIM::FileMessage *msg, ICQUserData *data, ICQClient *client);
+ ~AIMFileTransfer();
+ virtual void accept();
+ void setPort(unsigned short port) {m_port = port;}
+ unsigned short remotePort();
+ void setICBMCookie(MessageId const& cookie);
+ void setICBMCookie2(unsigned short cookie2);
+ MessageId& getICBMCookie() {return m_cookie; }
+ void setProxyActive(bool proxyActive) { m_proxyActive = proxyActive; }
+ virtual void connect(unsigned long ip, unsigned short port);
+ void setStage(int stage) { m_stage = stage; }
+ void forceProxyConnection() { m_proxy = true;}
+ void requestFT();
+
+ virtual tTransferDirection getDirection() = 0;
+
+ static const unsigned long OFT_magic = 0x3254464f;
+ static const int OFT_fileInfo = 0x0101;
+ static const int OFT_answer = 0x0202;
+ static const int OFT_success = 0x0402;
+ static const int OFT_continue = 0x0502;
+
+ static const unsigned short Chunk_status = 0x044a;
+ static const unsigned short Chunk_uin = 0x0000;
+ static const unsigned short Chunk_cap = 0x0001;
+
+protected:
+
+ virtual void processPacket();
+ virtual bool error_state(const QString &err, unsigned code);
+ virtual void resolve_ready(unsigned long ip);
+ virtual void startReceive(unsigned pos);
+ virtual void bind_ready(unsigned short port);
+ virtual bool error(const QString &err);
+ virtual void connectThroughProxy(const QString& host, uint16_t port, uint16_t cookie2);
+ void negotiateWithProxy();
+
+ bool readOFT(OftData* oft);
+ bool writeOFT(OftData* oft);
+ unsigned long calculateChecksum();
+ unsigned long checksumChunk(QByteArray* filechunk, unsigned int chunklength, unsigned int start);
+
+ int m_stage;
+ bool m_proxy;
+ bool m_proxyActive;
+ MessageId m_cookie;
+ uint16_t m_cookie2;
+ OftData m_oft;
+ unsigned long m_packetLength;
+ bool bcontinue;
+ ICQUserData *m_data;
+ ICQClient *m_client;
+ ICQClientSocket *m_socket;
+ unsigned short m_port;
+ unsigned long m_ip;
+
+ friend class ICQClient;
+};
+
+class AIMIncomingFileTransfer : public QObject, public AIMFileTransfer
+{
+ Q_OBJECT
+public:
+ AIMIncomingFileTransfer(SIM::FileMessage *msg, ICQUserData *data, ICQClient *client);
+ virtual ~AIMIncomingFileTransfer();
+ virtual void accept();
+ virtual void connect_ready();
+ virtual void packet_ready();
+ virtual void write_ready();
+ virtual bool accept(SIM::Socket *s, unsigned long ip);
+
+ void receiveNextBlock(long size);
+ void ackOFT();
+ virtual void connectThroughProxy(const QString& host, uint16_t port, uint16_t cookie2);
+ virtual tTransferDirection getDirection();
+
+protected slots:
+ virtual void connect_timeout();
+protected:
+ virtual void startReceive(unsigned pos);
+ virtual bool error_state(const QString &err, unsigned code);
+ enum State
+ {
+ None,
+ Connecting,
+ ReverseConnection,
+ ProxyConnection,
+ ProxyNegotiation,
+ OFTNegotiation,
+ Reading,
+ Done
+ };
+ State m_state;
+ QTimer m_connectTimer;
+};
+
+class AIMOutcomingFileTransfer : public QObject, public AIMFileTransfer
+{
+ Q_OBJECT
+public:
+ AIMOutcomingFileTransfer(SIM::FileMessage *msg, ICQUserData *data, ICQClient *client);
+ virtual ~AIMOutcomingFileTransfer();
+
+ void listen();
+ virtual void connect(unsigned long ip, unsigned short port);
+ //void connect(unsigned short port);
+ virtual tTransferDirection getDirection();
+ virtual void connectThroughProxy(const QString& host, uint16_t port, uint16_t cookie2);
+protected slots:
+ virtual void connect_timeout();
+protected:
+ enum State
+ {
+ None,
+ Listen,
+ ReverseConnection,
+ ProxyConnection,
+ ProxyNegotiation,
+ OFTNegotiation,
+ Writing,
+ Done
+ };
+ virtual bool accept(SIM::Socket *s, unsigned long ip);
+ virtual void write_ready();
+ virtual void packet_ready();
+ virtual void connect_ready();
+
+ //void read_ready();
+ bool sendNextBlock();
+
+ void initOFTSending();
+
+ State m_state;
+ QTimer m_connectTimer;
+};
+
+
+
+#endif
+
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqicmb.cpp
^
|
@@ -38,10 +38,11 @@
#include "html.h"
#include "unquot.h"
#include "log.h"
-#include "core.h"
+#include "core_events.h"
#include "icqclient.h"
#include "icqmessage.h"
+#include "icqdirect.h"
#include "icq.h"
using namespace std;
@@ -78,7 +79,7 @@
case ICQ_SNACxMSG_MTN:{
socket()->readBuffer().incReadPos(10);
QString screen = socket()->readBuffer().unpackScreen();
- unsigned short type;
+ unsigned short type; //Fixme!!! Local declaration of 'type' hides declaration of the same name in outer scope: Function parameter "type"
socket()->readBuffer() >> type;
bool bType = (type > 1);
Contact *contact;
@@ -143,7 +144,7 @@
err_str = error_message(error);
}
if(error == 2)
- requestRateInfo();
+ m_snacService->requestRateInfo();
if (m_send.msg){
m_send.msg->setError(err_str);
EventMessageSent(m_send.msg).process();
@@ -326,7 +327,7 @@
QCString answer;
socket()->readBuffer() >> answer;
log(L_DEBUG, "Autoreply from %s %s", screen.latin1(), answer.data());
- Contact *contact;
+ Contact *contact; //Fixme: Local declaration of 'contact' hides declaration of the same name in outer scope, see previous declaration at line '300'
ICQUserData *data = findContact(screen, NULL, false, contact);
if (data && data->AutoReply.setStr(getContacts()->toUnicode(contact, answer))){
EventContact e(contact, EventContact::eChanged);
@@ -366,7 +367,8 @@
char *m_data = (*m_tlv);
unsigned short encoding = (unsigned short)((m_data[0] << 8) + m_data[1]);
m_data += 4;
- if (encoding == 2){
+ if(encoding == 2)
+ {
QString text;
for (int i = 0; i < m_tlv->Size() - 5; i += 2){
unsigned char r1 = *(m_data++);
@@ -403,47 +405,50 @@
}
case 0x0002:{
Tlv *tlv5 = tlvChannel(5);
- if (!tlv5){
+ if(!tlv5)
+ {
log(L_WARN, "TLV 0x0005 not found");
break;
}
ICQBuffer msg(*tlv5);
- unsigned short type;
+ unsigned short type; //Fixme: Local declaration of 'type' hides declaration of the same name in outer scope, see previous declaration at line '73'
msg >> type;
switch (type){
case 0:
parseAdvancedMessage(screen, msg, tlvChannel(3) != NULL, id);
break;
- case 1:{
- Contact *contact;
- ICQUserData *data = findContact(screen, NULL, false, contact);
- if (data){
- QString name = dataName(data);
- for (list<Message*>::iterator it = m_acceptMsg.begin(); it != m_acceptMsg.end(); ++it){
- Message *msg = *it;
- if (msg->client() && (name == msg->client())){
- MessageId msg_id;
- switch (msg->type()){
- case MessageICQFile:
- msg_id.id_l = static_cast<ICQFileMessage*>(msg)->getID_L();
- msg_id.id_h = static_cast<ICQFileMessage*>(msg)->getID_H();
- break;
- case MessageFile:
- msg_id.id_l = static_cast<AIMFileMessage*>(msg)->getID_L();
- msg_id.id_h = static_cast<AIMFileMessage*>(msg)->getID_H();
- break;
- }
- if (msg_id == id){
- m_acceptMsg.erase(it);
- EventMessageDeleted(msg).process();
- delete msg;
- break;
- }
- }
- }
- }
- break;
- }
+ case 1:
+ {
+ Contact *contact;
+ ICQUserData *data = findContact(screen, NULL, false, contact);
+ if (data){
+ QString name = dataName(data);
+ for (list<Message*>::iterator it = m_acceptMsg.begin(); it != m_acceptMsg.end(); ++it){
+ Message *msg = *it; //Fixme: Local declaration of 'msg' hides declaration of the same name in outer scope, see previous declaration at line '413'
+ if (msg->client() && (name == msg->client())){
+ MessageId msg_id;
+ switch (msg->type()){
+ case MessageICQFile:
+ msg_id.id_l = static_cast<ICQFileMessage*>(msg)->getID_L();
+ msg_id.id_h = static_cast<ICQFileMessage*>(msg)->getID_H();
+ break;
+ case MessageFile:
+ msg_id.id_l = static_cast<AIMFileMessage*>(msg)->getID_L();
+ msg_id.id_h = static_cast<AIMFileMessage*>(msg)->getID_H();
+ break;
+ }
+ if (msg_id == id)
+ {
+ m_acceptMsg.erase(it);
+ EventMessageDeleted(msg).process();
+ delete msg;
+ break;
+ }
+ }
+ }
+ }
+ break;
+ }
case 2:
log(L_DEBUG, "File ack");
break;
@@ -465,7 +470,7 @@
parseAdvancedMessage(screen, msg, tlvChannel(6) != NULL, id);
return;
}
- unsigned char type, flags;
+ unsigned char type, flags; //Fixme: Local declaration of 'type' hides declaration of the same name in outer scope, see previous declaration at line '73'
QCString msg_str;
msg >> type;
msg >> flags;
@@ -764,16 +769,31 @@
b << id.id_l << id.id_h;
b.pack((char*)capabilities[cap], sizeof(capability));
b.tlv(0x0A, (unsigned short)type);
- if (port){
- b.tlv(0x03, (unsigned long)htonl(get_ip(data.owner.RealIP)));
- b.tlv(0x04, (unsigned long)htonl(get_ip(data.owner.IP)));
+ if(type != 4)
+ b.tlv(0x0F);
+ copyTlv(b, tlvs, 0x14);
+ if(port)
+ {
+ if(type != 4)
+ {
+ b.tlv(0x03, (unsigned long)htonl(get_ip(data.owner.RealIP)));
+ if(type != 3)
+ {
+ b.tlv(0x04, (unsigned long)htonl(get_ip(data.owner.IP)));
+ }
+ }
b.tlv(0x05, port);
+ log(L_DEBUG, "RealIP = %08x, IP = %08x, port = %04x", (get_ip(data.owner.RealIP)), (get_ip(data.owner.IP)), port);
}
- b.tlv(0x0F);
+ copyTlv(b, tlvs, 0x17);
copyTlv(b, tlvs, 0x0E);
copyTlv(b, tlvs, 0x0D);
copyTlv(b, tlvs, 0x0C);
- b.tlv(0x2711, msgBuf);
+ copyTlv(b, tlvs, 0x10);
+ copyTlv(b, tlvs, 0x02);
+ copyTlv(b, tlvs, 0x16);
+ if(type != 4)
+ b.tlv(0x2711, msgBuf);
copyTlv(b, tlvs, 0x2712);
copyTlv(b, tlvs, 0x03);
sendThroughServer(screen, 2, b, id, bOffline, true);
@@ -821,14 +841,179 @@
m_send.screen = QString::null;
}
+void ICQClient::icmbSendFile(TlvList& tlv, unsigned long primary_ip, unsigned long secondary_ip, unsigned short port,const QString &screen, MessageId const& id)
+{
+ log(L_DEBUG, "ICQClient::icbmSendFile()");
+ Tlv *desc = tlv(0x0A);
+ Tlv *info = tlv(0x2711);
+ QString d;
+ unsigned short type;
+ unsigned short nFiles;
+ unsigned long size;
+ bool is_proxy = tlv(0x10);
+ log(L_DEBUG, "Desc = %d", (uint16_t)(*desc));
+
+ // First, let's find our filetransfer
+ AIMFileTransfer* ft = NULL;
+ for(list<AIMFileTransfer*>::iterator it = m_filetransfers.begin(); it != m_filetransfers.end(); ++it)
+ {
+ if((*it)->getICBMCookie() == id)
+ {
+ ft = (*it);
+ break;
+ }
+ }
+ if(ft == NULL)
+ {
+ log(L_DEBUG, "ft == NULL");
+ // Incoming file
+ if(info == NULL)
+ {
+ // This is baaad
+ log(L_WARN, "No info tlv in send file");
+ return;
+ }
+ ICQBuffer b(*info);
+ b >> type >> nFiles >> size;
+ QString name = convert(b.data(8), b.size() - 8, tlv, 0x2712);
+ AIMFileMessage *msg = new AIMFileMessage;
+ msg->setPort(port);
+ msg->setBackground(clearTags(d));
+ //msg->setText(d);
+ msg->setSize(size);
+ msg->setID_L(id.id_l);
+ msg->setID_H(id.id_h);
+ if(is_proxy)
+ {
+ msg->isProxy = true;
+ }
+ if(tlv(5))
+ {
+ msg->cookie2 = *tlv(5);
+ }
+ if(type == 2)
+ {
+ d = i18n("Directory");
+ d += ' ';
+ d += name;
+ d += " (";
+ d += i18n("%n file", "%n files", nFiles);
+ d += ')';
+ }
+ else
+ {
+ if (nFiles == 1)
+ {
+ d = name;
+ }
+ else
+ {
+ d = i18n("%n file", "%n files", nFiles);
+ }
+ }
+ msg->setDescription(d);
+ msg->setFlags(MESSAGE_RECEIVED | MESSAGE_RICHTEXT | MESSAGE_TEMP);
+ m_processMsg.push_back(msg);
+ messageReceived(msg, screen);
+ return;
+ }
+ AIMFileMessage* afm = NULL;
+ for(list<Message*>::iterator it = m_processMsg.begin(); it != m_processMsg.end(); ++it)
+ {
+ if ((*it)->type() == MessageFile)
+ {
+ afm = static_cast<AIMFileMessage*>((*it));
+ MessageId this_id;
+ this_id.id_l = afm->getID_L();
+ this_id.id_h = afm->getID_H();
+ if(this_id == id)
+ {
+ afm->setPort(port);
+ }
+ }
+ }
+
+ unsigned short ft_type = *desc;
+ ft->setStage(ft_type);
+ log(L_DEBUG, "stage = %d", ft_type);
+ if(is_proxy) // Connection through proxy
+ {
+ log(L_DEBUG, "Proxy request");
+ for(list<AIMFileTransfer*>::iterator it = m_filetransfers.begin(); it != m_filetransfers.end(); ++it)
+ {
+ if((*it)->getICBMCookie() == id)
+ {
+ Contact *contact;
+ ICQUserData *data = findContact(screen, NULL, false, contact);
+ if(data)
+ {
+ if(primary_ip)
+ set_ip(&data->RealIP, primary_ip);
+ AIMFileTransfer *ft = (*it); //Fixme:Local declaration of 'ft' hides declaration from line: 857
+ struct in_addr in;
+ in.s_addr = primary_ip;
+
+ ft->setProxyActive(false);
+ unsigned short cookie2 = 0;
+ if(tlv(5))
+ {
+ cookie2 = *tlv(5);
+ };
+ if(primary_ip)
+ ft->connectThroughProxy(inet_ntoa(in), AOL_PROXY_PORT, cookie2);
+ else
+ {
+ ft->setProxyActive(true);
+ ft->connectThroughProxy(AOL_PROXY_HOST, AOL_PROXY_PORT, cookie2);
+ }
+
+ return;
+ }
+ }
+ }
+ }
+ else
+ {
+ log(L_DEBUG, "No Proxy request: %d", ft_type);
+ if(ft_type == 3)
+ {
+ ft->setProxyActive(true);
+ ft->connectThroughProxy(AOL_PROXY_HOST, AOL_PROXY_PORT, 0);
+ }
+ if(ft_type == 2)
+ {
+ for(list<AIMFileTransfer*>::iterator it = m_filetransfers.begin(); it != m_filetransfers.end(); ++it)
+ {
+ AIMFileTransfer *ft = (*it); //Fixme:Local declaration of 'ft' hides declaration from line: 857
+ if(ft->getICBMCookie() == id)
+ {
+ if(primary_ip)
+ ft->connect(primary_ip, port);
+ else
+ ft->connect(secondary_ip, port);
+ }
+ }
+ }
+ return;
+ }
+ if(info == NULL && afm)
+ {
+ afm->setPort(port);
+ return;
+ }
+}
+
void ICQClient::parseAdvancedMessage(const QString &screen, ICQBuffer &m, bool needAck, MessageId id)
{
+ log(L_DEBUG, "ICQClient::parseAdvancedMessage");
m.incReadPos(8); /* msg-id cookie */
capability cap;
m.unpack((char*)cap, sizeof(cap));
- if (!memcmp(cap, capabilities[CAP_DIRECT], sizeof(cap))){
+ if (!memcmp(cap, capabilities[CAP_DIRECT], sizeof(cap)))
+ {
TlvList tlv(m);
- if (!tlv(0x2711)){
+ if(!tlv(0x2711))
+ {
log(L_DEBUG, "TLV 0x2711 not found");
return;
}
@@ -865,13 +1050,15 @@
ICQFileMessage *msg = static_cast<ICQFileMessage*>(*it);
if (msg->m_transfer == NULL)
continue;
- ICQFileTransfer *ft = static_cast<ICQFileTransfer*>(msg->m_transfer);
+ /*
+ AIMFileTransfer *ft = static_cast<AIMFileTransfer*>(msg->m_transfer);
if (ft->m_localPort == remotePort){
log(L_DEBUG, "Setup file transfer reverse connect to %s %s:%lu",
screen.local8Bit().data(), inet_ntoa(addr), localPort);
ft->reverseConnect(localIP, localPort);
return;
}
+ */
}
log(L_DEBUG, "Setup reverse connect to %s %s:%lu",
screen.local8Bit().data(), inet_ntoa(addr), localPort);
@@ -885,22 +1072,31 @@
unsigned long real_ip = 0;
unsigned long ip = 0;
unsigned short port = 0;
+ unsigned long test_ip = 0;
+
+ if (tlv(2))
+ test_ip = htonl((uint32_t)(*tlv(2)));
if (tlv(3))
real_ip = htonl((uint32_t)(*tlv(3)));
if (tlv(4))
ip = htonl((uint32_t)(*tlv(4)));
if (tlv(5))
- port = *tlv(5);
- log(L_DEBUG, "IP: %lX %lX %d", ip, real_ip, port);
- if (real_ip || ip){
+ port = (*tlv(5));
+
+ log(L_DEBUG, "Test IP: %08x, Real IP: %08x, IP: %08x, PORT: %d",test_ip, real_ip, ip, port);
+
+ if(real_ip || ip)
+ {
Contact *contact;
ICQUserData *data = findContact(screen, NULL, false, contact);
- if (data){
- if (real_ip && (get_ip(data->RealIP) == 0))
+ if (data)
+ {
+ //if(real_ip && (get_ip(data->RealIP) == 0))
+ if(real_ip)
set_ip(&data->RealIP, real_ip);
- if (ip && (get_ip(data->IP) == 0))
+ if(ip && (get_ip(data->IP) == 0))
set_ip(&data->IP, ip);
- if (port && (data->Port.toULong() == 0))
+ if(port && (data->Port.toULong() == 0))
data->Port.asULong() = port;
}
}
@@ -910,67 +1106,10 @@
return;
}
- if (!memcmp(cap, capabilities[CAP_AIM_SENDFILE], sizeof(cap))){
- log(L_DEBUG, "AIM send file");
- Tlv *desc = tlv(0x0C);
- if (desc == NULL){
- log(L_DEBUG, "Send file ack");
- list<SendMsg>::iterator it;
- for (it = replyQueue.begin(); it != replyQueue.end(); ++it){
- if (((*it).id == id) && ((*it).screen == screen)){
- if ((*it).msg->type() != MessageFile){
- log(L_WARN, "Bad message type for file ack");
- return;
- }
- FileMessage *m = static_cast<FileMessage*>((*it).msg);
- replyQueue.erase(it);
- m_processMsg.push_back(m);
- EventMessageAcked(m).process();
- AIMFileTransfer *ft = static_cast<AIMFileTransfer*>(m->m_transfer);
- ft->connect(port);
- return;
- }
- }
- log(L_DEBUG, "File message for ack not found");
- return;
- }
- Tlv *info = tlv(0x2711);
- if (info == NULL){
- log(L_WARN, "No info tlv in send file");
- return;
- }
- QString d = convert(desc, tlv, 0x0D);
- ICQBuffer b(*info);
- unsigned short type;
- unsigned short nFiles;
- unsigned long size;
- b >> type >> nFiles >> size;
- QString name = convert(b.data(8), b.size() - 8, tlv, 0x2712);
- AIMFileMessage *msg = new AIMFileMessage;
- msg->setPort(port);
- msg->setBackground(clearTags(d));
- msg->setText(d);
- msg->setSize(size);
- msg->setID_L(id.id_l);
- msg->setID_H(id.id_h);
- if (type == 2){
- d = i18n("Directory");
- d += ' ';
- d += name;
- d += " (";
- d += i18n("%n file", "%n files", nFiles);
- d += ')';
- }else{
- if (nFiles == 1){
- d = name;
- }else{
- d = i18n("%n file", "%n files", nFiles);
- }
- }
- msg->setDescription(d);
- msg->setFlags(MESSAGE_RECEIVED | MESSAGE_RICHTEXT | MESSAGE_TEMP);
- messageReceived(msg, screen);
- return;
+ if (!memcmp(cap, capabilities[CAP_AIM_SENDFILE], sizeof(cap)))
+ {
+ icmbSendFile(tlv, test_ip, ip, port, screen, id);
+ return;
}
if (!memcmp(cap, capabilities[CAP_AIM_BUDDYLIST], sizeof(cap))){
@@ -1088,7 +1227,7 @@
return;
}
adv.incReadPos(8);
- plugin p;
+ plugin p; //Fixme: Local declaration of 'p' hides declaration of the same name in outer scope: previous declaration at line '1176'
adv.unpack((char*)p, sizeof(p));
unsigned plugin_type;
for (plugin_type = 0; plugin_type < PLUGIN_NULL; plugin_type++){
@@ -1161,9 +1300,9 @@
EventARRequest(&ar).process();
if (!msg.isEmpty()){
- Contact *contact;
- ICQUserData *data = findContact(screen, NULL, false, contact);
- QString m = getContacts()->toUnicode(contact, msg);
+ Contact *contact; //Fixme: Local declaration of 'contact' hides declaration of the same name in outer scope, see previous declaration at line '1278'
+ ICQUserData *data = findContact(screen, NULL, false, contact); //Fixme: Local declaration of 'data' hides declaration of the same name in outer scope, see previous declaration at line '1279'
+ QString m = getContacts()->toUnicode(contact, msg); //Fixme: Local declaration of 'm' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '1006'
data->AutoReply.str() = m;
EventContact e(contact, EventContact::eChanged);
e.process();
@@ -1177,7 +1316,7 @@
copy.pack(adv.data(adv.readPos()), adv.writePos() - adv.readPos());
log(L_DEBUG, "Msg size=%lu type=%u", (unsigned long) msg.size(), msgType);
if (msg.size() || (msgType == ICQ_MSGxEXT)){
- Message *m = parseMessage(msgType, screen, msg, adv, id, cookie1 | (cookie2 << 16));
+ Message *m = parseMessage(msgType, screen, msg, adv, id, cookie1 | (cookie2 << 16)); //Fixme: Local declaration of 'm' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '1006'
if (m){
if ((m_send.id == id) && (m_send.screen == screen)){
replyQueue.push_back(m_send);
@@ -1250,10 +1389,13 @@
if (msgFlags & ICQ_TCPxMSG_LIST)
m->setFlags(m->getFlags() | MESSAGE_LIST);
needAck = messageReceived(m, screen);
- }else{
- Message *msg = (*it).msg;
+ }
+ else
+ {
+ Message *msg = (*it).msg; //Fixme: Local declaration of 'msg' hides declaration of the same name in outer scope, see previous declaration at line '1254'
replyQueue.erase(it);
- if (msg->type() == MessageFile){
+ if(msg->type() == MessageFile)
+ {
Contact *contact;
ICQUserData *data = findContact(screen, NULL, false, contact);
if ((m->type() != MessageICQFile) || (data == NULL)){
@@ -1263,17 +1405,20 @@
delete msg;
return;
}
- if (m_state == 1){
+ if(m_state == 1)
+ {
msg->setError(I18N_NOOP("Message declined"));
EventMessageSent(msg).process();
delete msg;
return;
}
- ICQFileTransfer *ft = new ICQFileTransfer(static_cast<FileMessage*>(msg), data, this);
- EventMessageAcked(msg).process();
- m_processMsg.push_back(msg);
- ft->connect(static_cast<ICQFileMessage*>(m)->getPort());
- }else{
+ //AIMFileTransfer *ft = new AIMOutcomingFileTransfer(static_cast<FileMessage*>(msg), data, this); //ft is not used, remove?
+ //EventMessageAcked(msg).process();
+ //m_processMsg.push_back(msg);
+ //ft->connect(static_cast<AIMFileMessage*>(m)->getPort());
+ }
+ else
+ {
log(L_WARN, "Unknown message type for ACK");
delete msg;
}
@@ -1284,7 +1429,7 @@
if (!needAck)
return;
sendAutoReply(screen, id, p, cookie1, cookie2,
- msgType, 0, 0, QString::null, 0, copy);
+ msgType, 0, 0, QString::null, 0, copy); //variable p seems corrupted, maybe crash?
}
void ICQClient::sendAutoReply(const QString &screen, MessageId id,
@@ -1624,15 +1769,18 @@
return false;
}
unsigned short type = 0;
- if (m_send.msg) {
+ if (m_send.msg)
+ {
type = m_send.msg->type();
log(L_DEBUG, "Send: %s %u %X", m_send.screen.latin1(), type, m_send.flags);
}
- if (m_send.msg && (m_send.socket == NULL)){
+ if(m_send.msg && (m_send.socket == NULL))
+ {
ICQBuffer b;
m_send.id.id_l = rand();
m_send.id.id_h = rand();
- switch (m_send.msg->type()){
+ switch (m_send.msg->type())
+ {
case MessageContacts:
if (data->Uin.toULong() == 0){
CONTACTS_MAP c;
@@ -1649,7 +1797,7 @@
ICQBuffer msgBuf;
vector<alias_group> cc;
for (CONTACTS_MAP::iterator it = c.begin(); it != c.end(); ++it){
- alias_group c;
+ alias_group c; //Fixme: Local declaration of 'c' hides declaration of the same name in outer scope, see previous declaration at line '1786'
c.alias = (*it).first.str();
c.grp = (*it).second.grp;
cc.push_back(c);
@@ -1715,9 +1863,20 @@
return true;
}
case MessageFile:
- packMessage(b, m_send.msg, data, type, false);
- sendAdvMessage(screen(data), b, PLUGIN_NULL, m_send.id, false, true);
- return true;
+ {
+ log(L_DEBUG, "processMsg: MessageFile");
+ MessageId id;
+ generateCookie(id);
+ FileMessage* msg = static_cast<FileMessage*>(m_send.msg);
+ AIMOutcomingFileTransfer *ft = new AIMOutcomingFileTransfer(msg, data, this);
+ ft->setICBMCookie(id);
+ ft->listen();
+ QString filename = msg->getDescription();
+ ft->setStage(1);
+ unsigned long filesize = msg->getSize(); //Fixme: filesize is initialized, but not used.
+ ft->requestFT();
+ return true;
+ }
case MessageWarning:{
WarningMessage *msg = static_cast<WarningMessage*>(m_send.msg);
snac(ICQ_SNACxFOOD_MESSAGE, ICQ_SNACxMSG_BLAMExUSER, true);
@@ -1811,9 +1970,12 @@
sendAdvMessage(m_send.screen, msgBuf, PLUGIN_NULL, m_send.id, true, false);
return true;
}
- if (m_send.socket){
+ if(m_send.socket)
+ {
ICQBuffer msgBuf;
- if (m_send.flags == PLUGIN_AIM_FT_ACK){
+ if(m_send.flags == PLUGIN_AIM_FT_ACK)
+ {
+ log(L_DEBUG, "This way");
AIMFileMessage *msg = static_cast<AIMFileMessage*>(m_send.msg);
m_send.id.id_l = msg->getID_L();
m_send.id.id_h = msg->getID_H();
@@ -1832,7 +1994,8 @@
}
m_send.id.id_l = rand();
m_send.id.id_h = rand();
- if (m_send.flags == PLUGIN_AIM_FT){
+ if(m_send.flags == PLUGIN_AIM_FT)
+ {
TlvList tlvs;
tlvs += new Tlv(0x0E, 2, "en");
char b[15];
@@ -1912,7 +2075,7 @@
if ((status == ICQ_STATUS_ONLINE) || (status == ICQ_STATUS_OFFLINE))
return false;
- unsigned short type = ICQ_MSGxAR_AWAY;
+ unsigned short type = ICQ_MSGxAR_AWAY; //Fixme: Local declaration of 'type' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '1771'
if (status & ICQ_STATUS_DND){
type = ICQ_MSGxAR_DND;
}else if (status & ICQ_STATUS_OCCUPIED){
@@ -1943,7 +2106,7 @@
log(L_DEBUG, "Plugin info request %s (%u)", m_send.screen.latin1(), plugin_index);
ICQBuffer b;
- unsigned short type = 0;
+ unsigned short type = 0; //Fixme: Local declaration of 'type' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '1771'
switch (plugin_index){
case PLUGIN_QUERYxINFO:
case PLUGIN_PHONEBOOK:
@@ -2002,7 +2165,7 @@
MessageId id;
if (msg->getFlags() & MESSAGE_DIRECT){
Contact *contact = getContacts()->contact(msg->contact());
- ICQUserData *data = NULL;
+ ICQUserData *data = NULL; //Fixme: Local declaration of 'data' hides declaration of the same name in outer scope, see previous declaration at line '2163'
if (contact){
ClientDataIterator it(contact->clientData, this);
while ((data = (toICQUserData(++it))) != NULL){
@@ -2059,15 +2222,30 @@
ft->listen();
break;
}
- case MessageFile:{
- AIMFileTransfer *ft = new AIMFileTransfer(static_cast<FileMessage*>(msg), data, this);
+ case MessageFile:
+ {
+ AIMFileTransfer *ft = new AIMIncomingFileTransfer(static_cast<FileMessage*>(msg), data, this);
+ AIMFileMessage* fmsg = static_cast<AIMFileMessage*>(msg);
+ fmsg->m_transfer = ft;
ft->setDir(dir);
ft->setOverwrite(overwrite);
EventMessageAcked(msg).process();
- m_processMsg.push_back(msg);
bDelete = false;
+ ft->setPort(fmsg->getPort());
+ MessageId this_id;
+ this_id.id_l = fmsg->getID_L();
+ this_id.id_h = fmsg->getID_H();
+ ft->setICBMCookie(this_id);
+ log(L_DEBUG, "port = %d", fmsg->getPort());
+ ft->setStage(1);
+ if(fmsg->isProxy)
+ {
+ ft->setICBMCookie2(fmsg->cookie2);
+ ft->setProxyActive(false);
+ ft->forceProxyConnection();
+ }
ft->accept();
- break;
+ return;
}
default:
log(L_DEBUG, "Bad message type %u for accept", msg->type());
@@ -2075,11 +2253,14 @@
}
EventMessageDeleted(msg).process();
if (bDelete)
+ {
delete msg;
+ }
}
void ICQClient::decline(Message *msg, const QString &reason)
{
+ log(L_WARN, "ICQClient::decline");
if (msg->getFlags() & MESSAGE_DIRECT){
Contact *contact = getContacts()->contact(msg->contact());
ICQUserData *data = NULL;
@@ -2148,7 +2329,7 @@
socket()->writeBuffer() << 0x0003 << 0x0002 << 0x0001;
sendPacket(false);
if (!reason.isEmpty()){
- Message *msg = new Message(MessageGeneric);
+ Message *msg = new Message(MessageGeneric); //Fixme: Local declaration of 'msg' hides declaration of the same name in outer scope, see previous declaration at line '2262'
msg->setText(reason);
msg->setFlags(MESSAGE_NOHISTORY);
msg->setContact(contact->id());
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqinfo.cpp
^
|
@@ -18,7 +18,6 @@
#include "icons.h"
#include "icqinfo.h"
#include "icqclient.h"
-#include "core.h"
#include "ballonmsg.h"
#include <qlineedit.h>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqlists.cpp
^
|
@@ -84,6 +84,8 @@
const unsigned short TLV_BUDDYHASH = 0x00D5;
const unsigned short TLV_ALIAS = 0x0131;
const unsigned short TLV_CELLULAR = 0x013A;
+const unsigned short TLV_UNKNOWN4 = 0x015c;
+const unsigned short TLV_UNKNOWN5 = 0x015d;
const unsigned LIST_REQUEST_TIMEOUT = 50;
@@ -96,7 +98,7 @@
virtual void process(ICQClient *client, unsigned short res)
{
Q_UNUSED(res);
- client->snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_SAVE);
+ client->snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_SAVE, true, false);
client->sendPacket(true);
}
@@ -201,6 +203,24 @@
Group *grp = NULL;
ICQUserData *data = findGroup(grp_id, NULL, grp);
data = findContact(str, &alias, true, contact, grp);
+ if(data)
+ {
+ Tlv* unknown2 = inf ? (*inf)(TLV_UNKNOWN2) : NULL;
+ if(unknown2)
+ {
+ data->unknown2.setBinary(unknown2->byteArray());
+ }
+ Tlv* unknown4 = inf ? (*inf)(TLV_UNKNOWN4) : NULL;
+ if(unknown4)
+ {
+ data->unknown4.setBinary(unknown4->byteArray());
+ }
+ Tlv* unknown5 = inf ? (*inf)(TLV_UNKNOWN5) : NULL;
+ if(unknown5)
+ {
+ data->unknown5.setBinary(unknown5->byteArray());
+ }
+ }
if (inf && (*inf)(TLV_WAIT_AUTH)){
if (!data->WaitAuth.toBool()){
data->WaitAuth.asBool() = true;
@@ -456,6 +476,7 @@
socket()->readBuffer().incReadPos(len);
inf = new TlvList(b);
}
+ log(L_DEBUG, "Server updates item: group_id = %d; id = %d", grp_id, id);
parseRosterItem(type,name,grp_id,id,inf,tmp);
delete inf;
break;
@@ -629,9 +650,9 @@
ar.status = m_logonStatus;
EventARRequest(&ar).process();
}
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_ACTIVATE);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_ACTIVATE, true, false);
sendPacket(true);
- sendClientReady();
+ m_snacService->sendClientReady();
setState(Connected);
m_bReady = true;
processSendQueue();
@@ -641,9 +662,9 @@
sendICMB(1, 11);
sendICMB(2, 3);
sendICMB(4, 3);
- sendLogonStatus();
- sendClientReady();
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_ACTIVATE);
+ snacService()->sendLogonStatus();
+ snacService()->sendClientReady();
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_ACTIVATE, true, false);
sendPacket(true);
sendMessageRequest();
@@ -748,7 +769,8 @@
break;
}
case ICQ_SNACxLISTS_DONE:
- if (m_listRequest && m_listRequest->seq() == seq){
+ if (m_listRequest && m_listRequest->seq() == seq)
+ {
unsigned short res;
const char *msg;
socket()->readBuffer() >> res;
@@ -794,10 +816,9 @@
void ICQClient::listsRequest()
{
- log(L_DEBUG, "lists request");
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_REQxRIGHTS);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_REQxRIGHTS, true, false);
sendPacket(true);
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_REQxROSTER);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_REQxROSTER, true, false);
unsigned long contactsTime = getContactsTime();
unsigned short contactsLength = getContactsLength();
socket()->writeBuffer() << contactsTime << contactsLength;
@@ -900,8 +921,6 @@
void ContactServerRequest::process(ICQClient *client, unsigned short res)
{
- ListServerRequest::process(client, res);
-
ListRequest *lr = client->findContactListRequest(m_screen);
if (lr && (lr->type == LIST_USER_DELETED)){
lr->screen = QString::null;
@@ -911,12 +930,22 @@
}
Contact *contact;
ICQUserData *data = client->findContact(m_screen, NULL, true, contact);
- if ((res == 0x0E) && !data->WaitAuth.toBool()){
- data->WaitAuth.asBool() = true;
- EventContact e(contact, EventContact::eChanged);
- e.process();
- return;
- }
+ if(res == 0x0e)
+ {
+ //data->GrpId.setULong(0);
+ if(data->WaitAuth.toBool())
+ {
+ client->ssiEndTransaction();
+ client->ssiStartTransaction();
+ TlvList *tlv = client->createListTlv(data, contact);
+ client->ssiAddBuddy(m_screen, m_grpId, (unsigned short) data->IcqID.toULong(), 0, tlv);
+ data->WaitAuth.setBool(true);
+ }
+ EventContact e(contact, EventContact::eChanged);
+ e.process();
+ client->ssiEndTransaction();
+ return;
+ }
data->IcqID.asULong() = m_icqId;
data->GrpId.asULong() = m_grpId;
if ((data->GrpId.toULong() == 0) && data->WaitAuth.toBool()){
@@ -939,6 +968,7 @@
data->Cellular.clear();
}
}
+ ListServerRequest::process(client, res);
}
//-----------------------------------------------------------------------------
@@ -1031,8 +1061,8 @@
while ((contact = ++it_cnt) != NULL){
ClientDataIterator it(contact->clientData, this);
ICQUserData *data;
- while ((data = toICQUserData(++it)) != NULL){
- if ((data->IcqID.toULong() == id) || (data->IgnoreId.toULong() == id) ||
+ while((data = toICQUserData(++it)) != NULL){
+ if((data->IcqID.toULong() == id) || (data->IgnoreId.toULong() == id) ||
(data->VisibleId.toULong() == id) || (data->InvisibleId.toULong() == id))
break;
}
@@ -1051,11 +1081,19 @@
TlvList *tlv = new TlvList;
QCString name = contact->getName().utf8();
*tlv += new Tlv(TLV_ALIAS, (unsigned short)(name.length()), name);
- if (data->WaitAuth.toBool())
- *tlv += new Tlv(TLV_WAIT_AUTH, 0, NULL);
+ if(data->WaitAuth.toBool())
+ {
+ *tlv += new Tlv(TLV_WAIT_AUTH, 0, NULL);
+ }
QString cell = getUserCellular(contact);
if (cell.length())
*tlv += new Tlv(TLV_CELLULAR, (unsigned short)(cell.length()), cell.latin1());
+ if(data->unknown2.asBinary().size() > 0)
+ *tlv += new Tlv(TLV_UNKNOWN2, data->unknown2.asBinary().size() - 1, data->unknown2.asBinary().data());
+ if(data->unknown4.asBinary().size() > 0)
+ *tlv += new Tlv(TLV_UNKNOWN4, data->unknown4.asBinary().size() - 1, data->unknown4.asBinary().data());
+ if(data->unknown5.asBinary().size() > 0)
+ *tlv += new Tlv(TLV_UNKNOWN5, data->unknown5.asBinary().size() - 1, data->unknown5.asBinary().data());
return tlv;
}
@@ -1069,14 +1107,139 @@
processSendQueue();
}
+void ICQClient::ssiStartTransaction()
+{
+ log(L_DEBUG, "ICQClient::ssiStartTransaction");
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_EDIT, true, false);
+ sendPacket(true);
+}
+
+void ICQClient::ssiEndTransaction()
+{
+ log(L_DEBUG, "ICQClient::ssiEndTransaction");
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_SAVE, true, false);
+ sendPacket(true);
+}
+
+unsigned short ICQClient::ssiAddBuddy(QString& screen, unsigned short group_id, unsigned short buddy_id, unsigned short buddy_type, TlvList* tlvs)
+{
+ log(L_DEBUG, "ICQClient::ssiAddBuddy");
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_CREATE, true, false);
+ QCString utfscreen = screen.utf8();
+ socket()->writeBuffer() << (unsigned short)utfscreen.length();
+ socket()->writeBuffer().pack(utfscreen.data(), utfscreen.length());
+ socket()->writeBuffer() << group_id << buddy_id << buddy_type;
+ if(!tlvs)
+ {
+ socket()->writeBuffer() << (unsigned short) 0x0000;
+ }
+ else
+ {
+ socket()->writeBuffer() << *tlvs;
+ }
+ sendPacket(true);
+ return m_nMsgSequence;
+}
+
+unsigned short ICQClient::ssiDeleteBuddy(QString& screen, unsigned short group_id, unsigned short buddy_id, unsigned short buddy_type, TlvList* tlvs)
+{
+ log(L_DEBUG, "ICQClient::ssiDeleteBuddy");
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_DELETE, true, false);
+ QCString utfscreen = screen.utf8();
+ socket()->writeBuffer() << (unsigned short)utfscreen.length();
+ socket()->writeBuffer().pack(utfscreen.data(), utfscreen.length());
+ socket()->writeBuffer() << group_id << buddy_id << buddy_type;
+ if(!tlvs)
+ {
+ socket()->writeBuffer() << (unsigned short)0x0000;
+ }
+ else
+ {
+ socket()->writeBuffer() << *tlvs;
+ }
+ sendPacket(true);
+ return m_nMsgSequence;
+}
+
+void ICQClient::getGroupIDs(unsigned short group_id, ICQBuffer* buf)
+{
+ if(!buf)
+ return;
+ ContactList::ContactIterator it;
+ Contact* contact;
+ ICQUserData *data;
+ while((contact = ++it) != NULL)
+ {
+ ClientDataIterator it(contact->clientData, this);
+ data = toICQUserData(++it);
+ if(!data)
+ continue;
+ if(data->GrpId.toULong() == group_id)
+ {
+ (*buf) << (unsigned short)data->IcqID.toULong();
+ }
+ }
+}
+
+unsigned short ICQClient::ssiAddToGroup(QString& groupname, unsigned short buddy_id, unsigned short group_id)
+{
+ QCString sName = groupname.utf8();
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_UPDATE, true, false);
+ socket()->writeBuffer() << (unsigned short)sName.length();
+ socket()->writeBuffer().pack(sName.data(), sName.length());
+ socket()->writeBuffer() << group_id << (unsigned short)0x0000 << (unsigned short)0x0001;
+ ICQBuffer b;
+ getGroupIDs(group_id, &b);
+ b << buddy_id;
+ TlvList tlvs;
+ tlvs += new Tlv(TLV_SUBITEMS, b.writePos(), b.data());
+ socket()->writeBuffer() << tlvs;
+ sendPacket(true);
+ return m_nMsgSequence;
+
+}
+
+unsigned short ICQClient::ssiRemoveFromGroup(QString& groupname, unsigned short buddy_id, unsigned short group_id)
+{
+ ContactList::ContactIterator it;
+ Contact* contact;
+ ICQUserData *data;
+ while((contact = ++it) != NULL)
+ {
+ ClientDataIterator it(contact->clientData, this);
+ data = toICQUserData(++it);
+ if(!data)
+ continue;
+ if(data->IcqID.toULong() == buddy_id)
+ {
+ data->GrpId.setULong(0);
+ break;
+ }
+ }
+
+ QCString sName = groupname.utf8();
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_UPDATE, true, false);
+ socket()->writeBuffer() << (unsigned short)sName.length();
+ socket()->writeBuffer().pack(sName.data(), sName.length());
+ socket()->writeBuffer() << group_id << (unsigned short)0x0000 << (unsigned short)0x0001;
+ ICQBuffer b;
+ getGroupIDs(group_id, &b);
+ TlvList tlvs;
+ tlvs += new Tlv(TLV_SUBITEMS, b.writePos(), b.data());
+ socket()->writeBuffer() << tlvs;
+ sendPacket(true);
+ return m_nMsgSequence;
+}
+
unsigned short ICQClient::sendRoster(unsigned short cmd, const QString &name, unsigned short grp_id,
unsigned short usr_id, unsigned short subCmd, TlvList *tlv)
{
+ log(L_DEBUG, "ICQClient::sendRoster");
// start edit SSI
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_EDIT);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_EDIT, true, false);
sendPacket(true);
- snac(ICQ_SNACxFOOD_LISTS, cmd, true);
+ snac(ICQ_SNACxFOOD_LISTS, cmd, true, false);
QCString sName = name.utf8();
socket()->writeBuffer().pack(static_cast<unsigned short>( htons(sName.length()) ) );
socket()->writeBuffer().pack(sName.data(), sName.length());
@@ -1096,7 +1259,7 @@
void ICQClient::sendRosterGrp(const QString &name, unsigned short grpId, unsigned short usrId)
{
QCString sName = name.utf8();
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_UPDATE, true);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_UPDATE, true, false);
socket()->writeBuffer().pack(sName.data(), sName.length());
socket()->writeBuffer()
<< grpId
@@ -1193,24 +1356,45 @@
grp_id = grp_data->IcqID.toULong();
}
}
- if (data->GrpId.toULong() != grp_id){
- if (grp_id){
- if (data->GrpId.toULong() == 0){
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_FUTURE_AUTH);
+ if (data->GrpId.toULong() != grp_id)
+ {
+ if (grp_id)
+ {
+ if (data->GrpId.toULong() == 0)
+ {
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_FUTURE_AUTH, true, false);
socket()->writeBuffer().packScreen(screen(data));
socket()->writeBuffer() << 0x00000000L;
+ data->WaitAuth.setBool(true);
sendPacket(true);
}
if (data->IcqID.toULong() == 0)
data->IcqID.asULong() = getListId();
TlvList *tlv = createListTlv(data, contact);
+ /*
if (data->GrpId.toULong())
seq = sendRoster(ICQ_SNACxLISTS_DELETE, QString::null, data->GrpId.toULong(), data->IcqID.toULong());
+ */
+ QString name = screen(data);
+ QString groupname = group->getName();
+ ssiStartTransaction();
+ if(data->GrpId.toULong())
+ {
+ seq = ssiDeleteBuddy(name, data->GrpId.toULong(), data->IcqID.toULong(), 0, tlv);
+ }
+ seq = ssiAddBuddy(name, grp_id, (unsigned short) data->IcqID.toULong(), 0, tlv);
+ ssiAddToGroup(groupname, data->IcqID.toULong(), grp_id);
+ data->GrpId.setULong(grp_id);
+ //ssiEndTransaction();
+ /*
seq = sendRoster(ICQ_SNACxLISTS_CREATE, screen(data), grp_id, data->IcqID.toULong(), 0, tlv);
sendRosterGrp(group->getName(), grp_id, data->IcqID.toULong());
+ */
log(L_DEBUG, "%s move to group %s", userStr(contact, data).local8Bit().data(), (const char*)group->getName().local8Bit());
m_listRequest = new ContactServerRequest(seq, screen(data), data->IcqID.toULong(), grp_id, tlv);
- }else{
+ }
+ else
+ {
log(L_DEBUG, "%s remove from contact list", userStr(contact, data).local8Bit().data());
seq = sendRoster(ICQ_SNACxLISTS_DELETE, QString::null, data->GrpId.toULong(), data->IcqID.toULong());
m_listRequest = new ContactServerRequest(seq, screen(data), 0, 0);
@@ -1228,6 +1412,9 @@
}
break;
case LIST_USER_DELETED:
+ data = findContact(lr.screen, NULL, false, contact);
+ if (data == NULL)
+ break;
if (lr.visible_id){
log(L_DEBUG, "%s remove from visible list", lr.screen.local8Bit().data());
seq = sendRoster(ICQ_SNACxLISTS_DELETE, lr.screen, 0, lr.visible_id, ICQ_VISIBLE_LIST);
@@ -1247,8 +1434,19 @@
break;
}
if (lr.screen.length() && lr.grp_id){
+ group = getContacts()->group(contact->getGroup());
+ QString groupname = group->getName();
+ /*
+ if(group)
+ {
+ ICQUserData *grp_data = toICQUserData((SIM::clientData*)group->clientData.getData(this)); // FIXME unsafe type conversion
+ if(grp_data)
+ grp_id = grp_data->IcqID.toULong();
+ }
+ */
log(L_DEBUG, "%s remove from contact list", lr.screen.local8Bit().data());
seq = sendRoster(ICQ_SNACxLISTS_DELETE, QString::null, lr.grp_id, lr.icq_id);
+ seq = ssiRemoveFromGroup(groupname, lr.icq_id, lr.grp_id);
m_listRequest = new ContactServerRequest(seq, lr.screen, 0, 0);
}
break;
@@ -1500,14 +1698,17 @@
return false;
ICQUserData *data = toICQUserData((SIM::clientData*)_data); // FIXME unsafe type conversion
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_REQUEST_AUTH);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_REQUEST_AUTH, true, false);
socket()->writeBuffer().packScreen(screen(data));
QCString message;
QString charset;
- if (hasCap(data, CAP_RTF) || hasCap(data, CAP_UTF)){
+ if (hasCap(data, CAP_RTF) || hasCap(data, CAP_UTF))
+ {
message = msg->getPlainText().utf8();
charset = "utf-8";
- }else{
+ }
+ else
+ {
message = getContacts()->fromUnicode(NULL, msg->getPlainText());
}
socket()->writeBuffer()
@@ -1539,7 +1740,7 @@
ICQUserData *data = toICQUserData((SIM::clientData*)_data); // FIXME unsafe type conversion
data->WantAuth.asBool() = false;
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_AUTHxSEND);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_AUTHxSEND, true, false);
socket()->writeBuffer().packScreen(screen(data));
socket()->writeBuffer()
<< (char)0x01
@@ -1560,7 +1761,7 @@
ICQUserData *data = toICQUserData((SIM::clientData*)_data); // FIXME unsafe type conversion
data->WantAuth.asBool() = false;
- snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_AUTHxSEND);
+ snac(ICQ_SNACxFOOD_LISTS, ICQ_SNACxLISTS_AUTHxSEND, true, false);
socket()->writeBuffer().packScreen(screen(data));
QCString message;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqmessage.cpp
^
|
@@ -47,6 +47,7 @@
: FileMessage(MessageFile, cfg)
{
load_data(aimFileMessageData, &data, cfg);
+ isProxy = false;
}
AIMFileMessage::~AIMFileMessage()
@@ -251,6 +252,7 @@
return m;
}
+//ToDo: Send Contacts does not work
static Message *parseContactMessage(const QCString &str)
{
QValueList<QCString> l;
@@ -398,7 +400,11 @@
unsigned long fileSize;
b.unpack(fileSize);
ICQFileMessage *m = new ICQFileMessage;
+#ifdef __OS2__ // to make it compileable under OS/2 (gcc 3.3.5)
+ m->setServerDescr(fileName.c_str());
+#else
m->setServerDescr(fileName);
+#endif
m->setServerText(QCString(fileDescr.data()));
m->setSize(fileSize);
m->setPort(port);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqmessage.h
^
|
@@ -113,6 +113,8 @@
PROP_ULONG(ID_L);
PROP_ULONG(ID_H);
virtual unsigned baseType() { return SIM::MessageFile; }
+ bool isProxy;
+ uint16_t cookie2;
protected:
AIMFileMessageData data;
};
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqsecure.cpp
^
|
@@ -82,7 +82,7 @@
m_client->setDirectMode(mode);
}
if (bStatusChanged && (m_client->getState() == Client::Connected))
- m_client->sendStatus();
+ m_client->snacService()->sendStatus();
m_client->setIgnoreAuth(chkIgnoreAuth->isChecked());
m_client->setUseMD5(chkUseMD5->isChecked());
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqservice.cpp
^
|
@@ -30,6 +30,7 @@
#include "log.h"
#include "icqclient.h"
+#include "icqservice.h"
using namespace std;
using namespace SIM;
@@ -59,324 +60,380 @@
const unsigned short ICQ_SNACxSRV_SETxSTATUS = 0x001E;
const unsigned short ICQ_SNACxSRV_EXT_STATUS = 0x0021;
-void ICQClient::snac_service(unsigned short type, unsigned short)
+SnacIcqService::SnacIcqService(ICQClient* client) : SnacHandler(client, 0x0001)
{
- switch (type){
- case ICQ_SNACxSRV_PAUSE:
- log(L_DEBUG, "Server pause");
- m_bNoSend = true;
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_PAUSExACK);
- socket()->writeBuffer() << ICQ_SNACxFOOD_SERVICE
- << ICQ_SNACxFOOD_LOCATION
- << ICQ_SNACxFOOD_BUDDY
- << ICQ_SNACxFOOD_MESSAGE
- << ICQ_SNACxFOOD_BOS
- << ICQ_SNACxFOOD_PING
- << ICQ_SNACxFOOD_LISTS
- << ICQ_SNACxFOOD_VARIOUS
- << ICQ_SNACxFOOD_LOGIN;
- sendPacket(true);
- break;
- case ICQ_SNACxSRV_RESUME:
- log(L_DEBUG, "Server resume");
- m_bNoSend = false;
- processSendQueue();
- break;
- case ICQ_SNACxSRV_MIGRATE:{
- log(L_DEBUG, "Server migrate");
- m_bNoSend = true;
- int i;
- unsigned short cnt;
- unsigned short food[0x17];
-
- socket()->readBuffer() >> cnt;
- for (i = 0; i < cnt; i++) {
- socket()->readBuffer() >> food[i];
- }
- TlvList tlv(socket()->readBuffer());
- Tlv *tlv_adr = tlv(0x05);
- Tlv *tlv_cookie = tlv(0x06);
- for (; i >= 0; i--) {
- setServiceSocket(tlv_adr,tlv_cookie,food[i]);
- }
- break;
- }
- case ICQ_SNACxSRV_RATExCHANGE:{
- const char *msg_text = NULL;
- unsigned short msg_code;
- unsigned short class_id;
- unsigned long window_size;
- unsigned long clear_level;
- unsigned long alert_level;
- unsigned long limit_level;
- unsigned long discon_level;
- unsigned long current_level;
- unsigned long max_level;
- unsigned long last_send;
- char current_state;
- socket()->readBuffer() >> msg_code
- >> class_id
- >> window_size
- >> clear_level
- >> alert_level
- >> limit_level
- >> discon_level
- >> current_level
- >> max_level
- >> last_send
- >> current_state;
- if (type == ICQ_SNACxSRV_RATExCHANGE){
- switch (msg_code) {
- case 0x0001:
- msg_text = "Rate limits parameters changed";
- break;
- case 0x0002:
- msg_text = "Rate limits warning";
- break;
- case 0x0003:
- msg_text = "Rate limit hit";
- break;
- case 0x0004:
- msg_text = "Rate limit clear";
- break;
- default:
- msg_text = "Unknown";
- }
- log(L_DEBUG, "%s", msg_text);
- }
- log(L_DEBUG, "grp: %02X, ws: %04lX, cl %04lX, al %04lX, ll %04lX, dl: %04lX, cur %04lX, ml %04lX",
- class_id,window_size,clear_level,alert_level,limit_level,discon_level,
- current_level,max_level);
- if (--class_id < m_rates.size()){
- RateInfo &r = m_rates[class_id];
- r.m_winSize = window_size;
- r.m_maxLevel = max_level;
- r.m_minLevel = alert_level;
- r.m_curLevel = current_level;
- r.m_lastSend = QDateTime::currentDateTime();
- processSendQueue();
- }
- break;
- }
- case ICQ_SNACxSRV_RATExINFO: {
- bool bNew = m_rates.size() == 0;
- m_rates.clear();
- unsigned short n_rates;
- socket()->readBuffer() >> n_rates;
- unsigned n;
- for (n = 0; n < n_rates; n++){
- unsigned short class_id;
- unsigned long window_size;
- unsigned long clear_level;
- unsigned long alert_level;
- unsigned long limit_level;
- unsigned long discon_level;
- unsigned long current_level;
- unsigned long max_level;
- unsigned long last_send;
- char current_state;
- socket()->readBuffer()
- >> class_id
- >> window_size
- >> clear_level
- >> alert_level
- >> limit_level
- >> discon_level
- >> current_level
- >> max_level
- >> last_send
- >> current_state;
- log(L_DEBUG, "grp: %02X, ws: %04lX, cl %04lX, al %04lX, ll %04lX, dl: %04lX, cur %04lX, ml %04lX, cs: %d",
- class_id,window_size,clear_level,alert_level,limit_level,discon_level,
- current_level,max_level, current_state);
- RateInfo r;
- r.m_winSize = window_size;
- r.m_minLevel = alert_level;
- r.m_maxLevel = max_level;
- r.m_curLevel = current_level;
- r.m_lastSend = QDateTime::currentDateTime();
- m_rates.push_back(r);
- }
- for (n = 0; n < n_rates; n++){
- unsigned short class_id;
- unsigned short pairs;
- socket()->readBuffer()
- >> class_id
- >> pairs;
- class_id--;
- for (unsigned i = 0; i < pairs; i++){
- unsigned long snac;
- socket()->readBuffer() >> snac;
- if (class_id >= m_rates.size())
- continue;
- RATE_MAP::iterator it = m_rate_grp.find(snac);
- if (it != m_rate_grp.end())
- continue;
- m_rate_grp.insert(RATE_MAP::value_type(snac, class_id));
- }
- }
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_RATExACK);
- socket()->writeBuffer() << 0x00010002L << 0x00030004L << 0x0005;
- sendPacket(true);
- if(!bNew)
- break;
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_GETxUSERxINFO);
- sendPacket(true);
- listsRequest();
- locationRequest();
- buddyRequest();
- icmbRequest();
- bosRequest();
- }
- break;
- case ICQ_SNACxSRV_MOTD:
- break;
- case ICQ_SNACxSRV_ACKxIMxICQ:
- requestRateInfo();
- break;
- case ICQ_SNACxSRV_EXT_STATUS: {
- QByteArray shash(16);
- unsigned short nType;
- char flags, size;
-
- socket()->readBuffer() >> nType;
- if(nType == 0) // SSBI ready
- break;
- if(nType == 2) // iChat message
- break;
-
- socket()->readBuffer() >> flags >> size;
- shash.resize(size);
- socket()->readBuffer().unpack(shash.data(), shash.size());
-
- QImage img(getPicture());
- if(img.isNull())
- break;
-
- QByteArray ba;
- QBuffer buf(ba);
- if(!buf.open(IO_WriteOnly)) {
- log(L_ERROR, "Can't open QByteArray for writing!");
- break;
- }
- if(!img.save(&buf, "JPEG")) {
- log(L_ERROR, "Can't save QImage to QBuffer");
- break;
- }
- buf.close();
- QByteArray hash = md5(ba.data(), ba.size());
-
- if(hash != shash) {
- log(L_WARN, "The buddyIcon on server does not match the local one - updating");
- uploadBuddy(&data.owner);
- break;
- }
- uploadBuddyIcon(1, img);
- }
- break;
- case ICQ_SNACxSRV_NAMExINFO:{
- QString screen = socket()->readBuffer().unpackScreen();
- if (screen.length() == 0){
- char n;
- socket()->readBuffer() >> n;
- socket()->readBuffer().incReadPos(n);
- screen = socket()->readBuffer().unpackScreen();
- }
- if (screen.toULong() != data.owner.Uin.toULong()){
- log(L_WARN, "Not my name info (%s)", screen.latin1());
- break;
- }
- socket()->readBuffer().incReadPos(4);
- TlvList tlv(socket()->readBuffer());
- Tlv *tlvIP = tlv(0x000A);
- if (tlvIP)
- set_ip(&data.owner.IP, htonl((uint32_t)(*tlvIP)));
- break;
- }
- case ICQ_SNACxSRV_SERVICExRESP:{
- TlvList tlv(socket()->readBuffer());
- Tlv *tlv_id = tlv(0x0D);
- if (!tlv_id){
- log(L_WARN, "No service id in response");
- break;
- }
- Tlv *tlv_adr = tlv(0x05);
- Tlv *tlv_cookie = tlv(0x06);
- setServiceSocket(tlv_adr,tlv_cookie,(uint16_t)(*tlv_id));
- break;
- }
- case ICQ_SNACxSRV_READYxSERVER:
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_IMxICQ);
- if (m_bAIM){
- socket()->writeBuffer()
- << 0x00010003L
- << 0x00130003L
- << 0x00020001L
- << 0x00030001L
- << 0x00040001L
- << 0x00060001L
- << 0x00080001L
- << 0x00090001L
- << 0x000A0001L
- << 0x000B0001L;
- }else{
- socket()->writeBuffer()
- << 0x00010004L
- << 0x00130004L
- << 0x00020001L
- << 0x00030001L
- << 0x00150001L
- << 0x00040001L
- << 0x00060001L
- << 0x00090001L
- << 0x000A0001L
- << 0x000B0001L;
- }
- sendPacket(true);
- break;
- case ICQ_SNACxSRV_ERROR:
- break;
- case ICQ_SNACxSRV_EVIL:{
- unsigned short level;
- socket()->readBuffer().unpack(level);
- QString from = socket()->readBuffer().unpackScreen();
- data.owner.WarningLevel.asULong() = level;
- if (from.isEmpty())
- from = i18n("anonymous");
- EventError::ClientErrorData d;
- d.client = this;
- d.code = 0;
- d.err_str = I18N_NOOP("You've been warned by %1");
- d.args = from;
- d.flags = EventError::ClientErrorData::E_INFO;
- d.options = NULL;
- d.id = CmdShowWarning;
- EventClientError e(d);
- e.process();
- break;
+}
+
+SnacIcqService::~SnacIcqService()
+{
+}
+
+bool SnacIcqService::process(unsigned short subtype, ICQBuffer* buf)
+{
+ switch (subtype)
+ {
+ case ICQ_SNACxSRV_PAUSE:
+ log(L_DEBUG, "Server pause");
+ m_client->m_bNoSend = true;
+ m_client->snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_PAUSExACK);
+ m_client->socket()->writeBuffer() << ICQ_SNACxFOOD_SERVICE
+ << ICQ_SNACxFOOD_LOCATION
+ << ICQ_SNACxFOOD_BUDDY
+ << ICQ_SNACxFOOD_MESSAGE
+ << ICQ_SNACxFOOD_BOS
+ << ICQ_SNACxFOOD_PING
+ << ICQ_SNACxFOOD_LISTS
+ << ICQ_SNACxFOOD_VARIOUS
+ << ICQ_SNACxFOOD_LOGIN;
+ m_client->sendPacket(true);
+ break;
+ case ICQ_SNACxSRV_RESUME:
+ log(L_DEBUG, "Server resume");
+ m_client->m_bNoSend = false;
+ m_client->processSendQueue();
+ break;
+ case ICQ_SNACxSRV_MIGRATE:
+ {
+ log(L_DEBUG, "Server migrate");
+ m_client->m_bNoSend = true;
+ int i;
+ unsigned short cnt;
+ unsigned short food[0x17];
+
+ *buf >> cnt;
+ for(i = 0; i < cnt; i++)
+ {
+ *buf >> food[i];
+ }
+ TlvList tlv(*buf);
+ Tlv *tlv_adr = tlv(0x05);
+ Tlv *tlv_cookie = tlv(0x06);
+ for(; i >= 0; i--)
+ {
+
+ setServiceSocket(tlv_adr,tlv_cookie,food[i]);
+ }
+ break;
+ }
+ case ICQ_SNACxSRV_RATExCHANGE:
+ {
+ const char *msg_text = NULL;
+ unsigned short msg_code;
+ unsigned short class_id;
+ unsigned long window_size;
+ unsigned long clear_level;
+ unsigned long alert_level;
+ unsigned long limit_level;
+ unsigned long discon_level;
+ unsigned long current_level;
+ unsigned long max_level;
+ unsigned long last_send;
+ char current_state;
+ *buf >> msg_code
+ >> class_id
+ >> window_size
+ >> clear_level
+ >> alert_level
+ >> limit_level
+ >> discon_level
+ >> current_level
+ >> max_level
+ >> last_send
+ >> current_state;
+ if(subtype == ICQ_SNACxSRV_RATExCHANGE)
+ {
+ switch (msg_code)
+ {
+ case 0x0001:
+ msg_text = "Rate limits parameters changed";
+ break;
+ case 0x0002:
+ msg_text = "Rate limits warning";
+ break;
+ case 0x0003:
+ msg_text = "Rate limit hit";
+ break;
+ case 0x0004:
+ msg_text = "Rate limit clear";
+ break;
+ default:
+ msg_text = "Unknown";
+ }
+ log(L_DEBUG, "%s", msg_text);
+ }
+ log(L_DEBUG, "grp: %02X, ws: %04lX, cl %04lX, al %04lX, ll %04lX, dl: %04lX, cur %04lX, ml %04lX",
+ class_id,window_size,clear_level,alert_level,limit_level,discon_level,
+ current_level,max_level);
+ if (--class_id < m_client->m_rates.size()){
+ RateInfo &r = m_client->m_rates[class_id];
+ r.m_winSize = window_size;
+ r.m_maxLevel = max_level;
+ r.m_minLevel = alert_level;
+ r.m_curLevel = current_level;
+ r.m_lastSend = QDateTime::currentDateTime();
+ m_client->processSendQueue();
+ }
+ break;
+ }
+ case ICQ_SNACxSRV_RATExINFO:
+ {
+ bool bNew = m_client->m_rates.size() == 0;
+ m_client->m_rates.clear();
+ unsigned short n_rates;
+ *buf >> n_rates;
+ unsigned n;
+ for(n = 0; n < n_rates; n++)
+ {
+ unsigned short class_id;
+ unsigned long window_size;
+ unsigned long clear_level;
+ unsigned long alert_level;
+ unsigned long limit_level;
+ unsigned long discon_level;
+ unsigned long current_level;
+ unsigned long max_level;
+ unsigned long last_send;
+ char current_state;
+ *buf >> class_id
+ >> window_size
+ >> clear_level
+ >> alert_level
+ >> limit_level
+ >> discon_level
+ >> current_level
+ >> max_level
+ >> last_send
+ >> current_state;
+ log(L_DEBUG, "grp: %02X, ws: %04lX, cl %04lX, al %04lX, ll %04lX, dl: %04lX, cur %04lX, ml %04lX, cs: %d",
+ class_id,window_size,clear_level,alert_level,limit_level,discon_level,
+ current_level,max_level, current_state);
+ RateInfo r;
+ r.m_winSize = window_size;
+ r.m_minLevel = alert_level;
+ r.m_maxLevel = max_level;
+ r.m_curLevel = current_level;
+ r.m_lastSend = QDateTime::currentDateTime();
+ m_client->m_rates.push_back(r);
+ }
+ for(n = 0; n < n_rates; n++)
+ {
+ unsigned short class_id;
+ unsigned short pairs;
+ *buf >> class_id
+ >> pairs;
+ class_id--;
+ for(unsigned i = 0; i < pairs; i++)
+ {
+ unsigned long snac;
+ *buf >> snac;
+ if(class_id >= m_client->m_rates.size())
+ continue;
+ RATE_MAP::iterator it = m_client->m_rate_grp.find(snac);
+ if (it != m_client->m_rate_grp.end())
+ continue;
+ m_client->m_rate_grp.insert(RATE_MAP::value_type(snac, class_id));
+ }
+ }
+ m_client->snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_RATExACK);
+ m_client->socket()->writeBuffer() << 0x00010002L << 0x00030004L << 0x0005;
+ m_client->sendPacket(true);
+ if(!bNew)
+ break;
+ m_client->snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_GETxUSERxINFO);
+ m_client->sendPacket(true);
+ m_client->listsRequest();
+ m_client->locationRequest();
+ m_client->buddyRequest();
+ m_client->icmbRequest();
+ m_client->bosRequest();
+ }
+ break;
+ case ICQ_SNACxSRV_MOTD:
+ break;
+ case ICQ_SNACxSRV_ACKxIMxICQ:
+ requestRateInfo();
+ break;
+ case ICQ_SNACxSRV_EXT_STATUS:
+ {
+ QByteArray shash(16);
+ unsigned short nType;
+ char flags, size;
+
+ *buf >> nType;
+ if(nType == 0) // SSBI ready
+ break;
+ if(nType == 2) // iChat message
+ break;
+
+ *buf >> flags >> size;
+ shash.resize(size);
+ buf->unpack(shash.data(), shash.size());
+
+ QImage img(m_client->getPicture());
+ if(img.isNull())
+ break;
+
+ QByteArray ba;
+ QBuffer l_buf(ba);
+ if(!l_buf.open(IO_WriteOnly)) {
+ log(L_ERROR, "Can't open QByteArray for writing!");
+ break;
+ }
+ if(!img.save(&l_buf, "JPEG")) {
+ log(L_ERROR, "Can't save QImage to QBuffer");
+ break;
+ }
+ l_buf.close();
+ QByteArray hash = md5(ba.data(), ba.size());
+
+ if(hash != shash) {
+ log(L_WARN, "The buddyIcon on server does not match the local one - updating");
+ m_client->uploadBuddy(&m_client->data.owner);
+ break;
+ }
+ m_client->uploadBuddyIcon(1, img);
+ }
+ break;
+ case ICQ_SNACxSRV_NAMExINFO:
+ {
+ QString screen = buf->unpackScreen();
+ if(screen.length() == 0){
+ char n;
+ *buf >> n;
+ buf->incReadPos(n);
+ screen = buf->unpackScreen();
+ }
+ if (screen.toULong() != m_client->data.owner.Uin.toULong()){
+ log(L_WARN, "Not my name info (%s)", screen.latin1());
+ break;
+ }
+ buf->incReadPos(4);
+ TlvList tlv(*buf);
+ Tlv *tlvIP = tlv(0x000A);
+ if (tlvIP)
+ set_ip(&m_client->data.owner.IP, htonl((uint32_t)(*tlvIP)));
+ break;
+ }
+ case ICQ_SNACxSRV_SERVICExRESP:
+ {
+ TlvList tlv(*buf);
+ Tlv *tlv_id = tlv(0x0D);
+ if (!tlv_id){
+ log(L_WARN, "No service id in response");
+ break;
+ }
+ Tlv *tlv_adr = tlv(0x05);
+ Tlv *tlv_cookie = tlv(0x06);
+ setServiceSocket(tlv_adr,tlv_cookie,(uint16_t)(*tlv_id));
+ break;
+ }
+ case ICQ_SNACxSRV_READYxSERVER:
+ m_client->snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_IMxICQ);
+ if (m_client->m_bAIM){
+ m_client->socket()->writeBuffer()
+ << 0x00010003L
+ << 0x00130003L
+ << 0x00020001L
+ << 0x00030001L
+ << 0x00040001L
+ << 0x00060001L
+ << 0x00080001L
+ << 0x00090001L
+ << 0x000A0001L
+ << 0x000B0001L;
+ }else{
+ m_client->socket()->writeBuffer()
+ << 0x00010004L
+ << 0x00130004L
+ << 0x00020001L
+ << 0x00030001L
+ << 0x00150001L
+ << 0x00040001L
+ << 0x00060001L
+ << 0x00090001L
+ << 0x000A0001L
+ << 0x000B0001L;
+ }
+ m_client->sendPacket(true);
+ break;
+ case ICQ_SNACxSRV_ERROR:
+ break;
+ case ICQ_SNACxSRV_EVIL:
+ {
+ unsigned short level;
+ buf->unpack(level);
+ QString from = buf->unpackScreen();
+ m_client->data.owner.WarningLevel.asULong() = level;
+ if (from.isEmpty())
+ from = i18n("anonymous");
+ EventError::ClientErrorData d;
+ d.client = m_client;
+ d.code = 0;
+ d.err_str = I18N_NOOP("You've been warned by %1");
+ d.args = from;
+ d.flags = EventError::ClientErrorData::E_INFO;
+ d.options = NULL;
+ d.id = CmdShowWarning;
+ EventClientError e(d);
+ e.process();
+ break;
+ }
+ default:
+ log(L_WARN, "Unknown service foodgroup type %04X", subtype);
+ }
+ return true;
+}
+
+void SnacIcqService::requestRateInfo()
+{
+ m_client->snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_REQxRATExINFO);
+ m_client->sendPacket(true);
+}
+
+void SnacIcqService::addService(ServiceSocket* s)
+{
+ m_services.push_back(s);
+}
+
+void SnacIcqService::deleteService(ServiceSocket* s)
+{
+ for(std::list<ServiceSocket*>::iterator it = m_services.begin(); it != m_services.end(); ++it)
+ {
+ if((*it) == s)
+ {
+ m_services.erase(it);
+ break;
+ }
+ }
+}
+
+ServiceSocket* SnacIcqService::getService(unsigned short id)
+{
+ for(std::list<ServiceSocket*>::iterator it = m_services.begin(); it != m_services.end(); ++it)
+ {
+ if((*it)->id() == id)
+ {
+ return (*it);
}
- default:
- log(L_WARN, "Unknown service foodgroup type %04X", type);
}
+ log(L_WARN, "Service not found");
+ return NULL;
}
-void ICQClient::requestRateInfo()
+void SnacIcqService::clearServices()
{
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_REQxRATExINFO);
- sendPacket(true);
+ while(!m_services.empty())
+ {
+ ServiceSocket *s = m_services.front();
+ delete s;
+ }
}
-void ICQClient::setServiceSocket(Tlv *tlv_addr, Tlv *tlv_cookie, unsigned short service)
+void SnacIcqService::setServiceSocket(Tlv *tlv_addr, Tlv *tlv_cookie, unsigned short service)
{
- ServiceSocket *s = NULL;
- for (list<ServiceSocket*>::iterator it = m_services.begin(); it != m_services.end(); ++it){
- if ((*it)->id() == service){
- s = *it;
- break;
- }
- }
- if (!s){
- log(L_WARN, "Service not found");
+ ServiceSocket *s = getService(service);
+ if(!s)
+ {
return;
}
if (!tlv_addr){
@@ -387,7 +444,7 @@
s->error_state("No cookie for service", 0);
return;
}
- unsigned short port = getPort();
+ unsigned short port = m_client->getPort();
QCString addr(tlv_addr->byteArray());
int idx = addr.find(':');
if(idx != -1) {
@@ -400,10 +457,11 @@
ba.resize(ba.size()-1);
s->connect(addr, port, ba);
}
-void ICQClient::sendClientReady()
+
+void SnacIcqService::sendClientReady()
{
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_READYxCLIENT);
- socket()->writeBuffer()
+ snac(ICQ_SNACxSRV_READYxCLIENT);
+ m_client->socket()->writeBuffer()
<< 0x00010004L << 0x011008E4L
<< 0x00130004L << 0x011008E4L
<< 0x00020001L << 0x011008E4L
@@ -415,152 +473,153 @@
<< 0x000A0001L << 0x011008E4L
<< 0x000B0001L << 0x011008E4L;
- sendPacket(true);
+ m_client->sendPacket(true);
}
-void ICQClient::sendLogonStatus()
+void SnacIcqService::sendLogonStatus()
{
- if (getInvisible())
- sendInvisible(false);
- sendContactList();
+ if (m_client->getInvisible())
+ m_client->sendInvisible(false);
+ m_client->sendContactList();
time_t now = time(NULL);
- if (data.owner.PluginInfoTime.toULong() == 0)
- data.owner.PluginInfoTime.asULong() = now;
- if (data.owner.PluginStatusTime.toULong() == 0)
- data.owner.PluginStatusTime.asULong() = now;
- if (data.owner.InfoUpdateTime.toULong() == 0)
- data.owner.InfoUpdateTime.asULong() = now;
- data.owner.OnlineTime.asULong() = now;
- if (getContacts()->owner()->getPhones() != data.owner.PhoneBook.str()){
- data.owner.PhoneBook.str() = getContacts()->owner()->getPhones();
- data.owner.PluginInfoTime.asULong() = now;
- }
- if (getPicture() != data.owner.Picture.str()){
- data.owner.Picture.str() = getPicture();
- data.owner.PluginInfoTime.asULong() = now;
- }
- if (getContacts()->owner()->getPhoneStatus() != data.owner.FollowMe.toULong()){
- data.owner.FollowMe.asULong() = getContacts()->owner()->getPhoneStatus();
- data.owner.PluginStatusTime.asULong() = now;
+ if (m_client->data.owner.PluginInfoTime.toULong() == 0)
+ m_client->data.owner.PluginInfoTime.asULong() = now;
+ if (m_client->data.owner.PluginStatusTime.toULong() == 0)
+ m_client->data.owner.PluginStatusTime.asULong() = now;
+ if (m_client->data.owner.InfoUpdateTime.toULong() == 0)
+ m_client->data.owner.InfoUpdateTime.asULong() = now;
+ m_client->data.owner.OnlineTime.asULong() = now;
+ if (getContacts()->owner()->getPhones() != m_client->data.owner.PhoneBook.str())
+ {
+ m_client->data.owner.PhoneBook.str() = getContacts()->owner()->getPhones();
+ m_client->data.owner.PluginInfoTime.asULong() = now;
+ }
+ if (m_client->getPicture() != m_client->data.owner.Picture.str()){
+ m_client->data.owner.Picture.str() = m_client->getPicture();
+ m_client->data.owner.PluginInfoTime.asULong() = now;
+ }
+ if (getContacts()->owner()->getPhoneStatus() != m_client->data.owner.FollowMe.toULong()){
+ m_client->data.owner.FollowMe.asULong() = getContacts()->owner()->getPhoneStatus();
+ m_client->data.owner.PluginStatusTime.asULong() = now;
}
ICQBuffer directInfo(25);
fillDirectInfo(directInfo);
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxSTATUS);
- socket()->writeBuffer().tlv(0x0006, fullStatus(m_logonStatus));
- socket()->writeBuffer().tlv(0x0008, (unsigned short)0);
- socket()->writeBuffer().tlv(0x000C, directInfo);
- socket()->writeBuffer().tlv(0x001f, (unsigned short)0);
-
- sendPacket(true);
- if (!getInvisible())
- sendInvisible(true);
+ snac(ICQ_SNACxSRV_SETxSTATUS);
+ m_client->socket()->writeBuffer().tlv(0x0006, m_client->getFullStatus());
+ m_client->socket()->writeBuffer().tlv(0x0008, (unsigned short)0);
+ m_client->socket()->writeBuffer().tlv(0x000C, directInfo);
+ m_client->socket()->writeBuffer().tlv(0x001f, (unsigned short)0);
+
+ m_client->sendPacket(true);
+ if (!m_client->getInvisible())
+ m_client->sendInvisible(true);
sendIdleTime();
- m_status = m_logonStatus;
+ m_client->m_status = m_client->m_logonStatus;
}
-void ICQClient::setInvisible()
+void SnacIcqService::setInvisible()
{
- if (getInvisible())
- sendInvisible(false);
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxSTATUS);
- socket()->writeBuffer().tlv(0x0006, fullStatus(m_status));
- sendPacket(true);
- if (!getInvisible())
- sendInvisible(true);
+ if(m_client->getInvisible())
+ m_client->sendInvisible(false);
+ snac(ICQ_SNACxSRV_SETxSTATUS);
+ m_client->socket()->writeBuffer().tlv(0x0006, m_client->getFullStatus());
+ m_client->sendPacket(true);
+ if (!m_client->getInvisible())
+ m_client->sendInvisible(true);
}
-void ICQClient::sendStatus()
+void SnacIcqService::sendStatus()
{
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxSTATUS);
- socket()->writeBuffer().tlv(0x0006, fullStatus(m_status));
- sendPacket(true);
+ snac(ICQ_SNACxSRV_SETxSTATUS);
+ m_client->socket()->writeBuffer().tlv(0x0006, m_client->getFullStatus());
+ m_client->sendPacket(true);
sendIdleTime();
}
-void ICQClient::sendPluginInfoUpdate(unsigned plugin_id)
+void SnacIcqService::sendPluginInfoUpdate(unsigned plugin_id)
{
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxSTATUS);
- socket()->writeBuffer().tlv(0x0006, fullStatus(m_status));
+ snac(ICQ_SNACxSRV_SETxSTATUS);
+ m_client->socket()->writeBuffer().tlv(0x0006, m_client->getFullStatus());
ICQBuffer directInfo(25);
fillDirectInfo(directInfo);
- socket()->writeBuffer().tlv(0x000C, directInfo);
+ m_client->socket()->writeBuffer().tlv(0x000C, directInfo);
ICQBuffer b;
b << (char)2;
- b.pack(data.owner.PluginInfoTime.toULong());
+ b.pack(m_client->data.owner.PluginInfoTime.toULong());
b.pack((unsigned short)2);
b.pack((unsigned short)1);
b.pack((unsigned short)2);
- b.pack((char*)plugins[plugin_id], sizeof(plugin));
- b.pack(data.owner.PluginInfoTime.toULong());
+ b.pack((char*)m_client->plugins[plugin_id], sizeof(plugin));
+ b.pack(m_client->data.owner.PluginInfoTime.toULong());
b << (char)0;
- socket()->writeBuffer().tlv(0x0011, b);
- socket()->writeBuffer().tlv(0x0012, (unsigned short)0);
- sendPacket(false);
+ m_client->socket()->writeBuffer().tlv(0x0011, b);
+ m_client->socket()->writeBuffer().tlv(0x0012, (unsigned short)0);
+ m_client->sendPacket(false);
}
-void ICQClient::sendPluginStatusUpdate(unsigned plugin_id, unsigned long status)
+void SnacIcqService::sendPluginStatusUpdate(unsigned plugin_id, unsigned long status)
{
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxSTATUS);
- socket()->writeBuffer().tlv(0x0006, fullStatus(m_logonStatus));
+ snac(ICQ_SNACxSRV_SETxSTATUS);
+ m_client->socket()->writeBuffer().tlv(0x0006, m_client->fullStatus(m_client->m_logonStatus));
ICQBuffer directInfo(25);
fillDirectInfo(directInfo);
- socket()->writeBuffer().tlv(0x000C, directInfo);
+ m_client->socket()->writeBuffer().tlv(0x000C, directInfo);
ICQBuffer b;
b << (char)3;
- b.pack(data.owner.PluginStatusTime.toULong());
+ b.pack(m_client->data.owner.PluginStatusTime.toULong());
b.pack((unsigned short)0);
b.pack((unsigned short)1);
b.pack((unsigned short)1);
- b.pack((char*)plugins[plugin_id], sizeof(plugin));
+ b.pack((char*)m_client->plugins[plugin_id], sizeof(plugin));
b << (char)1;
b.pack(status);
- b.pack(data.owner.PluginStatusTime.toULong());
+ b.pack(m_client->data.owner.PluginStatusTime.toULong());
b.pack((unsigned short)0);
b.pack((unsigned short)0);
b.pack((unsigned short)1);
- socket()->writeBuffer().tlv(0x0011, b);
- socket()->writeBuffer().tlv(0x0012, (unsigned short)0);
- sendPacket(false);
+ m_client->socket()->writeBuffer().tlv(0x0011, b);
+ m_client->socket()->writeBuffer().tlv(0x0012, (unsigned short)0);
+ m_client->sendPacket(false);
}
-void ICQClient::sendUpdate()
+void SnacIcqService::sendUpdate()
{
if (m_nUpdates == 0)
return;
if (--m_nUpdates)
return;
- data.owner.InfoUpdateTime.asULong() = time(NULL);
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxSTATUS);
- socket()->writeBuffer().tlv(0x0006, fullStatus(m_status));
+ m_client->data.owner.InfoUpdateTime.asULong() = time(NULL);
+ snac(ICQ_SNACxSRV_SETxSTATUS);
+ m_client->socket()->writeBuffer().tlv(0x0006, m_client->getFullStatus());
ICQBuffer directInfo(25);
fillDirectInfo(directInfo);
- socket()->writeBuffer().tlv(0x000C, directInfo);
- sendPacket(false);
+ m_client->socket()->writeBuffer().tlv(0x000C, directInfo);
+ m_client->sendPacket(false);
}
-void ICQClient::fillDirectInfo(ICQBuffer &directInfo)
+void SnacIcqService::fillDirectInfo(ICQBuffer &directInfo)
{
- set_ip(&data.owner.RealIP, socket()->localHost());
- if (getHideIP()){
+ set_ip(&m_client->data.owner.RealIP, m_client->socket()->localHost());
+ if (m_client->getHideIP()){
directInfo
<< (unsigned long)0
<< (unsigned long)0;
}else{
directInfo
- << (unsigned long)htonl(get_ip(data.owner.RealIP))
+ << (unsigned long)htonl(get_ip(m_client->data.owner.RealIP))
<< (unsigned short)0
- << (unsigned short)data.owner.Port.toULong();
+ << (unsigned short)m_client->data.owner.Port.toULong();
}
char mode = DIRECT_MODE_DIRECT;
- unsigned long ip1 = get_ip(data.owner.IP);
- unsigned long ip2 = get_ip(data.owner.RealIP);
+ unsigned long ip1 = get_ip(m_client->data.owner.IP);
+ unsigned long ip2 = get_ip(m_client->data.owner.RealIP);
if (ip1 && ip2 && (ip1 != ip2))
mode = DIRECT_MODE_INDIRECT;
- switch (socket()->socket()->mode()){
+ switch (m_client->socket()->socket()->mode()){
case Socket::Indirect:
mode = DIRECT_MODE_INDIRECT;
break;
@@ -576,37 +635,37 @@
<< (char)ICQ_TCP_VERSION;
directInfo
- << data.owner.DCcookie.toULong()
+ << m_client->data.owner.DCcookie.toULong()
<< 0x00000050L
<< 0x00000003L
- << data.owner.InfoUpdateTime.toULong()
- << data.owner.PluginInfoTime.toULong()
- << data.owner.PluginStatusTime.toULong()
+ << m_client->data.owner.InfoUpdateTime.toULong()
+ << m_client->data.owner.PluginInfoTime.toULong()
+ << m_client->data.owner.PluginStatusTime.toULong()
<< (unsigned short) 0x0000;
}
-void ICQClient::sendIdleTime()
+void SnacIcqService::sendIdleTime()
{
// avoid traffic
- if(!m_bIdleTime && getIdleTime() == 0)
+ if(!m_idleTime && m_client->getIdleTime() == 0)
return;
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SETxIDLE);
- if(getIdleTime()) {
- unsigned long idle = time(NULL) - getIdleTime();
+ snac(ICQ_SNACxSRV_SETxIDLE);
+ if(m_client->getIdleTime()) {
+ unsigned long idle = time(NULL) - m_client->getIdleTime();
if (idle <= 0)
idle = 1;
- socket()->writeBuffer() << idle;
- m_bIdleTime = true;
+ m_client->socket()->writeBuffer() << idle;
+ m_idleTime = true;
} else {
- socket()->writeBuffer() << (unsigned long)0;
- m_bIdleTime = false;
+ m_client->socket()->writeBuffer() << (unsigned long)0;
+ m_idleTime = false;
}
- sendPacket(false);
+ m_client->sendPacket(false);
}
-void ICQClient::requestService(ServiceSocket *s)
+void SnacIcqService::requestService(ServiceSocket *s)
{
- snac(ICQ_SNACxFOOD_SERVICE, ICQ_SNACxSRV_SERVICExREQ, true);
- socket()->writeBuffer() << s->id();
- sendPacket(true);
+ snac(ICQ_SNACxSRV_SERVICExREQ, true);
+ m_client->socket()->writeBuffer() << s->id();
+ m_client->sendPacket(true);
}
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/icq/icqservice.h
^
|
@@ -0,0 +1,45 @@
+
+#ifndef _ICQSERVICE_H
+#define _ICQSERVICE_H
+
+#include <list>
+
+#include "snac.h"
+
+class ServiceSocket;
+class Tlv;
+class SnacIcqService : public SnacHandler
+{
+public:
+ SnacIcqService(ICQClient* client);
+ virtual ~SnacIcqService();
+
+ virtual bool process(unsigned short subtype, ICQBuffer* buf);
+ void requestRateInfo();
+
+ void addService(ServiceSocket* s);
+ void deleteService(ServiceSocket* s);
+ ServiceSocket* getService(unsigned short id);
+ void clearServices();
+ void setServiceSocket(Tlv *tlv_addr, Tlv *tlv_cookie, unsigned short service);
+ void sendClientReady();
+ void sendLogonStatus();
+ void setInvisible();
+ void sendStatus();
+ void sendUpdate();
+ void sendPluginInfoUpdate(unsigned plugin_id);
+ void sendPluginStatusUpdate(unsigned plugin_id, unsigned long status);
+ void sendIdleTime();
+ void requestService(ServiceSocket *s);
+
+protected:
+ void fillDirectInfo(ICQBuffer &directInfo);
+
+private:
+ bool m_idleTime;
+
+ std::list<ServiceSocket*> m_services;
+ unsigned int m_nUpdates;
+};
+
+#endif
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqssbi.cpp
^
|
@@ -1,5 +1,5 @@
/***************************************************************************
- icqvarious.cpp - description
+ icqssbi.cpp - description
-------------------
begin : Sun Oct 17 2006
copyright : (C) 2006 by Christian Ehrlicher
@@ -40,17 +40,10 @@
SSBISocket *ICQClient::getSSBISocket()
{
- SSBISocket *s = NULL;
-
- for (list<ServiceSocket*>::iterator it = m_services.begin(); it != m_services.end(); ++it){
- if ((*it)->id() == ICQ_SNACxFOOD_SSBI){
- s = static_cast<SSBISocket*>(*it);
- break;
- }
- }
+ SSBISocket *s = static_cast<SSBISocket*>(m_snacService->getService(ICQ_SNACxFOOD_SSBI));
if (s == NULL){
s = new SSBISocket(this);
- requestService(s);
+ snacService()->requestService(s);
}
return s;
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqssbi.h
^
|
@@ -26,7 +26,7 @@
unsigned short m_refNumber; // the ref number for the image
unsigned m_retryCount;
protected slots:
- void requestService() { m_client->requestService(this); }
+ void requestService() { m_client->snacService()->requestService(this); }
};
#endif // ICQSSBI_H
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/icqvarious.cpp
^
|
@@ -940,7 +940,7 @@
m_client->data.owner.TimeZone.asULong() = m_tz;
m_client->data.owner.HiddenEMail.asBool() = m_hiddenEMail;
EventClientChanged(m_client).process();
- m_client->sendUpdate();
+ m_client->snacService()->sendUpdate();
return true;
}
@@ -955,7 +955,7 @@
ba[0] = (char)((len ) & 0xff);
ba[1] = (char)((len >> 8) & 0xff);
memcpy( ba.data() + 2, cstr, len );
- return Tlv( id, ba.size(), ba.data() );
+ return Tlv(id, ba.size(), ba.data());
}
static Tlv makeBCombo(unsigned id, unsigned long y, unsigned long m, unsigned long d)
@@ -1290,7 +1290,7 @@
break;
}
}
- m_client->sendStatus();
+ m_client->snacService()->sendStatus();
EventClientChanged(m_client).process();
return true;
}
@@ -1330,6 +1330,7 @@
data.owner.About.str() = d->About.str();
setAIMInfo(d);
setProfile(d);
+
return;
}
@@ -1465,7 +1466,7 @@
}
setChatGroup();
- sendStatus();
+ snacService()->sendStatus();
}
class SetPasswordRequest : public ServerRequest
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/rtf.ll
^
|
@@ -26,7 +26,6 @@
#include "unquot.h"
#include "log.h"
-#include "core.h"
#include "icqclient.h"
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/icq/rtfgen.cpp
^
|
@@ -31,7 +31,6 @@
#include "icons.h"
#include "unquot.h"
#include "log.h"
-#include "core.h"
#include "icqclient.h"
#include "polling.h"
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/icq/snac.cpp
^
|
@@ -0,0 +1,17 @@
+
+#include "snac.h"
+#include "icqclient.h"
+
+SnacHandler::SnacHandler(ICQClient* client, unsigned short snac) : m_snac(snac)
+{
+ m_client = client;
+}
+
+SnacHandler::~SnacHandler()
+{
+}
+
+void SnacHandler::snac(const unsigned short subtype, bool bMsgID, bool bType)
+{
+ m_client->snac(m_snac, subtype, bMsgID, bType);
+}
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/icq/snac.h
^
|
@@ -0,0 +1,23 @@
+
+#ifndef _SNAC_H
+#define _SNAC_H
+
+class ICQClient;
+class ICQBuffer;
+class SnacHandler
+{
+public:
+ SnacHandler(ICQClient* client, unsigned short snac);
+ virtual ~SnacHandler();
+
+ unsigned short getType() { return m_snac; };
+ virtual bool process(unsigned short subtype, ICQBuffer* buf) = 0;
+
+ void snac(const unsigned short subtype, bool bMsgID = true, bool bType = false);
+protected:
+ unsigned short m_snac;
+ ICQClient* m_client;
+
+};
+
+#endif
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/jabber/jabber.cpp
^
|
@@ -17,7 +17,8 @@
#include "jabberclient.h"
#include "jabber.h"
-#include "core.h"
+#include "misc.h"
+#include "core_consts.h"
using namespace SIM;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/jabber/jabber_rosters.cpp
^
|
@@ -35,7 +35,8 @@
#include "html.h"
#include "log.h"
#include "unquot.h"
-#include "core.h"
+#include "misc.h"
+#include "core_events.h"
#include "jabberclient.h"
#include "jabber.h"
@@ -485,7 +486,7 @@
m_data = &m_ext;
return;
}
- if (el == "city"){
+ if (el == "locality"){
m_data = &m_city;
return;
}
@@ -528,6 +529,10 @@
m_bLogo = false;
return;
}
+ if(el == "vcard")
+ {
+ EventClientChanged(m_client).process();
+ }
}
void InfoRequest::char_data(const QString& str)
@@ -2565,19 +2570,11 @@
VersionInfoRequest::~VersionInfoRequest()
{
ClientVersionInfo info;
-#ifdef __OS2__
- info.jid = m_jid.c_str();
- info.node = m_node.c_str();
- info.name = m_name.c_str();
- info.version = m_version.c_str();
- info.os = m_os.c_str();
-#else
info.jid = m_jid;
info.node = m_node;
info.name = m_name;
info.version = m_version;
info.os = m_os;
-#endif
EventClientVersion(&info).process();
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/jabber/jabberbrowser.cpp
^
|
@@ -26,6 +26,7 @@
#include "jidsearch.h"
#include "ballonmsg.h"
#include "core.h"
+#include "core_consts.h"
#include <qpixmap.h>
#include <qtoolbar.h>
@@ -379,8 +380,8 @@
return true;
}
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->menu_id == MenuSearchOptions) && isVisible()){
cmd->flags &= ~COMMAND_CHECKED;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/jabber/jabberclient.cpp
^
|
@@ -38,6 +38,7 @@
#include "log.h"
#include "unquot.h"
#include "core.h"
+#include "core_events.h"
#include "jabberclient.h"
#include "jabber.h"
@@ -2114,7 +2115,7 @@
<< data->ID.str();
if (!msg->getResource().isEmpty()){
socket()->writeBuffer()
- << '/' << msg->getResource();
+ << '/' << encodeXMLattr(msg->getResource());
}
if (getTyping()){
data->composeId.asULong() = ++m_msg_id;
@@ -2179,7 +2180,7 @@
<< data->ID.str();
if (!msg->getResource().isEmpty()){
socket()->writeBuffer()
- << '/' << msg->getResource();
+ << '/' << encodeXMLattr(msg->getResource());
}
socket()->writeBuffer()
<< "\'>\n<body>" << encodeXML(m->getUrl());
@@ -2278,7 +2279,7 @@
<< data->ID.str();
if (!msg->getResource().isEmpty()){
socket()->writeBuffer()
- << '/' << msg->getResource();
+ << '/' << encodeXMLattr(msg->getResource());
}
socket()->writeBuffer()
<< "\'>\n<x xmlns='jabber:x:roster'>\n";
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/livejournal/livejournal.cpp
^
|
@@ -1080,8 +1080,8 @@
eUrl.process();
return true;
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdMenuWeb){
unsigned menu_id = cmd->menu_id - MenuWeb;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/livejournal/msgjournal.cpp
^
|
@@ -108,8 +108,8 @@
bool MsgJournal::processEvent(Event *e)
{
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param == m_edit){
unsigned id = cmd->bar_grp;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/msn/msnclient.cpp
^
|
@@ -34,6 +34,7 @@
#include "log.h"
#include "core.h"
+#include "core_events.h"
#include "msnclient.h"
#include "msnconfig.h"
@@ -469,6 +470,7 @@
QCString ll = l.local8Bit();
log(L_DEBUG, "Get: %s", (const char*)ll);
QString cmd = getToken(l, ' ');
+ log(L_DEBUG, QString("Command: %1").arg(cmd));
if ((cmd == "715") || (cmd == "228"))
return;
if (cmd == "XFR"){
@@ -672,6 +674,25 @@
return;
if (cmd == "BLP")
return;
+ if (cmd == "UUX")
+ {
+ // personal message
+ getToken(l, ' ');
+ getToken(l, ' ');
+ unsigned size = getToken(l, ' ').toUInt();
+ if (size == 0){
+ log(L_WARN, "Empty server personal message size");
+ //return;
+ }
+ else
+ {
+ m_msg = new MSNServerMessage(this, size);
+ // only we post the message in log now.....
+ log(L_WARN, "Personal message: %s", m_msg);
+ //packet_ready();
+ }
+ return;
+ }
if (cmd == "LSG"){
unsigned id = getToken(l, ' ').toUInt();
processLSG(id, unquote(getToken(l, ' ')));
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/navigate/navigate.cpp
^
|
@@ -17,7 +17,9 @@
#include "navigate.h"
#include "navcfg.h"
+#include "log.h"
#include "core.h"
+#include "core_consts.h"
#ifdef USE_KDE
#include <kapplication.h>
@@ -417,15 +419,18 @@
QString topic = rp.value("ddeexec\\Topic");
QString server = rp.value("ddeexec\\Application");
- int pos = action.find("%1");
+ int pos = action.find("%l");
if (!action.isEmpty() && pos >= 0)
action = action.left(pos) + url + action.mid(pos + 2);
- pos = prg.find("%1");
- if (pos >= 0)
- prg = prg.left(pos) + url + prg.mid(pos + 2);
+ //prg=prg.replace("\%l","\%1");
+ if (proto=="file") {
+ pos = prg.find("%l");
+ if (pos >= 0)
+ prg = prg.left(pos) + url + prg.mid(pos + 2);
+ }
else
- prg = prg + " \"" + url + "\"";
+ prg = QString(prg).arg(url);
if (!prg.isEmpty()){
STARTUPINFO si;
@@ -453,7 +458,7 @@
//ShellExecuteA(NULL, NULL, url.data(), NULL, NULL, SW_SHOWNORMAL); //Fixme: Bug, does not work
QProcess openPathInExplorer;
QString path(url);
- path.replace("%20", " ");
+ //path.replace("%20", " ");
openPathInExplorer.addArgument("explorer");
openPathInExplorer.addArgument(path);
if (openPathInExplorer.start()) qDebug(i18n("Explorer started for Path"));
@@ -471,8 +476,7 @@
}
#endif // USE_KDE
#ifdef __OS2__
- startBrowser( (proto == "mailto") ? getMailer() : getBrowser(),
- url.c_str() );
+ startBrowser( (proto == "mailto") ? getMailer() : getBrowser(), url );
#else
QString param;
if (proto == "mailto"){
@@ -494,8 +498,8 @@
h->setText(parseUrl(h->text()));
return true;
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdMail){
Contact *contact = getContacts()->contact((unsigned long)(cmd->param));
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/netmonitor/netmonitor.cpp
^
|
@@ -19,6 +19,7 @@
#include <qwidget.h>
#include "misc.h"
+#include "core_consts.h"
#include "netmonitor.h"
#include "monitor.h"
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/ontop/Makefile.am
^
|
@@ -7,7 +7,7 @@
ontopcfg.cpp \
ontopcfgbase.ui
-INCLUDES=-I$(srcdir)/../../sim $(all_includes)
+INCLUDES=-I$(srcdir)/../../sim -I../_core $(all_includes)
ontop_la_METASOURCES = AUTO
ontop_la_LIBADD = ../../sim/libsim.la $(LIB_QT) $(LIB_KDECORE) $(EXTRA_LIBS)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/ontop/Makefile.in
^
|
@@ -405,7 +405,7 @@
ontopcfg.cpp \
ontopcfgbase.cpp
-INCLUDES = -I$(srcdir)/../../sim $(all_includes)
+INCLUDES = -I$(srcdir)/../../sim -I../_core $(all_includes)
#>- ontop_la_METASOURCES = AUTO
ontop_la_LIBADD = ../../sim/libsim.la $(LIB_QT) $(LIB_KDECORE) $(EXTRA_LIBS)
#>- ontop_la_LDFLAGS = -module -no-undefined -avoid-version -L../../sim/.libs $(QT_LDFLAGS) $(KDE_RPATH) $(all_libraries)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/ontop/ontop.cpp
^
|
@@ -30,6 +30,7 @@
#endif
#include "misc.h"
+#include "core_consts.h"
#include "ontop.h"
#include "ontopcfg.h"
@@ -117,8 +118,8 @@
return true;
}
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdOnTop){
getState();
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/osd/osd.cpp
^
|
@@ -710,6 +710,8 @@
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
+#elif defined(__OS2__)
+ // TODO: add OS/2 code to switch leds
#else
if (bCapsState)
system("xset led 3");
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/remote/remote.cpp
^
|
@@ -608,7 +608,7 @@
cmd->id = type;
cmd->menu_id = MenuMessage;
cmd->param = (void*)(contact->id());
- if (!EventCheckState(cmd).process())
+ if (!EventCheckCommandState(cmd).process())
continue;
}
unsigned style = 0;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/shortcuts/mousecfg.cpp
^
|
@@ -25,6 +25,7 @@
#include "cmddef.h"
#include "misc.h"
+#include "core_consts.h"
#include "mousecfg.h"
#include "shortcuts.h"
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/shortcuts/shortcutcfg.cpp
^
|
@@ -20,6 +20,8 @@
#include "qkeybutton.h"
#include "mousecfg.h"
#include "core.h"
+#include "core_consts.h"
+#include "cmddef.h"
#include <qlistview.h>
#include <qlabel.h>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/shortcuts/shortcuts.cpp
^
|
@@ -18,7 +18,9 @@
#include "simapi.h"
#include "log.h"
+#include "cmddef.h"
#include "core.h"
+#include "core_consts.h"
#include "shortcuts.h"
#include "shortcutcfg.h"
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sound.cpp
^
|
@@ -23,7 +23,7 @@
#include <qtimer.h>
#ifdef USE_KDE
-#include <kaudioplayer.h>
+ #include <kaudioplayer.h>
#endif
#include "exec.h"
@@ -145,6 +145,7 @@
const pluginInfo *info = ePlugin.info();
core = static_cast<CorePlugin*>(info->plugin);
+ m_process = NULL;
m_sound = NULL;
#if !defined( WIN32 ) && !defined( __OS2__ )
m_player = 0;
@@ -156,8 +157,7 @@
// Under OS/2, playing startup sound leads SIM to crash on next sounds
// under investigation
this->destruct=false;
- if (bFirst)
- playSound(getStartUp());
+ bDone=true;
#endif
}
@@ -168,11 +168,11 @@
while (!bDone) sleepTime(1000);
#endif
delete m_sound;
- soundPlugin = NULL;
- EventCommandRemove(CmdSoundDisable).process();
- EventRemovePreferences(user_data_id).process();
- free_data(soundData, &data);
- getContacts()->unregisterUserData(user_data_id);
+ soundPlugin = NULL;
+ EventCommandRemove(CmdSoundDisable).process();
+ EventRemovePreferences(user_data_id).process();
+ free_data(soundData, &data);
+ getContacts()->unregisterUserData(user_data_id);
}
QCString SoundPlugin::getConfig()
@@ -199,8 +199,13 @@
return false;
}
switch (e->type()) {
- case eEventCheckState: {
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ case eEventLoginStart:
+ {
+ playSound(getStartUp());
+ break;
+ }
+ case eEventCheckCommandState: {
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->id == CmdSoundDisable){
cmd->flags &= ~COMMAND_CHECKED;
@@ -342,11 +347,19 @@
void SoundPlugin::playSound(const QString &s)
{
if (s.isEmpty())
+ {
return;
+ }
if (m_current == s)
+ {
return;
+ }
if(m_queue.contains(s))
- return;
+ {
+ if (m_sound == NULL)
+ processQueue();
+ return;
+ }
m_queue.append(s);
if (m_sound == NULL)
processQueue();
@@ -361,15 +374,14 @@
m_queue.erase(m_queue.begin());
QString sound = fullName(m_current);
// check whether file is available
+ m_snd = sound;
if (!QFile::exists(sound)) {
m_current = QString::null;
return;
}
#ifdef USE_KDE
if (getUseArts()){
- KAudioPlayer::play(sound);
- m_checkTimer->start(WAIT_SOUND_TIMEOUT);
- m_current = QString::null;
+ this->run();
return; // arts
}
bool bSound = false;
@@ -381,98 +393,135 @@
can take 5 seconds to return a value */
bool bSound = !getPlayer() && QSound::available();
#endif
- if (bSound){
- if (!QSound::available()){
- m_queue.clear();
- m_current = QString::null;
- return;
- }
- if (m_sound)
- delete m_sound;
- m_sound = NULL;
-#ifndef AUDIERE_H
- m_sound = new QSound(sound);
- m_sound->play();
+ if (bSound){
+ if (!QSound::available()){
+ m_queue.clear();
+ m_current = QString::null;
+ return;
+ }
+ if (m_sound)
+ delete m_sound;
+ m_sound = NULL;
+#ifndef USE_AUDIERE
+ m_sound = new QSound(sound);
+ qDebug("\nNON-Threaded");
+ m_sound->play();
m_checkTimer->start(CHECK_SOUND_TIMEOUT);
#else
- m_snd = sound;
- //QTimer::singleShot(0,this,SLOT(playit()));
- this->start();
-
+ this->start();
#endif
-
m_current = QString::null;
return; // QSound
}
#if !defined( WIN32 ) && !defined( __OS2__ )
- if (getPlayer().isEmpty()) {
+ if (getPlayer().isEmpty()) {
m_current = QString::null;
- return;
- }
- EventExec e(getPlayer(), sound);
- e.process();
- m_player = e.pid();
- if (m_player == 0){
- log(L_WARN, "Can't execute player");
- m_queue.clear();
- }
- m_current = QString::null;
- return; // external Player
+ return;
+ }
+ this->run();
#endif
}
-void SoundPlugin::run(){
+void SoundPlugin::run()
+{
#ifdef USE_AUDIERE
AudioDevicePtr device(OpenDevice());
- if (!device) {
- log(L_WARN, "No Audio Device was found.");
- return;
- }
- QFileInfo audiereSound(m_snd);
-
- OutputStreamPtr sndstream (OpenSound(device, audiereSound.absFilePath().latin1(), true));
-
- if (!sndstream) {
- log(L_WARN, "Audiostream could not be opened.");
- return;
- }
- else {
- sndstream->setVolume(1.0f);
- sndstream->play();
- }
- while (sndstream->isPlaying()) {
- sleepSecond();
- bDone = false;
- if (destruct) { //Plugin or SIM is shutting down, so lets fade out ;)
- for (int i=1000; i>0; --i) {
+ if (!device) {
+ log(L_WARN, "No Audio Device was found.");
+ return;
+ }
+ QFileInfo audiereSound(m_snd);
+
+ OutputStreamPtr sndstream (OpenSound(device, audiereSound.absFilePath().latin1(), true));
+
+ if (!sndstream) {
+ log(L_WARN, "Audiostream could not be opened.");
+ return;
+ }
+ else {
+ sndstream->setVolume(1.0f);
+ sndstream->play();
+ }
+ while (sndstream->isPlaying()) {
+ sleepSecond();
+ bDone = false;
+ if (destruct) { //Plugin or SIM is shutting down, so lets fade out ;)
+ for (int i=1000; i>0; --i) {
sndstream->setVolume(i*0.001f);
sleepTime(2);
}
- bDone=true;
- return;
- }
- }
- bDone=true;
+ bDone=true;
+ return;
+ }
+ }
+ bDone=true;
+ return;
+#endif
+
+#if !defined( WIN32 ) && !defined( __OS2__ ) && !defined( USE_KDE )
+ /*
+ if(bDone)
+ {
+ qDebug("\nThreaded mit getPlayer() davor");
+ bDone=false;
+ //EventExec e(, m_snd);
+ QString execme=QString("%1 \"%2\"\0").arg(getPlayer()).arg(m_snd);
+ system(execme.data());
+ //e.process();
+ qDebug("\nThreaded mit getPlayer() danach");
+ m_current = QString::null;
+ bDone=true;
+ return;
+ }
+ */
+ if((!m_process) && (!getPlayer().isEmpty()) && (!m_snd.isEmpty()))
+ {
+ m_process = new QProcess(this);
+ m_process->addArgument(getPlayer());
+ m_process->addArgument(m_snd);
+ m_process->start();
+ connect(m_process, SIGNAL(processExited()), this, SLOT(processExited()));
+ return;
+ }
+#endif
+#ifdef USE_KDE
+ if (bDone) {
+ qDebug("\nThreaded mit USE_KDE davor");
+ bDone=false;
+ KAudioPlayer::play(m_snd);
+ qDebug("\nThreaded mit USE_KDE danach");
+ m_checkTimer->start(WAIT_SOUND_TIMEOUT);
+ m_current = QString::null;
+ bDone=true;
+ return;
+ }
#endif
}
+void SoundPlugin::processExited()
+{
+ delete m_process;
+ m_process = NULL;
+ m_current = QString::null;
+ processQueue();
+}
void SoundPlugin::checkSound()
{
bDone = true;
-#ifndef AUDIERE_H
+#ifndef USE_AUDIERE
if (m_sound && !m_sound->isFinished())
bDone = false;
#endif
if (bDone){
- m_checkTimer->stop();
+ m_checkTimer->stop();
if (m_sound)
delete m_sound;
m_sound = NULL;
- m_snd = QString::null;
+ m_snd = QString::null;
m_current = QString::null;
processQueue();
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sound.h
^
|
@@ -22,6 +22,7 @@
#include <qobject.h>
#include <qthread.h>
+#include <qprocess.h>
#include "cfg.h"
#include "event.h"
@@ -89,7 +90,6 @@
SoundPlugin(unsigned, bool, Buffer*);
virtual ~SoundPlugin();
-
#ifdef USE_KDE
PROP_BOOL(UseArts);
#endif
@@ -102,7 +102,8 @@
protected slots:
void checkSound();
void childExited(int, int);
-
+ void processExited();
+
protected:
unsigned long user_data_id;
virtual bool processEvent(SIM::Event *e);
@@ -118,6 +119,7 @@
QSound *m_sound;
QTimer *m_checkTimer;
QString m_snd;
+ QProcess* m_process;
#if !defined( WIN32 ) && !defined( __OS2__ )
long m_player;
@@ -125,9 +127,9 @@
SoundData data;
CorePlugin *core;
bool m_bChanged;
- bool bDone;
- bool destruct;
- bool isPlaying;
+ bool bDone;
+ bool destruct;
+ bool isPlaying;
friend class SoundConfig;
friend class SoundUserConfig;
};
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sound.vcproj
^
|
@@ -770,30 +770,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="sounds\message2.wav"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Copy $(InputPath)"
- CommandLine="copy /Y "$(InputPath)" "$(OutDir)\$(ParentName)\$(InputFileName)"
"
- Outputs="$(OutDir)\$(ParentName)\$(InputFileName)"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Copy $(InputPath)"
- CommandLine="copy /Y "$(InputPath)" "$(OutDir)\$(ParentName)\$(InputFileName)"
"
- Outputs="$(OutDir)\$(ParentName)\$(InputFileName)"
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="sounds\msgsent.wav"
>
<FileConfiguration
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/Makefile.in
^
|
@@ -571,7 +571,7 @@
.NOEXPORT:
#>+ 2
-KDE_DIST=filedone.wav file.wav msgsent.wav.license message2.wav.license message2.wav system.wav sms.wav url.wav.license alert.wav.license vip-online.wav.license startup.wav.license Makefile.in message.wav auth.wav system.wav.license sms.wav.license vip-online.wav filedone.wav.license contacts.wav file.wav.license contacts.wav.license message.wav.license url.wav startup.wav msgsent.wav auth.wav.license Makefile.am alert.wav
+KDE_DIST=deleted.wav filedone.wav file.wav system.wav sms.wav Makefile.in message.wav auth.wav vip-online.wav error.wav refused.wav contacts.wav mailpager.wav contactrequest.wav web.wav authrequest.wav url.wav startup.wav added.wav msgsent.wav Makefile.am alert.wav
#>+ 2
docs-am:
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/added.wav
^
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/alert.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/alert.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/auth.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/auth.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/authrequest.wav
^
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/contactrequest.wav
^
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/contacts.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/contacts.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/deleted.wav
^
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/error.wav
^
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/file.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/file.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/filedone.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/filedone.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/message.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/message.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/message2.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/message2.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/msgsent.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/msgsent.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/refused.wav
^
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/sms.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/sms.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/startup.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/startup.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/system.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/system.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/url.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/url.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Changed |
sim-0.9.5.tar.bz2/plugins/sound/sounds/vip-online.wav
^
|
[-]
[+]
|
Deleted |
sim-0.9.5.tar.bz2/plugins/sound/sounds/vip-online.wav.license
^
|
@@ -1 +0,0 @@
-Unknown-proprietary
|
|
Added |
sim-0.9.5.tar.bz2/plugins/sound/sounds/web.wav
^
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/spell/spellhighlight.cpp
^
|
@@ -223,8 +223,8 @@
bool SpellHighlighter::processEvent(SIM::Event *e)
{
- if (e->type() == SIM::eEventCheckState){
- SIM::EventCheckState *ecs = static_cast<SIM::EventCheckState*>(e);
+ if (e->type() == SIM::eEventCheckCommandState){
+ SIM::EventCheckCommandState *ecs = static_cast<SIM::EventCheckCommandState*>(e);
SIM::CommandDef *cmd = ecs->cmd();
if (cmd->id == m_plugin->CmdSpell){
MsgEdit *m_edit = (MsgEdit*)(cmd->param);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/splash/Makefile.in
^
|
@@ -734,7 +734,7 @@
#>+ 2
-KDE_DIST=splash.vcproj Makefile.in splash.png CMakeLists.txt splash.h Makefile.am
+KDE_DIST=splash.vcproj SIM-IM.svg Makefile.in splash.png simsvg-template.png CMakeLists.txt splash.h Makefile.am
#>+ 3
clean-closures:
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/plugins/splash/SIM-IM.svg
^
|
@@ -0,0 +1,976 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="210mm"
+ height="297mm"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="SIM-IM.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4651966"
+ inkscape:cx="305.68983"
+ inkscape:cy="738.8224"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1014"
+ inkscape:window-height="711"
+ inkscape:window-x="1"
+ inkscape:window-y="1" />
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient5414">
+ <stop
+ id="stop5416"
+ offset="0"
+ style="stop-color:#be34a9;stop-opacity:1;" />
+ <stop
+ style="stop-color:#bee60e;stop-opacity:0.98742139;"
+ offset="1"
+ id="stop3213" />
+ <stop
+ id="stop5418"
+ offset="1"
+ style="stop-color:#be34a9;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5282"
+ inkscape:collect="always">
+ <stop
+ id="stop5284"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop5286"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5238"
+ inkscape:collect="always">
+ <stop
+ id="stop5240"
+ offset="0"
+ style="stop-color:#993f43;stop-opacity:1;" />
+ <stop
+ id="stop5242"
+ offset="1"
+ style="stop-color:#993f43;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5216">
+ <stop
+ style="stop-color:#7fa4d2;stop-opacity:1"
+ offset="0"
+ id="stop5218" />
+ <stop
+ style="stop-color:#481131;stop-opacity:1"
+ offset="1"
+ id="stop5220" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5210">
+ <stop
+ style="stop-color:#0051d0;stop-opacity:1;"
+ offset="0"
+ id="stop5212" />
+ <stop
+ style="stop-color:#481131;stop-opacity:1"
+ offset="1"
+ id="stop5214" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5188"
+ inkscape:collect="always">
+ <stop
+ id="stop5190"
+ offset="0"
+ style="stop-color:#0051d0;stop-opacity:1;" />
+ <stop
+ id="stop5192"
+ offset="1"
+ style="stop-color:#0051d0;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5060"
+ inkscape:collect="always">
+ <stop
+ id="stop5062"
+ offset="0"
+ style="stop-color:#7fa4d2;stop-opacity:1" />
+ <stop
+ id="stop5064"
+ offset="1"
+ style="stop-color:#7fa4d2;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3238"
+ inkscape:collect="always">
+ <stop
+ id="stop3240"
+ offset="0"
+ style="stop-color:#2033b4;stop-opacity:1;" />
+ <stop
+ id="stop3242"
+ offset="1"
+ style="stop-color:#e5ff7b;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3226"
+ inkscape:collect="always">
+ <stop
+ id="stop3228"
+ offset="0"
+ style="stop-color:#20cab4;stop-opacity:1;" />
+ <stop
+ id="stop3230"
+ offset="1"
+ style="stop-color:#20cab4;stop-opacity:0;" />
+ </linearGradient>
+ <inkscape:perspective
+ id="perspective10"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective2410" />
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective2430" />
+ <filter
+ height="1.4869401"
+ y="-0.24347007"
+ width="1.3156669"
+ x="-0.15783345"
+ id="filter3908"
+ inkscape:collect="always">
+ <feGaussianBlur
+ id="feGaussianBlur3910"
+ stdDeviation="17.410306"
+ inkscape:collect="always" />
+ </filter>
+ <pattern
+ id="pattern3924"
+ patternTransform="matrix(0.9562333,0,0,1.7968642,579.06218,274.39375)"
+ height="40.976345"
+ width="535.68548"
+ patternUnits="userSpaceOnUse">
+ <text
+ xml:space="preserve"
+ style="font-size:41.92843246px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="-2.7638371"
+ y="31.855782"
+ id="text3916"
+ transform="scale(0.9902597,1.0098361)"><tspan
+ sodipodi:role="line"
+ id="tspan3918"
+ x="-2.7638371"
+ y="31.855782">Simple Instant Messenger</tspan></text>
+ </pattern>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="458.44125"
+ x2="649.51617"
+ y1="458.44125"
+ x1="245.13797"
+ id="linearGradient5066"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <filter
+ id="filter5184"
+ inkscape:collect="always">
+ <feGaussianBlur
+ id="feGaussianBlur5186"
+ stdDeviation="0.3928017"
+ inkscape:collect="always" />
+ </filter>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="458.44125"
+ x2="649.51617"
+ y1="458.44126"
+ x1="245.05099"
+ id="linearGradient5194"
+ xlink:href="#linearGradient5188"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="458.44125"
+ x2="673.50543"
+ y1="458.44125"
+ x1="245.13797"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5206"
+ xlink:href="#linearGradient5210"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="458.44125"
+ x2="673.50543"
+ y1="458.44125"
+ x1="245.13797"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5208"
+ xlink:href="#linearGradient5216"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="197.94709"
+ x2="1786.0658"
+ y1="197.94709"
+ x1="957.2959"
+ id="linearGradient5244"
+ xlink:href="#linearGradient5238"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-337.02281,-69.044333)"
+ gradientUnits="userSpaceOnUse"
+ y2="260.5442"
+ x2="1714.5122"
+ y1="260.5442"
+ x1="981.67731"
+ id="linearGradient5420"
+ xlink:href="#linearGradient5414"
+ inkscape:collect="always" />
+ <radialGradient
+ r="87.818901"
+ fy="283.34909"
+ fx="426.96683"
+ cy="283.34909"
+ cx="426.96683"
+ gradientTransform="matrix(3.7402588,1.1209264,0.4415485,1.6315817,-1295.1119,-657.55649)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient3231"
+ xlink:href="#linearGradient3238"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="260.5442"
+ x2="1714.5122"
+ y1="260.5442"
+ x1="981.67731"
+ gradientTransform="translate(-337.02281,-69.044333)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3233"
+ xlink:href="#linearGradient5414"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="458.44125"
+ x2="673.50543"
+ y1="458.44125"
+ x1="245.13797"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3235"
+ xlink:href="#linearGradient5216"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="458.44125"
+ x2="673.50543"
+ y1="458.44125"
+ x1="245.13797"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3237"
+ xlink:href="#linearGradient5210"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="260.5442"
+ x2="1714.5122"
+ y1="260.5442"
+ x1="981.67731"
+ gradientTransform="matrix(1.0964165,0,0,1.0964165,-393.08683,-87.207972)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3248"
+ xlink:href="#linearGradient5414"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="343.25503"
+ x2="301.92857"
+ y1="343.25503"
+ x1="183.42857"
+ gradientTransform="matrix(5.3286273,0,0,1.0036678,-1773.5515,-595.12824)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3252"
+ xlink:href="#linearGradient3226"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-346.46936"
+ x2="-161.28565"
+ y1="-346.46936"
+ x1="-869.7857"
+ gradientTransform="matrix(0.8866502,0,0,1.0983128,-23.307806,129.91752)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3254"
+ xlink:href="#linearGradient5282"
+ inkscape:collect="always" />
+ <filter
+ id="filter3319"
+ inkscape:collect="always">
+ <feGaussianBlur
+ id="feGaussianBlur3321"
+ stdDeviation="0.84878015"
+ inkscape:collect="always" />
+ </filter>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5414"
+ id="linearGradient4895"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0964165,0,0,1.0964165,-393.08683,-87.207972)"
+ x1="981.67731"
+ y1="260.5442"
+ x2="1714.5122"
+ y2="260.5442" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5216"
+ id="linearGradient4897"
+ gradientUnits="userSpaceOnUse"
+ x1="245.13797"
+ y1="458.44125"
+ x2="673.50543"
+ y2="458.44125" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5210"
+ id="linearGradient4899"
+ gradientUnits="userSpaceOnUse"
+ x1="245.13797"
+ y1="458.44125"
+ x2="673.50543"
+ y2="458.44125" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5414"
+ id="linearGradient2542"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5629019,0,0,0.5629019,15.156683,67.600176)"
+ x1="981.67731"
+ y1="260.5442"
+ x2="1714.5122"
+ y2="260.5442" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5414"
+ id="linearGradient2609"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5629019,0,0,0.5629019,15.156683,67.600176)"
+ x1="981.67731"
+ y1="260.5442"
+ x2="1714.5122"
+ y2="260.5442" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5216"
+ id="linearGradient2611"
+ gradientUnits="userSpaceOnUse"
+ x1="245.13797"
+ y1="458.44125"
+ x2="673.50543"
+ y2="458.44125" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5210"
+ id="linearGradient2613"
+ gradientUnits="userSpaceOnUse"
+ x1="245.13797"
+ y1="458.44125"
+ x2="673.50543"
+ y2="458.44125" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5414"
+ id="linearGradient2660"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5629019,0,0,0.5629019,15.156683,67.600177)"
+ x1="981.67731"
+ y1="260.5442"
+ x2="1714.5122"
+ y2="260.5442" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3226"
+ id="linearGradient2664"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.7357252,0,0,0.5152846,-918.08799,-470.39335)"
+ x1="183.42857"
+ y1="343.25503"
+ x2="301.92857"
+ y2="343.25503" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5282"
+ id="linearGradient2666"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4552075,0,0,0.5638754,-19.510257,-98.15377)"
+ x1="-869.7857"
+ y1="-346.46936"
+ x2="-161.28565"
+ y2="-346.46936" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3238"
+ id="radialGradient2668"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(6.8135716,2.5707705,1.3575219,2.4238873,-2866.8547,-1501.0909)"
+ cx="426.96683"
+ cy="283.34909"
+ fx="426.96683"
+ fy="283.34909"
+ r="87.818901" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3226"
+ id="linearGradient2745"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.7357252,0,0,0.5152846,-918.08799,-470.39335)"
+ x1="183.42857"
+ y1="343.25503"
+ x2="301.92857"
+ y2="343.25503" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5282"
+ id="linearGradient2747"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4552075,0,0,0.5638754,-19.510257,-98.15377)"
+ x1="-869.7857"
+ y1="-346.46936"
+ x2="-161.28565"
+ y2="-346.46936" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3238"
+ id="radialGradient2749"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(6.8135716,2.5707705,1.3575219,2.4238873,-2866.8547,-1501.0909)"
+ cx="426.96683"
+ cy="283.34909"
+ fx="426.96683"
+ fy="283.34909"
+ r="87.818901" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5414"
+ id="linearGradient2751"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5629019,0,0,0.5629019,15.156683,67.600177)"
+ x1="981.67731"
+ y1="260.5442"
+ x2="1714.5122"
+ y2="260.5442" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5216"
+ id="linearGradient2753"
+ gradientUnits="userSpaceOnUse"
+ x1="245.13797"
+ y1="458.44125"
+ x2="673.50543"
+ y2="458.44125" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5210"
+ id="linearGradient2755"
+ gradientUnits="userSpaceOnUse"
+ x1="245.13797"
+ y1="458.44125"
+ x2="673.50543"
+ y2="458.44125" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5414"
+ id="linearGradient2802"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5629019,0,0,0.5629019,15.156683,67.600178)"
+ x1="981.67731"
+ y1="260.5442"
+ x2="1714.5122"
+ y2="260.5442" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3226"
+ id="linearGradient2807"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.7357252,0,0,0.5152846,-918.08799,-470.39335)"
+ x1="183.42857"
+ y1="343.25503"
+ x2="301.92857"
+ y2="343.25503" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5282"
+ id="linearGradient2809"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4552075,0,0,0.5638754,-19.510257,-98.15377)"
+ x1="-869.7857"
+ y1="-346.46936"
+ x2="-161.28565"
+ y2="-346.46936" />
+ </defs>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:groupmode="layer"
+ inkscape:label="Ebene 1">
+ <text
+ id="text3912"
+ y="345.2554"
+ x="319.20819"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ id="tspan3914"
+ sodipodi:role="line" /></text>
+ <rect
+ transform="scale(-1,-1)"
+ y="-331.7056"
+ x="-414.90985"
+ height="76.372528"
+ width="321.44778"
+ id="rect3206"
+ style="fill:url(#linearGradient2807);fill-opacity:1;stroke:url(#linearGradient2809);stroke-width:1.18729842;stroke-opacity:0.99570815" />
+ <g
+ id="g2690">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.81412635;fill:url(#radialGradient2749);fill-opacity:1;stroke:#948a00;stroke-width:0.99987501;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3908)"
+ id="path3234"
+ sodipodi:cx="382.85715"
+ sodipodi:cy="240.57646"
+ sodipodi:rx="131.42857"
+ sodipodi:ry="117.64561"
+ d="M 513.23605,225.7375 A 131.42857,117.64561 0 1 1 512.82329,223.0751"
+ sodipodi:start="6.1567157"
+ sodipodi:end="12.417053"
+ transform="matrix(1.5102653,0,0,0.4610216,-362.82769,184.31241)"
+ sodipodi:open="true" />
+ </g>
+ <text
+ transform="matrix(0.6816525,0,-1.2489919,1.4670232,0,0)"
+ id="text4648"
+ y="223.07225"
+ x="565.86115"
+ style="font-size:31.93885994px;font-style:normal;font-weight:normal;opacity:0.9702602;fill:url(#linearGradient2802);fill-opacity:1;stroke:#0562cb;stroke-width:0.4435952px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ style="font-size:31.93885994px;fill:url(#linearGradient2802);fill-opacity:1;stroke:#0562cb;stroke-width:0.4435952;stroke-opacity:1"
+ y="223.07225"
+ x="565.86115"
+ id="tspan4650"
+ sodipodi:role="line">Simple Instant Messenger</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ transform="matrix(0.9495668,0,0,1.0170727,-131.0751,-174.12271)"
+ id="text3920"
+ y="493.31329"
+ x="239.38501"
+ style="font-size:93.5401535px;font-style:normal;font-weight:normal;line-height:125%;opacity:0.5315985;fill:url(#linearGradient2753);fill-opacity:1;stroke:url(#linearGradient2755);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter5184);font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ style="font-size:93.54016876px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient2753);fill-opacity:1;stroke:url(#linearGradient2755);stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+ y="493.31329"
+ x="239.38501"
+ id="tspan3922"
+ sodipodi:role="line">Sim-IM</tspan></text>
+ <rect
+ y="328.35123"
+ x="95.067703"
+ height="2.7207482"
+ width="316.17993"
+ id="rect3215"
+ style="opacity:0.88475821;fill:#e5ff7b;fill-opacity:1;stroke:#0562cb;stroke-width:0.47021991;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <image
+ style="fill:#ff0098;fill-opacity:1"
+ xlink:href="simsvg-template.png"
+ sodipodi:relref="simsvg-template.png"
+ width="75.991753"
+ height="75.991753"
+ id="image2432"
+ x="16.566927"
+ y="255.62393" />
+ <path
+ id="path3269"
+ d="M 16.758269,294.52697 C 16.758269,285.66526 16.835199,281.011 16.981674,281.011 C 17.104546,281.011 17.205078,281.51366 17.205078,282.12803 C 17.205078,282.74239 17.30561,283.24505 17.428483,283.24505 C 17.551355,283.24505 17.651887,283.4892 17.651887,283.7876 C 17.651887,284.086 17.802685,284.48095 17.986994,284.66526 C 18.171302,284.84957 18.322101,285.25888 18.322101,285.57483 C 18.322101,285.8908 18.422632,286.1493 18.545505,286.1493 C 18.668378,286.1493 18.768909,286.35352 18.768909,286.60313 C 18.768909,286.85273 18.919708,287.11481 19.104016,287.18554 C 19.288325,287.25626 19.439123,287.50444 19.439123,287.73704 C 19.439123,287.96964 19.539655,288.15994 19.662527,288.15994 C 19.7854,288.15994 19.885932,288.31074 19.885932,288.49505 C 19.885932,288.67936 20.03673,288.83016 20.221039,288.83016 C 20.414288,288.83016 20.556145,289.0321 20.556145,289.3072 C 20.556145,289.56958 20.807475,290.01717 21.114657,290.30185 C 21.421838,290.58654 21.673168,290.88171 21.673168,290.95779 C 21.673168,291.18553 22.293466,291.73441 22.550828,291.73441 C 22.68248,291.73441 22.79019,291.84213 22.79019,291.97378 C 22.79019,292.28308 23.358551,292.85144 23.66785,292.85144 C 23.799503,292.85144 23.907213,293.00224 23.907213,293.18654 C 23.907213,293.37086 24.014925,293.52165 24.146575,293.52165 C 24.540819,293.52165 25.024235,294.12811 25.024235,294.62272 C 25.024235,294.87724 24.916523,295.08548 24.784873,295.08548 C 24.475576,295.08548 23.907213,295.65384 23.907213,295.96314 C 23.907213,296.09479 23.7995,296.20251 23.66785,296.20251 C 23.358554,296.20251 22.79019,296.77087 22.79019,297.08017 C 22.79019,297.21182 22.682478,297.31953 22.550828,297.31953 C 22.241531,297.31953 21.673168,297.88789 21.673168,298.19719 C 21.673168,298.32884 21.52237,298.43655 21.338061,298.43655 C 21.153752,298.43655 21.002954,298.58735 21.002954,298.77166 C 21.002954,298.95597 20.902422,299.10676 20.77955,299.10676 C 20.656677,299.10676 20.556145,299.26236 20.556145,299.45254 C 20.556145,299.64271 20.304815,300.03124 19.997634,300.31593 C 19.690453,300.60061 19.439123,301.04821 19.439123,301.31057 C 19.439123,301.58567 19.297266,301.78762 19.104016,301.78762 C 18.895506,301.78762 18.768909,301.99861 18.768909,302.34613 C 18.768909,302.65331 18.668378,302.90464 18.545505,302.90464 C 18.422632,302.90464 18.322101,303.11289 18.322101,303.36741 C 18.322101,303.62192 18.171302,303.98097 17.986994,304.16528 C 17.802685,304.34959 17.651887,304.7948 17.651887,305.15464 C 17.651887,305.51448 17.551355,305.8089 17.428483,305.8089 C 17.30561,305.8089 17.205078,306.31156 17.205078,306.92592 C 17.205078,307.54029 17.104546,308.04294 16.981674,308.04294 C 16.835199,308.04294 16.758269,303.38868 16.758269,294.52697 z"
+ style="opacity:0.88475821;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ id="path3271"
+ d="M 46.917874,331.27701 C 46.917874,331.15414 47.176385,331.05361 47.492343,331.05361 C 47.808298,331.05361 48.206941,330.92794 48.378207,330.77435 C 49.117473,330.11139 49.370175,329.93658 49.589298,329.93658 C 49.717358,329.93658 49.822133,329.84695 49.822133,329.7374 C 49.822133,329.62784 50.073463,329.47513 50.380644,329.39804 C 50.687825,329.32094 50.939155,329.15924 50.939155,329.03871 C 50.939155,328.91817 51.046867,328.81956 51.178517,328.81956 C 51.487815,328.81956 52.056178,328.2512 52.056178,327.9419 C 52.056178,327.81025 52.16389,327.70254 52.29554,327.70254 C 52.604837,327.70254 53.1732,327.13418 53.1732,326.82488 C 53.1732,326.69323 53.280912,326.58551 53.412562,326.58551 C 53.721859,326.58551 54.290222,326.01715 54.290222,325.70785 C 54.290222,325.57621 54.38884,325.46849 54.509371,325.46849 C 54.6299,325.46849 54.791598,325.21716 54.868697,324.90998 C 54.952659,324.57545 55.168633,324.35147 55.407245,324.35147 C 55.645856,324.35147 55.86183,324.57545 55.945793,324.90998 C 56.022892,325.21716 56.184588,325.46849 56.305119,325.46849 C 56.425652,325.46849 56.524267,325.5762 56.524267,325.70785 C 56.524267,326.01716 57.092628,326.58551 57.401928,326.58551 C 57.53358,326.58551 57.64129,326.69323 57.64129,326.82488 C 57.64129,327.13418 58.209651,327.70254 58.51895,327.70254 C 58.650602,327.70254 58.758312,327.85333 58.758312,328.03765 C 58.758312,328.22195 58.909111,328.37275 59.093417,328.37275 C 59.277728,328.37275 59.428524,328.47328 59.428524,328.59615 C 59.428524,328.71903 59.533299,328.81956 59.661362,328.81956 C 59.880482,328.81956 60.133188,328.99437 60.87245,329.65733 C 61.043716,329.81092 61.291561,329.93658 61.423207,329.93658 C 61.554853,329.93658 61.66257,330.0352 61.66257,330.15573 C 61.66257,330.27626 61.913901,330.43796 62.221079,330.51506 C 62.528263,330.59216 62.779593,330.74487 62.779593,330.85442 C 62.779593,330.96397 63.030924,331.05361 63.338102,331.05361 C 63.645286,331.05361 63.896616,331.15414 63.896616,331.27701 C 63.896616,331.42202 60.917892,331.50041 55.407245,331.50041 C 49.8966,331.50041 46.917874,331.42202 46.917874,331.27701 z"
+ style="opacity:0.88475821;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ id="path3273"
+ d="M 92.045579,302.88868 C 92.045579,302.63416 91.919913,302.28579 91.766324,302.11452 C 91.069274,301.33724 90.928556,301.11327 90.928556,300.78106 C 90.928556,300.5857 90.67723,300.19293 90.370047,299.90824 C 90.062863,299.62356 89.811538,299.32252 89.811538,299.23927 C 89.811538,299.09503 89.59212,298.79917 88.973769,298.10965 C 88.82018,297.93838 88.694515,297.69054 88.694515,297.55889 C 88.694515,297.42724 88.543713,297.31953 88.359407,297.31953 C 88.175096,297.31953 88.0243,297.21899 88.0243,297.09612 C 88.0243,296.97325 87.878068,296.87272 87.699347,296.87272 C 87.520617,296.87272 87.123064,296.62139 86.815886,296.31421 C 86.508708,296.00703 86.152268,295.7557 86.023815,295.7557 C 85.895352,295.7557 85.790254,295.6049 85.790254,295.42059 C 85.790254,295.01588 86.377405,294.9719 86.535918,295.36474 C 86.597891,295.51833 86.656537,295.267 86.666235,294.80623 C 86.680867,294.11152 86.607573,293.96846 86.237062,293.96846 C 85.991317,293.96846 85.790254,293.86075 85.790254,293.7291 C 85.790254,293.4198 86.358615,292.85144 86.667914,292.85144 C 86.79956,292.85144 86.907277,292.75282 86.907277,292.63229 C 86.907277,292.51176 87.158607,292.35006 87.465791,292.27296 C 87.772969,292.19587 88.0243,292.04315 88.0243,291.9336 C 88.0243,291.82405 88.175096,291.73441 88.359407,291.73441 C 88.54818,291.73441 88.694515,291.53465 88.694515,291.27694 C 88.694515,291.02533 88.945845,290.58654 89.253024,290.30185 C 89.560207,290.01716 89.811538,289.71319 89.811538,289.62635 C 89.811538,289.38296 90.420899,288.83016 90.689198,288.83016 C 90.820839,288.83016 90.928556,288.57883 90.928556,288.27165 C 90.928556,287.96447 91.01819,287.71314 91.127745,287.71314 C 91.237295,287.71314 91.390011,287.4618 91.467103,287.15463 C 91.544206,286.84744 91.705902,286.59611 91.826433,286.59611 C 91.946964,286.59611 92.045579,286.34478 92.045579,286.0376 C 92.045579,285.73042 92.146113,285.47909 92.268985,285.47909 C 92.414196,285.47909 92.492387,288.60675 92.492387,294.41527 C 92.492387,300.22379 92.414196,303.35145 92.268985,303.35145 C 92.146113,303.35145 92.045579,303.14321 92.045579,302.88868 L 92.045579,302.88868 z"
+ style="opacity:0.88475821;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ id="path3275"
+ d="M 54.868697,264.14396 C 54.791598,263.83678 54.629902,263.58545 54.509371,263.58545 C 54.388837,263.58545 54.290222,263.47774 54.290222,263.34609 C 54.290222,263.03679 53.721861,262.46843 53.412562,262.46843 C 53.28091,262.46843 53.1732,262.36134 53.1732,262.23045 C 53.1732,261.79461 50.755874,259.56417 50.283512,259.56417 C 50.022335,259.56417 49.822133,259.41876 49.822133,259.22907 C 49.822133,259.04475 49.671335,258.89396 49.487026,258.89396 C 49.302717,258.89396 49.151919,258.79342 49.151919,258.67055 C 49.151919,258.54768 48.96161,258.44715 48.729013,258.44715 C 48.496412,258.44715 48.248239,258.29635 48.177512,258.11204 C 48.106786,257.92773 47.844702,257.77693 47.595099,257.77693 C 47.3455,257.77693 47.141279,257.6764 47.141279,257.55353 C 47.141279,257.43066 46.882769,257.33013 46.56681,257.33013 C 46.250856,257.33013 45.841543,257.17933 45.657234,256.99502 C 45.472923,256.81071 45.07798,256.65991 44.779574,256.65991 C 44.481173,256.65991 44.23702,256.55938 44.23702,256.43651 C 44.23702,256.31363 43.684095,256.2131 43.008296,256.2131 C 42.332498,256.2131 41.779571,256.11257 41.779571,255.9897 C 41.779571,255.84322 46.433831,255.7663 55.295542,255.7663 C 64.157255,255.7663 68.811512,255.84322 68.811512,255.9897 C 68.811512,256.11257 68.359118,256.2131 67.806194,256.2131 C 67.253266,256.2131 66.800872,256.31363 66.800872,256.43651 C 66.800872,256.55938 66.506457,256.65991 66.146619,256.65991 C 65.786781,256.65991 65.341564,256.81071 65.157253,256.99502 C 64.972942,257.17933 64.6139,257.33013 64.359381,257.33013 C 64.104862,257.33013 63.896616,257.43066 63.896616,257.55353 C 63.896616,257.6764 63.645286,257.77693 63.338102,257.77693 C 62.990586,257.77693 62.779593,257.90353 62.779593,258.11204 C 62.779593,258.30529 62.577652,258.44715 62.302551,258.44715 C 62.040172,258.44715 61.592583,258.69848 61.307897,259.00566 C 61.023216,259.31284 60.634689,259.56417 60.444515,259.56417 C 60.254336,259.56417 60.098739,259.6647 60.098739,259.78757 C 60.098739,259.91045 59.947943,260.01098 59.763632,260.01098 C 59.579326,260.01098 59.428524,260.16178 59.428524,260.34609 C 59.428524,260.53039 59.320258,260.68119 59.187939,260.68119 C 59.055615,260.68119 58.653484,260.97506 58.294319,261.33422 C 57.935154,261.69339 57.64129,262.09551 57.64129,262.22784 C 57.64129,262.36016 57.533578,262.46843 57.401928,262.46843 C 57.09263,262.46843 56.524267,263.03679 56.524267,263.34609 C 56.524267,263.47774 56.373469,263.58545 56.18916,263.58545 C 56.004852,263.58545 55.854054,263.69316 55.854054,263.82481 C 55.854054,264.06147 55.31232,264.70247 55.112315,264.70247 C 55.055423,264.70247 54.945794,264.45114 54.868697,264.14396 z"
+ style="opacity:0.88475821;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="293.61368"
+ x="85.794495"
+ height="1.8153813"
+ width="1.8910222"
+ id="rect3277"
+ style="fill:#e2e2e2;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="293.91953"
+ x="85.2659"
+ height="1.099473"
+ width="0.68136358"
+ id="rect3293"
+ style="fill:#e2e2e2;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="294.60089"
+ x="85.54464"
+ height="0.74330568"
+ width="0.44908056"
+ id="rect3295"
+ style="fill:#e2e2e2;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="293.68726"
+ x="85.575607"
+ height="0.46456608"
+ width="0.21679752"
+ id="rect3297"
+ style="fill:#e2e2e2;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ id="path3299"
+ d="M 16.702685,320.65248 C 16.702685,313.75537 16.791964,309.62677 16.941105,309.62677 C 17.072237,309.62677 17.172172,309.01103 17.163183,308.25845 C 17.154193,307.50587 17.279495,306.73028 17.44163,306.53492 C 17.603762,306.33956 17.675543,306.08122 17.601141,305.96084 C 17.526736,305.84044 17.678038,305.34607 17.937368,304.86222 C 18.196692,304.37837 18.34351,303.91713 18.263622,303.83724 C 18.183736,303.75736 18.301573,303.62169 18.525486,303.53577 C 18.7494,303.44984 18.932602,303.16848 18.932602,302.91051 C 18.932602,302.65255 19.044098,302.44148 19.18037,302.44148 C 19.316643,302.44148 19.428139,302.16274 19.428139,301.82207 C 19.428139,301.48138 19.532123,301.20264 19.659211,301.20264 C 19.786299,301.20264 19.956937,300.99264 20.0384,300.73597 C 20.119864,300.47929 20.517615,299.92283 20.922288,299.49938 C 21.326958,299.07593 21.658056,298.6225 21.658056,298.49175 C 21.658056,298.36102 21.853174,298.1404 22.091652,298.0015 C 22.330129,297.8626 22.437903,297.74556 22.331149,297.74142 C 22.004365,297.72874 24.564169,295.55866 25.110431,295.38528 C 25.781785,295.1722 25.770762,294.32808 25.088905,293.73671 C 24.79551,293.48224 24.466089,293.27405 24.356861,293.27405 C 24.138257,293.27405 22.896899,292.09074 22.896899,291.88236 C 22.896899,291.66286 22.30166,291.14944 21.84806,290.97771 C 21.588463,290.87942 21.476464,290.66443 21.564858,290.43409 C 21.645274,290.22452 21.587648,290.05305 21.436797,290.05305 C 21.285942,290.05305 21.162519,289.94663 21.162519,289.81655 C 21.162519,289.68647 20.911654,289.30685 20.60504,288.97295 C 19.601295,287.87987 19.428139,287.60288 19.428139,287.09029 C 19.428139,286.81199 19.316643,286.5843 19.18037,286.5843 C 19.044098,286.5843 18.932602,286.3613 18.932602,286.08876 C 18.932602,285.81621 18.842563,285.59322 18.732516,285.59322 C 18.392902,285.59322 17.59732,283.52707 17.652322,282.78793 C 17.683831,282.36453 17.604523,282.15037 17.45129,282.24507 C 17.194711,282.40364 17.108745,281.72677 17.192102,280.20425 C 17.216349,279.76137 17.116151,279.39901 16.969438,279.39901 C 16.782689,279.39901 16.702685,275.86607 16.702685,267.61908 L 16.702685,255.83916 L 28.905287,255.93664 C 40.851831,256.03209 42.921623,256.13134 43.225702,256.62336 C 43.308337,256.75707 43.749207,256.83803 44.205403,256.80327 C 44.690212,256.76633 45.076927,256.86628 45.136109,257.04383 C 45.191797,257.2109 45.506815,257.3476 45.836139,257.3476 C 46.165463,257.3476 46.434914,257.44395 46.434914,257.56171 C 46.434914,257.67947 46.936646,257.96743 47.549873,258.20163 C 48.1631,258.43582 48.664831,258.72971 48.664831,258.85471 C 48.664831,258.97971 48.887823,259.08199 49.160368,259.08199 C 49.432914,259.08199 49.655906,259.19348 49.655906,259.32975 C 49.655906,259.46603 49.82315,259.57752 50.027558,259.57752 C 50.231968,259.57752 50.399211,259.7076 50.399211,259.86659 C 50.399211,260.02557 50.461716,260.09314 50.538113,260.01675 C 50.614507,259.94035 50.976869,260.15287 51.343361,260.48901 C 51.70985,260.82514 52.09233,261.17568 52.193316,261.26798 C 52.645516,261.68127 54.283502,263.54827 54.707924,264.13418 C 54.965487,264.48975 55.303072,264.78066 55.458108,264.78066 C 55.789737,264.78066 56.593426,263.89617 56.593426,263.53121 C 56.593426,263.39222 56.760031,263.21457 56.963656,263.13643 C 57.167283,263.05829 57.282584,262.91135 57.219881,262.80989 C 57.157181,262.70844 57.380809,262.47829 57.716841,262.29845 C 58.052875,262.11861 58.328567,261.85094 58.329498,261.70363 C 58.330427,261.55631 58.717699,261.17258 59.190095,260.85089 C 59.662497,260.52919 60.336449,259.99958 60.68778,259.67398 C 61.039111,259.34839 61.48806,259.08199 61.685447,259.08199 C 61.882835,259.08199 62.044336,258.97945 62.044336,258.85413 C 62.044336,258.72881 62.601813,258.44111 63.283179,258.21479 C 63.964539,257.98848 64.522022,257.70078 64.522022,257.57546 C 64.522022,257.45014 64.79147,257.3476 65.120797,257.3476 C 65.450123,257.3476 65.765136,257.21091 65.820825,257.04383 C 65.88001,256.86628 66.266719,256.76633 66.751529,256.80327 C 67.207733,256.83803 67.653858,256.74855 67.742933,256.60442 C 68.03455,256.13258 69.7079,256.05028 81.184457,255.94335 L 92.519869,255.83773 L 92.516075,270.90131 C 92.513606,280.71822 92.428627,285.83543 92.272102,285.59322 C 92.067398,285.27647 92.031357,285.28635 92.028128,285.66009 C 92.026039,285.90127 91.745593,286.54016 91.40491,287.07983 C 91.064227,287.61951 90.785491,288.2037 90.785491,288.37804 C 90.785491,288.55237 90.557443,288.83743 90.278712,289.0115 C 89.999987,289.18557 89.444923,289.84363 89.045245,290.47386 C 88.645562,291.1041 87.88967,291.90834 87.365493,292.26107 C 84.365416,294.27986 84.355214,294.86944 87.287553,296.76447 C 88.473249,297.53072 90.288903,299.80444 91.425164,301.94595 C 91.82285,302.69545 92.231841,303.34584 92.334043,303.39126 C 92.436246,303.43669 92.519869,309.81983 92.519869,317.57602 L 92.519869,331.67818 L 78.520945,331.67818 C 70.027852,331.67818 64.522022,331.5873 64.522022,331.44711 C 64.522022,331.22393 63.87031,330.94083 63.09438,330.82695 C 62.887972,330.79665 62.595144,330.60402 62.443654,330.39888 C 62.29217,330.19374 61.849839,329.94659 61.460706,329.84968 C 61.05362,329.74828 60.697873,329.46189 60.622896,329.17519 C 60.546122,328.88162 60.353304,328.73038 60.153509,328.80705 C 59.967005,328.87862 59.814417,328.82568 59.814417,328.6894 C 59.814417,328.55312 59.636041,328.37318 59.418025,328.28952 C 58.911288,328.09507 57.832269,327.02134 57.832269,326.71154 C 57.832269,326.58147 57.658444,326.47504 57.445992,326.47504 C 57.233541,326.47504 57.121406,326.37523 57.196802,326.25323 C 57.272198,326.13123 57.167283,325.96749 56.963656,325.88935 C 56.760031,325.81122 56.593426,325.61749 56.593426,325.45886 C 56.593426,325.08498 55.624237,324.24512 55.192788,324.24512 C 55.009233,324.24512 54.859046,324.41236 54.859046,324.61677 C 54.859046,324.82118 54.740969,324.98843 54.596654,324.98843 C 54.452339,324.98843 54.403172,325.09992 54.487393,325.23619 C 54.571615,325.37246 54.474211,325.48397 54.270942,325.48397 C 54.067676,325.48397 53.830591,325.70696 53.744087,325.9795 C 53.657584,326.25204 53.49034,326.47504 53.372434,326.47504 C 53.254529,326.47504 53.089094,326.69233 53.004805,326.9579 C 52.920514,327.22347 52.606386,327.51821 52.306744,327.61287 C 52.007101,327.70753 51.616245,327.99197 51.438179,328.24496 C 51.260111,328.49797 50.953497,328.70495 50.756816,328.70495 C 50.560132,328.70495 50.399211,328.8722 50.399211,329.07661 C 50.399211,329.28102 50.231968,329.44826 50.027558,329.44826 C 49.82315,329.44826 49.655906,329.55976 49.655906,329.69603 C 49.655906,329.8323 49.426333,329.9438 49.145745,329.9438 C 48.865157,329.9438 48.704494,330.05529 48.788715,330.19156 C 48.872937,330.32784 48.768022,330.43933 48.55557,330.43933 C 48.343119,330.43933 48.169294,330.56941 48.169294,330.7284 C 48.169294,330.88738 48.104067,330.95224 48.024347,330.87251 C 47.82332,330.67149 46.434914,331.17999 46.434914,331.45465 C 46.434914,331.58502 40.239716,331.67818 31.568799,331.67818 L 16.702685,331.67818 L 16.702685,320.65248 z M 40.576959,325.85562 C 40.781365,325.65121 41.291063,325.48397 41.709613,325.48397 C 42.128168,325.48397 42.470617,325.37246 42.470617,325.23619 C 42.470617,325.09992 42.679991,324.98843 42.935897,324.98843 C 43.597572,324.98843 45.196071,324.28514 45.196071,323.99403 C 45.196071,323.85958 45.338702,323.74958 45.513027,323.74958 C 45.687352,323.74958 45.990705,323.52659 46.187146,323.25405 C 46.383587,322.9815 46.659065,322.75673 46.799322,322.75455 C 47.237048,322.74776 48.664831,321.35099 48.664831,320.92956 C 48.664831,320.70903 48.791909,320.52859 48.947228,320.52859 C 49.327994,320.52859 49.886063,319.76331 49.895795,319.22781 C 49.900129,318.98933 50.01517,318.79421 50.151443,318.79421 C 50.287715,318.79421 50.399211,318.51547 50.399211,318.17479 C 50.399211,317.78937 50.539614,317.55537 50.770864,317.55537 C 50.975273,317.55537 51.142517,317.33896 51.142517,317.07445 C 51.142517,316.80995 51.254013,316.52463 51.390286,316.44041 C 51.526558,316.35619 51.638054,315.73638 51.638054,315.06306 C 51.638054,314.38974 51.74955,313.83884 51.885823,313.83884 C 52.028979,313.83884 52.133591,313.05424 52.133591,311.98058 C 52.133591,310.90691 52.028979,310.12231 51.885823,310.12231 C 51.74955,310.12231 51.638054,309.66837 51.638054,309.11354 C 51.638054,308.14043 51.216439,307.39686 50.664678,307.39686 C 50.518668,307.39686 50.399211,307.28536 50.399211,307.14909 C 50.399211,307.01282 50.176219,306.90132 49.903674,306.90132 C 49.628376,306.90132 49.408137,306.73614 49.408137,306.52966 C 49.408137,306.31736 49.185177,306.15801 48.888123,306.15801 C 48.602116,306.15801 48.05565,305.82353 47.673757,305.41471 C 47.291864,305.00589 46.903348,304.6714 46.810387,304.6714 C 46.551621,304.6714 44.948303,302.96083 44.948303,302.68475 C 44.948303,302.55095 44.781059,302.44148 44.57665,302.44148 C 44.372241,302.44148 44.204997,302.27424 44.204997,302.06983 C 44.204997,301.86542 44.093501,301.69818 43.957228,301.69818 C 43.820956,301.69818 43.70946,301.47519 43.70946,301.20264 C 43.70946,300.9301 43.597964,300.70711 43.461691,300.70711 C 43.325419,300.70711 43.213923,300.42837 43.213923,300.08768 C 43.213923,299.70227 43.07352,299.46826 42.84227,299.46826 C 42.635797,299.46826 42.470617,299.24802 42.470617,298.97272 C 42.470617,298.53725 42.305437,298.47719 41.10789,298.47719 C 40.061756,298.47719 39.745162,298.39084 39.745162,298.10554 C 39.745162,297.81094 39.389241,297.73388 38.028481,297.73388 C 36.832896,297.73388 36.198982,297.8467 35.940146,298.10554 C 35.7315,298.31418 35.126048,298.47719 34.559721,298.47719 C 34.004892,298.47719 33.550948,298.58868 33.550948,298.72496 C 33.550948,298.86123 33.185326,298.97272 32.738455,298.97272 C 32.210196,298.97272 31.801016,299.14608 31.568799,299.46826 C 31.372359,299.74081 30.95751,299.9638 30.646912,299.9638 C 30.336314,299.9638 30.082188,300.08326 30.082188,300.22927 C 30.082188,300.5959 29.443788,301.20097 29.04687,301.21052 C 28.671718,301.21955 27.852271,301.79298 27.852271,302.04647 C 27.852271,302.13984 27.601405,302.48454 27.294792,302.81247 C 26.365478,303.80638 26.117891,304.14312 26.117891,304.41318 C 26.117891,304.5552 26.006395,304.6714 25.870122,304.6714 C 25.73385,304.6714 25.622354,304.89439 25.622354,305.16694 C 25.622354,305.43949 25.510858,305.66248 25.374585,305.66248 C 25.238313,305.66248 25.126817,305.89343 25.126817,306.17571 C 25.126817,306.45799 24.959572,306.85619 24.755164,307.0606 C 24.550754,307.26501 24.383511,307.81452 24.383511,308.28174 C 24.383511,308.74896 24.272015,309.13124 24.135742,309.13124 C 23.975352,309.13124 23.887974,312.14575 23.887974,317.67925 L 23.887974,326.22727 L 32.046636,326.22727 C 38.968428,326.22727 40.261648,326.17093 40.576957,325.85562 L 40.576959,325.85562 z M 86.982495,317.86508 C 86.87809,309.06598 86.749452,307.39686 86.175746,307.39686 C 85.956894,307.39686 85.830119,307.12421 85.830119,306.65355 C 85.830119,306.24473 85.718624,305.91025 85.582352,305.91025 C 85.446074,305.91025 85.334579,305.6315 85.334579,305.29082 C 85.334579,304.95014 85.223084,304.6714 85.086811,304.6714 C 84.950539,304.6714 84.839044,304.5552 84.839044,304.41318 C 84.839044,304.14312 84.591456,303.80638 83.662143,302.81247 C 83.355529,302.48454 83.104666,302.11176 83.104666,301.98407 C 83.104666,301.85638 82.846481,301.6871 82.530934,301.6079 C 81.844625,301.43565 80.874747,300.6372 80.874747,300.24445 C 80.874747,300.0901 80.596006,299.9638 80.255323,299.9638 C 79.914646,299.9638 79.635905,299.8523 79.635905,299.71603 C 79.635905,299.57976 79.412914,299.46826 79.140364,299.46826 C 78.86782,299.46826 78.644829,299.35677 78.644829,299.2205 C 78.644829,299.08422 78.366088,298.97272 78.02541,298.97272 C 77.684727,298.97272 77.405986,298.86123 77.405986,298.72496 C 77.405986,298.58868 76.952042,298.47719 76.397214,298.47719 C 75.830891,298.47719 75.225437,298.31418 75.01679,298.10554 C 74.757949,297.8467 74.124036,297.73388 72.928453,297.73388 C 71.567697,297.73388 71.211771,297.81094 71.211771,298.10554 C 71.211771,298.38762 70.905291,298.47719 69.94005,298.47719 C 68.52242,298.47719 67.74301,299.06197 67.74301,300.1256 C 67.74301,300.44542 67.631515,300.70711 67.495243,300.70711 C 67.35897,300.70711 67.247475,300.87435 67.247475,301.07876 C 67.247475,301.28317 67.13598,301.45041 66.999707,301.45041 C 66.863435,301.45041 66.75194,301.6734 66.75194,301.94595 C 66.75194,302.21849 66.632476,302.44148 66.48647,302.44148 C 66.201368,302.44148 65.513097,303.05012 65.513097,303.30224 C 65.513097,303.49754 64.344744,304.6714 64.150365,304.6714 C 64.069843,304.6714 63.726357,304.949 63.387065,305.2883 C 63.047774,305.62758 62.495364,305.97416 62.159486,306.05846 C 61.823609,306.14276 61.548795,306.36689 61.548795,306.55653 C 61.548795,306.76231 61.290108,306.90132 60.907146,306.90132 C 59.953272,306.90132 59.336913,307.79536 59.327122,309.19318 C 59.322594,309.84047 59.207387,310.37008 59.071109,310.37008 C 58.931346,310.37008 58.823343,311.07209 58.823343,311.98058 C 58.823343,312.88906 58.931346,313.59107 59.071109,313.59107 C 59.207387,313.59107 59.318882,314.19772 59.318882,314.93918 C 59.318882,315.68063 59.430378,316.35619 59.56665,316.44041 C 59.702922,316.52463 59.814417,316.80995 59.814417,317.07445 C 59.814417,317.33896 59.981663,317.55537 60.186069,317.55537 C 60.41732,317.55537 60.557725,317.78937 60.557725,318.17479 C 60.557725,318.51547 60.66922,318.79421 60.805493,318.79421 C 60.941765,318.79421 61.05326,319.02227 61.05326,319.30101 C 61.05326,319.57975 61.304124,320.07611 61.610737,320.40404 C 62.513405,321.36945 62.787638,321.73317 62.787638,321.96497 C 62.787638,322.08512 63.066379,322.31043 63.407062,322.46566 C 63.747745,322.62088 64.026481,322.86177 64.026481,323.00097 C 64.026481,323.14015 64.249477,323.25405 64.522022,323.25405 C 64.794566,323.25405 65.017557,323.36554 65.017557,323.50181 C 65.017557,323.63809 65.172876,323.74958 65.362701,323.74958 C 65.552531,323.74958 65.76625,323.90178 65.837633,324.08781 C 65.909017,324.27383 66.478425,324.57691 67.102988,324.76132 C 67.727546,324.94573 68.23855,325.18376 68.23855,325.29029 C 68.23855,325.39681 68.63675,325.48397 69.123439,325.48397 C 69.610123,325.48397 70.175568,325.65121 70.379979,325.85562 C 70.6953,326.17094 71.989215,326.22727 78.916675,326.22727 L 87.081715,326.22727 L 86.982495,317.86508 z M 58.327806,300.47603 C 58.327806,300.34894 58.559279,300.1715 58.842188,300.0817 C 59.482791,299.87838 61.05326,298.37684 61.05326,297.96768 C 61.05326,297.801 61.225686,297.53855 61.436432,297.38444 C 62.003643,296.96969 62.011493,292.06183 61.445612,291.64805 C 61.229819,291.49026 61.05326,291.20294 61.05326,291.00957 C 61.05326,290.8162 60.830269,290.49727 60.557725,290.30083 C 60.285176,290.10438 60.062185,289.84119 60.062185,289.71596 C 60.062185,289.38123 59.261746,288.83119 58.761401,288.82209 C 58.522923,288.81776 58.327806,288.70272 58.327806,288.56644 C 58.327806,288.43017 57.826074,288.31868 57.212847,288.31868 C 56.59962,288.31868 56.097889,288.20718 56.097889,288.07091 C 56.097889,287.93464 55.819149,287.82314 55.478467,287.82314 C 55.137785,287.82314 54.859046,287.93464 54.859046,288.07091 C 54.859046,288.20718 54.357315,288.31868 53.744087,288.31868 C 53.13086,288.31868 52.629129,288.43017 52.629129,288.56644 C 52.629129,288.70272 52.434011,288.81776 52.195533,288.82209 C 51.731939,288.83052 50.894748,289.37267 50.894748,289.66447 C 50.894748,289.93529 50.21953,290.5486 49.921372,290.5486 C 49.775362,290.5486 49.655906,290.77159 49.655906,291.04413 C 49.655906,291.31667 49.54441,291.53967 49.408137,291.53967 C 49.271864,291.53967 49.160368,292.09715 49.160368,292.77851 C 49.160368,293.45987 49.048872,294.01735 48.9126,294.01735 C 48.776327,294.01735 48.664831,294.29609 48.664831,294.63678 C 48.664831,294.97746 48.776327,295.25619 48.9126,295.25619 C 49.048872,295.25619 49.160368,295.6956 49.160368,296.23265 C 49.160368,296.7697 49.271864,297.27801 49.408137,297.36223 C 49.54441,297.44645 49.655906,297.73177 49.655906,297.99627 C 49.655906,298.26078 49.775365,298.47719 49.921372,298.47719 C 50.219527,298.47719 50.894748,299.09049 50.894748,299.36131 C 50.894748,299.6531 51.731939,300.19526 52.195533,300.20369 C 52.434011,300.20802 52.629129,300.32306 52.629129,300.45934 C 52.629129,300.61016 53.744087,300.70711 55.478467,300.70711 C 57.075591,300.70711 58.327806,300.60556 58.327806,300.47603 L 58.327806,300.47603 z M 39.001857,290.79636 C 39.001857,290.65977 39.644341,290.5486 40.433771,290.5486 C 41.581452,290.5486 41.936581,290.45023 42.222848,290.05305 C 42.419289,289.78051 42.722642,289.55752 42.896967,289.55752 C 43.071292,289.55752 43.213923,289.27878 43.213923,288.9381 C 43.213923,288.59742 43.325419,288.31868 43.461691,288.31868 C 43.597964,288.31868 43.70946,288.09569 43.70946,287.82314 C 43.70946,287.55059 43.820956,287.3276 43.957228,287.3276 C 44.093501,287.3276 44.204997,287.16036 44.204997,286.95595 C 44.204997,286.75154 44.372241,286.5843 44.57665,286.5843 C 44.781059,286.5843 44.948303,286.47345 44.948303,286.33797 C 44.948303,286.03831 47.065787,283.85884 47.356925,283.85884 C 47.471018,283.85884 47.725085,283.63585 47.921525,283.36331 C 48.117967,283.09076 48.532815,282.86777 48.843413,282.86777 C 49.18021,282.86777 49.408137,282.71776 49.408137,282.49611 C 49.408137,282.28964 49.628376,282.12446 49.903674,282.12446 C 50.176219,282.12446 50.399211,282.01297 50.399211,281.87669 C 50.399211,281.74042 50.518671,281.62893 50.664678,281.62893 C 51.288401,281.62893 51.638054,280.87877 51.638054,279.54059 C 51.638054,278.78135 51.74955,278.16017 51.885823,278.16017 C 52.022096,278.16017 52.133591,277.65843 52.133591,277.04521 C 52.133591,276.43198 52.022096,275.93025 51.885823,275.93025 C 51.74629,275.93025 51.638054,275.23311 51.638054,274.33437 C 51.638054,273.45664 51.526558,272.66959 51.390286,272.58537 C 51.254013,272.50115 51.142517,272.21583 51.142517,271.95133 C 51.142517,271.68682 50.975273,271.47041 50.770864,271.47041 C 50.539614,271.47041 50.399211,271.23641 50.399211,270.85099 C 50.399211,270.51031 50.287715,270.23157 50.151443,270.23157 C 50.01517,270.23157 49.903674,270.00858 49.903674,269.73603 C 49.903674,269.46349 49.792178,269.2405 49.655906,269.2405 C 49.519633,269.2405 49.408137,269.07325 49.408137,268.86884 C 49.408137,268.66444 49.240893,268.49719 49.036484,268.49719 C 48.830011,268.49719 48.664831,268.27695 48.664831,268.00165 C 48.664831,267.72911 48.553335,267.50611 48.417063,267.50611 C 48.28079,267.50611 48.169294,267.33887 48.169294,267.13446 C 48.169294,266.93005 48.002995,266.76281 47.79974,266.76281 C 47.596483,266.76281 47.290927,266.53982 47.12072,266.26727 C 46.950511,265.99473 46.615079,265.77174 46.375314,265.77174 C 46.135545,265.77174 45.939377,265.66024 45.939377,265.52397 C 45.939377,265.3877 45.784061,265.2762 45.594233,265.2762 C 45.404403,265.2762 45.184912,265.10896 45.106471,264.90454 C 45.028032,264.70014 44.793113,264.53289 44.584425,264.53289 C 44.375742,264.53289 44.204997,264.4214 44.204997,264.28513 C 44.204997,264.14885 43.814762,264.03736 43.337807,264.03736 C 42.860852,264.03736 42.470617,263.92586 42.470617,263.78959 C 42.470617,263.65331 42.136129,263.54182 41.727311,263.54182 C 41.318493,263.54182 40.984005,263.43032 40.984005,263.29405 C 40.984005,263.13366 37.969487,263.04628 32.43599,263.04628 L 23.887974,263.04628 L 23.887974,271.47041 C 23.887974,276.92132 23.975421,279.89454 24.135742,279.89454 C 24.272015,279.89454 24.383511,280.28478 24.383511,280.76174 C 24.383511,281.36739 24.495596,281.62893 24.755164,281.62893 C 25.014731,281.62893 25.126817,281.89046 25.126817,282.49611 C 25.126817,282.97307 25.238313,283.36331 25.374585,283.36331 C 25.510858,283.36331 25.622354,283.5863 25.622354,283.85884 C 25.622354,284.13139 25.73385,284.35438 25.870122,284.35438 C 26.006395,284.35438 26.117891,284.47058 26.117891,284.61261 C 26.117891,284.88266 26.365478,285.2194 27.294792,286.21331 C 27.601405,286.54123 27.852271,286.92611 27.852271,287.06857 C 27.852271,287.21104 28.019515,287.3276 28.223923,287.3276 C 28.428333,287.3276 28.595576,287.4391 28.595576,287.57537 C 28.595576,287.71164 28.770784,287.82314 28.984928,287.82314 C 29.429915,287.82314 30.082188,288.40177 30.082188,288.79651 C 30.082188,288.94253 30.360927,289.06198 30.701609,289.06198 C 31.042291,289.06198 31.321031,289.17348 31.321031,289.30975 C 31.321031,289.44602 31.544023,289.55752 31.816568,289.55752 C 32.089113,289.55752 32.312105,289.66902 32.312105,289.80529 C 32.312105,289.94156 32.590845,290.05305 32.931527,290.05305 C 33.272209,290.05305 33.550948,290.16455 33.550948,290.30083 C 33.550948,290.44059 34.252958,290.5486 35.161444,290.5486 C 36.06993,290.5486 36.77194,290.65659 36.77194,290.79636 C 36.77194,290.93263 37.273671,291.04413 37.886898,291.04413 C 38.500125,291.04413 39.001857,290.93263 39.001857,290.79636 z M 74.184992,290.79636 C 74.184992,290.65659 74.887007,290.5486 75.795492,290.5486 C 76.703976,290.5486 77.405986,290.44059 77.405986,290.30083 C 77.405986,290.16455 77.684727,290.05305 78.02541,290.05305 C 78.366088,290.05305 78.644829,289.94156 78.644829,289.80529 C 78.644829,289.66902 78.86782,289.55752 79.140364,289.55752 C 79.412914,289.55752 79.635905,289.44602 79.635905,289.30975 C 79.635905,289.17348 79.914646,289.06198 80.255323,289.06198 C 80.596006,289.06198 80.874747,288.94252 80.874747,288.79651 C 80.874747,288.40177 81.527019,287.82314 81.972005,287.82314 C 82.186155,287.82314 82.361358,287.71164 82.361358,287.57537 C 82.361358,287.4391 82.528604,287.3276 82.733009,287.3276 C 82.93742,287.3276 83.104666,287.16036 83.104666,286.95595 C 83.104666,286.75154 83.216161,286.5843 83.352433,286.5843 C 83.488706,286.5843 83.600201,286.3613 83.600201,286.08876 C 83.600201,285.81621 83.719659,285.59322 83.865665,285.59322 C 84.208695,285.59322 84.839044,284.96287 84.839044,284.61984 C 84.839044,284.47383 84.950539,284.35438 85.086811,284.35438 C 85.223084,284.35438 85.334579,284.13139 85.334579,283.85884 C 85.334579,283.5863 85.446074,283.36331 85.582352,283.36331 C 85.718624,283.36331 85.830119,282.97307 85.830119,282.49611 C 85.830119,281.91948 85.945922,281.62893 86.175746,281.62893 C 86.747963,281.62893 86.877766,279.96453 86.98249,271.28458 L 87.081885,263.04628 L 78.527409,263.04628 C 72.989599,263.04628 69.972928,263.13365 69.972928,263.29405 C 69.972928,263.43032 69.526947,263.54182 68.981853,263.54182 C 68.436764,263.54182 67.990783,263.65331 67.990783,263.78959 C 67.990783,263.92586 67.712042,264.03736 67.371359,264.03736 C 67.030676,264.03736 66.75194,264.14885 66.75194,264.28513 C 66.75194,264.4214 66.544562,264.53289 66.291106,264.53289 C 66.037644,264.53289 65.620952,264.81163 65.365109,265.15231 C 65.109271,265.493 64.703417,265.77174 64.463211,265.77174 C 64.223006,265.77174 64.026481,265.88323 64.026481,266.0195 C 64.026481,266.15578 63.907023,266.26727 63.761017,266.26727 C 63.417988,266.26727 62.787638,266.89762 62.787638,267.24065 C 62.787638,267.38666 62.620398,267.50611 62.415987,267.50611 C 62.209512,267.50611 62.044336,267.72635 62.044336,268.00165 C 62.044336,268.2742 61.93284,268.49719 61.796568,268.49719 C 61.660291,268.49719 61.548795,268.63982 61.548795,268.81415 C 61.548795,268.98847 61.325805,269.29182 61.05326,269.48826 C 60.780716,269.68471 60.557725,270.05177 60.557725,270.30397 C 60.557725,270.55617 60.390479,270.92975 60.186069,271.13416 C 59.981663,271.33857 59.814417,271.71426 59.814417,271.96903 C 59.814417,272.22379 59.702922,272.50115 59.56665,272.58537 C 59.430378,272.66959 59.318882,273.23365 59.318882,273.83884 C 59.318882,274.44402 59.207387,274.93917 59.071109,274.93917 C 58.926582,274.93917 58.823343,275.76507 58.823343,276.92132 C 58.823343,278.07757 58.926582,278.90347 59.071109,278.90347 C 59.207387,278.90347 59.318882,279.34034 59.318882,279.87428 C 59.318882,281.16474 59.522533,281.62893 60.088697,281.62893 C 60.346661,281.62893 60.557725,281.74042 60.557725,281.87669 C 60.557725,282.01297 60.780716,282.12446 61.05326,282.12446 C 61.328556,282.12446 61.548795,282.28964 61.548795,282.49611 C 61.548795,282.70842 61.771755,282.86777 62.068809,282.86777 C 62.35482,282.86777 62.901285,283.20226 63.283179,283.61107 C 63.665072,284.01989 64.049358,284.35438 64.13715,284.35438 C 64.341058,284.35438 65.513097,285.52064 65.513097,285.72354 C 65.513097,285.97566 66.201368,286.5843 66.48647,286.5843 C 66.632482,286.5843 66.75194,286.83842 66.75194,287.14902 C 66.75194,287.45962 66.974931,287.87447 67.247475,288.07091 C 67.520019,288.26735 67.74301,288.61733 67.74301,288.84865 C 67.74301,289.59865 68.033446,290.05305 68.512825,290.05305 C 68.770789,290.05305 68.981853,290.16455 68.981853,290.30083 C 68.981853,290.43848 69.64257,290.5486 70.468469,290.5486 C 71.294362,290.5486 71.955079,290.65871 71.955079,290.79636 C 71.955079,290.93263 72.456811,291.04413 73.070038,291.04413 C 73.683266,291.04413 74.184992,290.93263 74.184992,290.79636 z"
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4036"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="11.431912"
+ sodipodi:ry="10.493472"
+ d="M 56.403464,346.90986 A 11.431912,10.493472 0 0 1 48.921256,353.23271 L 45.72765,343.15701 z"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.28767"
+ transform="matrix(1.2145394,0,0,1.1937629,-12.910471,-90.147191)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4038"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="11.431912"
+ sodipodi:ry="10.493472"
+ d="M 56.403464,346.90986 A 11.431912,10.493472 0 0 1 48.921256,353.23271 L 45.72765,343.15701 z"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.28767"
+ transform="matrix(-1.2145394,0,0,1.1937629,123.78917,-90.00482)" />
+ <g
+ id="g4040"
+ transform="matrix(0.5134015,0,0,0.5134015,7.543994,164.85362)">
+ <rect
+ y="283.33594"
+ x="31.851732"
+ height="30.674253"
+ width="31.625395"
+ id="rect4026"
+ style="opacity:1;fill:#ff0098;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ transform="matrix(1.9189189,0,0,2.1443299,-53.347083,-312.62247)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4030"
+ style="opacity:1;fill:#ff0098;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0,-1.9189189,-2.1443299,0,658.50661,399.38175)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4032"
+ style="opacity:1;fill:#ff0098;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4077"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="11.431912"
+ sodipodi:ry="10.493472"
+ d="M 56.403464,346.90986 A 11.431912,10.493472 0 0 1 48.921256,353.23271 L 45.72765,343.15701 z"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.28767"
+ transform="matrix(0,1.2725604,1.267535,0,-355.26255,223.34525)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4045"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="12.553924"
+ sodipodi:ry="10.493472"
+ d="M 57.451266,346.90986 A 12.553924,10.493472 0 0 1 49.2347,353.23271 L 45.72765,343.15701 z"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.28767"
+ transform="matrix(-1.7217588,0,0,-1.4642608,154.00673,772.95372)" />
+ <g
+ id="g4055"
+ transform="matrix(-0.5134015,0,0,-0.5134015,103.40601,424.4059)"
+ style="fill:#ffbc00;fill-opacity:1">
+ <rect
+ y="283.33594"
+ x="31.851732"
+ height="30.674253"
+ width="31.625395"
+ id="rect4057"
+ style="opacity:1;fill:#ffbc00;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ transform="matrix(1.9189189,0,0,2.1443299,-53.347083,-312.62247)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4059"
+ style="opacity:1;fill:#ffbc00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0,-1.9189189,-2.1443299,0,658.50661,399.38175)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4061"
+ style="opacity:1;fill:#ffbc00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4079"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="11.431912"
+ sodipodi:ry="10.493472"
+ d="M 56.403464,346.90986 A 11.431912,10.493472 0 0 1 48.921256,353.23271 L 45.72765,343.15701 z"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.28767"
+ transform="matrix(0,-1.2725604,1.267535,0,-355.38643,366.0114)" />
+ <g
+ id="g4063"
+ transform="matrix(0,-0.5134015,0.5134015,0,-74.209399,342.38033)"
+ style="fill:#96ff00;fill-opacity:1">
+ <rect
+ y="283.33594"
+ x="31.851732"
+ height="30.674253"
+ width="31.625395"
+ id="rect4065"
+ style="opacity:1;fill:#96ff00;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ transform="matrix(1.9189189,0,0,2.1443299,-53.347083,-312.62247)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4067"
+ style="opacity:1;fill:#96ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0,-1.9189189,-2.1443299,0,658.50661,399.38175)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4069"
+ style="opacity:1;fill:#96ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4075"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="12.553924"
+ sodipodi:ry="10.493472"
+ d="M 57.451266,346.90986 A 12.553924,10.493472 0 0 1 49.2347,353.23271 L 45.72765,343.15701 z"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.28767"
+ transform="matrix(1.7217588,0,0,-1.4642608,-43.124242,772.96686)" />
+ <g
+ id="g4047"
+ transform="matrix(0.5134015,0,0,-0.5134015,7.5064708,424.28202)"
+ style="fill:#00b1ff;fill-opacity:1">
+ <rect
+ y="283.33594"
+ x="31.851732"
+ height="30.674253"
+ width="31.625395"
+ id="rect4049"
+ style="opacity:1;fill:#00b1ff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ transform="matrix(1.9189189,0,0,2.1443299,-53.347083,-312.62247)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4051"
+ style="opacity:1;fill:#00b1ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0,-1.9189189,-2.1443299,0,658.50661,399.38175)"
+ sodipodi:open="true"
+ sodipodi:end="5.1698561"
+ sodipodi:start="0.90543097"
+ d="M 66.05922,287.35471 A 13.392205,11.703098 0 1 1 63.706618,267.64826"
+ sodipodi:ry="11.703098"
+ sodipodi:rx="13.392205"
+ sodipodi:cy="278.14798"
+ sodipodi:cx="57.791588"
+ id="path4053"
+ style="opacity:1;fill:#00b1ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4073"
+ sodipodi:cx="49.34605"
+ sodipodi:cy="342.57532"
+ sodipodi:rx="12.668302"
+ sodipodi:ry="10.496593"
+ d="M 62.014352,342.57532 A 12.668302,10.496593 0 1 1 62.009916,342.29756"
+ sodipodi:start="1.3769492e-15"
+ sodipodi:end="6.2567208"
+ sodipodi:open="true"
+ transform="matrix(1.1561229,0,0,1.4474719,-1.4390008,-200.91108)" />
+ <path
+ transform="matrix(0.5265357,0,0,0.705782,6.4413566,116.65894)"
+ sodipodi:open="true"
+ sodipodi:end="6.2567208"
+ sodipodi:start="1.3769492e-15"
+ d="M 108.58545,252.44942 A 15.201962,11.341146 0 1 1 108.58012,252.14931"
+ sodipodi:ry="11.341146"
+ sodipodi:rx="15.201962"
+ sodipodi:cy="252.44942"
+ sodipodi:cx="93.383484"
+ id="path3301"
+ style="fill:#1ffcb6;fill-opacity:1;fill-rule:nonzero;stroke:#948a00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3319);enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4081"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="12.553924"
+ sodipodi:ry="10.493472"
+ d="M 57.451266,346.90986 A 12.553924,10.493472 0 0 1 48.766391,353.33844"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.3263129"
+ transform="matrix(0,-1.7217588,-1.5798862,0,574.72358,392.65002)"
+ sodipodi:open="true" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path4083"
+ sodipodi:cx="45.72765"
+ sodipodi:cy="343.15701"
+ sodipodi:rx="12.553924"
+ sodipodi:ry="10.493472"
+ d="M 57.451266,346.90986 A 12.553924,10.493472 0 0 1 48.856156,353.31942"
+ sodipodi:start="0.36573609"
+ sodipodi:end="1.3189366"
+ transform="matrix(0,1.7217588,-1.4642608,0,533.86868,196.26551)"
+ sodipodi:open="true" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4812"
+ width="1.3627272"
+ height="6.1942143"
+ x="16.587547"
+ y="307.46936" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4814"
+ width="1.3627272"
+ height="6.1942143"
+ x="16.649488"
+ y="275.25946" />
+ <rect
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.91718495;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4816"
+ width="399.00552"
+ height="83.311096"
+ x="15.962122"
+ y="255.01808" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4818"
+ width="1.3627272"
+ height="1.9018427"
+ x="25.039509"
+ y="292.55734" />
+ </g>
+</svg>
|
|
Added |
sim-0.9.5.tar.bz2/plugins/splash/simsvg-template.png
^
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/splash/splash.cpp
^
|
@@ -59,7 +59,7 @@
// FIXME: better use QSplash with QSplashScreen::drawContents()
if (!pict.isNull()){
KAboutData *about_data = getAboutData();
- QString text = QString("%1%2").arg(about_data->appName()).arg("-IM");
+ QString text = about_data->programName();
text += " ";
text += about_data->version();
QPainter p(&pict);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/update/update.cpp
^
|
@@ -20,6 +20,7 @@
#include "core.h"
#include "ballonmsg.h"
#include "aboutdata.h"
+#include "log.h"
#include <time.h>
#include <stdio.h>
@@ -96,7 +97,10 @@
this->isInstalling=false;
this->CHECK_INTERVAL = 60; //seconds for the first time wait
setTime(time(NULL)); //this was missing ;)
+ this->msgret=-1;
+ this->bupdateMsgMissing=true;
this->timer->start(15000);
+
}
UpdatePlugin::~UpdatePlugin()
@@ -119,30 +123,30 @@
if (!getSocketFactory()->isActive() || !isDone())
return;
if (((unsigned)time(NULL)) >= getTime() + CHECK_INTERVAL){
- QString url="";
+ versionurl=QString("");
this->CHECK_INTERVAL=60*60*12; //checking every half day for an update, after first time
//url = "http://sim-im.org/index.php?v=" + VERSION;
#ifdef WIN32
- url = "http://www.sim.gosign.de/update.php?";
- url += "os=1";
+ versionurl = "http://www.sim.gosign.de/update.php?";
+ versionurl += "os=1";
#else
#ifdef QT_MACOSX_VERSION
- url += "&os=2";
+ versionurl += "&os=2";
location="??";
#endif
#endif
#ifdef CVS_BUILD
//url += "&svn=";
QString date(__DATE__);
- url += date;
- url.replace(' ',"%20");
+ versionurl += date;
+ versionurl.replace(' ',"%20");
#ifdef WIN32
location="http://www.sim.gosign.de";
#endif
#else
- url += "&release";
+ versionurl += "&release";
#endif
- /*url += "&l=";
+ /*versionurl += "&l=";
QString s = i18n("Message", "%n messages", 1);
s = s.remove("1 ");
for (int i = 0; i < (int)(s.length()); i++){
@@ -150,32 +154,51 @@
if ((c == ' ') || (c == '%') || (c == '=') || (c == '&')){
char b[5];
sprintf(b, "%02X", c);
- url += b;
+ versionurl += b;
}else if (c > 0x77){
char b[10];
sprintf(b, "#%04X", c);
- url += b;
+ versionurl += b;
}else{
- url += (char)c;
+ versionurl += (char)c;
}
}*/
- QUrl u(url);
+ QUrl um(QString("http://www.sim.gosign.de/updatemsg.php"));
+ httpmsg = new QHttp(this);
+ connect(httpmsg, SIGNAL(requestFinished(int, bool)),this, SLOT(UpdateMsgDownloadFinished(int, bool)));
+ QBuffer *buffer_um = new QBuffer(bytes_um);
+ buffer_um->open(IO_ReadWrite);
+ httpmsg->setHost(um.host());
+ Request_um=httpmsg->get(um.path(),buffer_um);
+ }
+}
+
+void UpdatePlugin::UpdateMsgDownloadFinished(int requestId, bool error){
+ if (error || msgret==QMessageBox::Yes
+ || msgret==QMessageBox::No
+ || msgret==QMessageBox::Ok
+ || upToDate) return; //Don't show the dialog more than once SIM starts.
+ if (Request_um==requestId) {
+ QString updateMsg(bytes_um);
+ this->m_updateMsg=updateMsg;
+ this->bupdateMsgMissing=false;
+ disconnect(httpmsg, SIGNAL(requestFinished(int, bool)),this, SLOT(UpdateMsgDownloadFinished(int, bool)));
+ QUrl u=QUrl(versionurl);
http = new QHttp(this);
connect(http, SIGNAL(requestFinished(int, bool)),this, SLOT(Finished(int, bool)));
QBuffer *buffer = new QBuffer(bytes);
buffer->open(IO_ReadWrite);
http->setHost(u.host());
Request=http->get(u.path(),buffer);
- }
+ }
}
-
-
void UpdatePlugin::Finished(int requestId, bool error){
if (error || msgret==QMessageBox::Yes
|| msgret==QMessageBox::No
|| msgret==QMessageBox::Ok
- || upToDate) return; //Don't show the dialog more than once SIM starts.
+ || upToDate
+ || bupdateMsgMissing) return; //Don't show the dialog more than once SIM starts.
if (Request==requestId) {
@@ -188,18 +211,20 @@
upToDate=false;
return;
}
- upToDate=true;
+ upToDate=true;
+ log(L_DEBUG, "Update::You have the latest online Version.");
return;
}
if (!show) {
show=!show;
disconnect(timer, SIGNAL(timeout()), this, SLOT(timeout()));
- msgret = QMessageBox::question( 0, i18n("SIM-IM Update"),
+ msgret = QMessageBox::question( 0, i18n("Sim-IM Update"),
i18n("A new update ist available.\n\nYou have Version %1:\n%2\n\n").arg(majorVersion).arg(dlocal.toString()) +
i18n("New Version is:\n%1\n\n").arg(dremote.toString()) +
+ i18n("Changes are:\n%1\n\n").arg(this->m_updateMsg) +
#ifdef WIN32
- i18n("I can now DOWNLOAD the Update\navailable at: %1\nIN BACKROUND and install the update\nfor SIM-IM, automatically after finishing.\n\nWould like you to ALLOW to carry out THE UPDATE?").arg(location),
+ i18n("I can now DOWNLOAD the Update\navailable at: %1\nIN BACKROUND and install the update\nfor Sim-IM, automatically after finishing.\n\nWould like you to ALLOW to carry out THE UPDATE?").arg(location),
QMessageBox::Yes,QMessageBox::No);
address=QString("http://sim.gosign.de/setup.exe");
@@ -207,7 +232,7 @@
if (msgret == QMessageBox::Yes)
download_and_install();
else {
- msgret = QMessageBox::question( 0, i18n("SIM-IM Update Remember?"),
+ msgret = QMessageBox::question( 0, i18n("Sim-IM Update Remember?"),
i18n("Should I remember you to update in some minutes again?"),
QMessageBox::Yes,QMessageBox::No);
@@ -261,16 +286,26 @@
this->dlocal = QDate(local.right(4).toInt(), i+1 , local.section(' ',1,1, QString::SectionDefault).toInt());
this->dremote = QDate(remote.right(4).toInt(), remote.mid(3,2).toInt(), remote.left(2).toInt());
-
- if (dremote.isNull()) QMessageBox::critical( 0, i18n("Update Plugin: Error fetching the date of the current Update Setup."),
+
+ if (dremote.isNull())
+ {
+ QMessageBox::critical( 0, i18n("Update Plugin: Error fetching the date of the current Update Setup."),
i18n("Please contact and inform me via noragen@gmx.net about this issue. //\\//oRaGen."));
+ log(L_DEBUG, "Update::Error in parsing Version-String. Perhaps you forgot to set SVNTAG and SIMTAG - Environment-Vars");
+ }
//local=dlocal->toString();
//remote=dremote->toString();
if (dlocal.daysTo(dremote)>0)
+ {
+ log(L_DEBUG, "Update::There is a new Version on www.sim.gosign.de");
return true;
+ }
else
+ {
+ log(L_DEBUG, "Update::Your SIM-Version is up to date.");
return false;
+ }
}
void UpdatePlugin::download_and_install(){
@@ -289,7 +324,7 @@
if ( !proc->start() ) {
QMessageBox::critical( 0, i18n("Error launching the Update-Setup"),
- i18n("Make sure the SIM-IM Dirctory\n") +
+ i18n("Make sure the Sim-IM Dirctory\n") +
i18n("is writable and you have rights to install.\n"));
ignore=false;
disconnect(http, SIGNAL(requestFinished(int, bool)),this, SLOT(fileRequestFinished(int, bool)));
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/update/update.h
^
|
@@ -44,6 +44,7 @@
protected slots:
void timeout();
void Finished(int requestId, bool error);
+ void UpdateMsgDownloadFinished(int requestId, bool error);
void fileRequestFinished(int requestId, bool error);
protected:
unsigned CmdGo;
@@ -56,19 +57,25 @@
void download_and_install();
void downloadFile();
void installFile();
+ QString versionurl;
QString m_url;
QString location;
QString address;
+ QString m_updateMsg;
PROP_ULONG(Time);
UpdateData data;
QByteArray bytes;
+ QByteArray bytes_um;
QHttp *http;
+ QHttp *httpmsg;
QFile *file;
bool httpRequestAborted;
int Request;
+ int Request_um;
QBuffer *buffer;
int msgret;
bool show;
+ bool bupdateMsgMissing;
bool upToDate;
bool ignore;
bool isInstalling;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/plugins/windock/windock.cpp
^
|
@@ -27,6 +27,7 @@
#include "windock.h"
#include "ontop.h"
+#include "core_consts.h"
#include "mainwin.h"
using namespace std;
@@ -408,8 +409,8 @@
return true;
}
} else
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if ((cmd->id == CmdAutoHide) && (dock->getState() != ABE_FLOAT)){
cmd->flags &= ~COMMAND_CHECKED;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim.sln
^
|
@@ -2,11 +2,13 @@
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "__homedir", "plugins\__homedir\__homedir.vcproj", "{1392544A-A313-4EA6-B9C8-901452570807}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "__migrate", "plugins\__migrate\__migrate.vcproj", "{CF4E5053-D51F-4CEB-833C-C6D3233E7403}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
@@ -17,116 +19,139 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "about", "plugins\about\about.vcproj", "{8ED9356B-88AA-4B57-BB2A-083D18BB9C41}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "action", "plugins\action\action.vcproj", "{CE17E460-A8AD-4FFE-B015-A6FC62711D77}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "autoaway", "plugins\autoaway\autoaway.vcproj", "{F669BC66-F5B8-4972-96C0-137A7D1E3C1D}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "background", "plugins\background\background.vcproj", "{0C280015-23BB-49B1-9595-B31637048288}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dock", "plugins\dock\dock.vcproj", "{79C5410A-0F63-453C-9EB6-577A60316146}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filter", "plugins\filter\filter.vcproj", "{16084934-2715-41A5-8206-77BA3B2722FA}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "floaty", "plugins\floaty\floaty.vcproj", "{9204D5B1-55E6-4F3B-B373-8C3B04C53F1A}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "forward", "plugins\forward\forward.vcproj", "{E01C75FA-688F-4C00-8206-4EA9D96E3D51}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpg", "plugins\gpg\gpg.vcproj", "{A4998686-1646-4A03-A3CE-3C7D7CE462EE}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icons", "plugins\icons\icons.vcproj", "{C2F03B07-FDA9-40C1-81AA-E97A5FE98E9D}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icq", "plugins\icq\icq.vcproj", "{BDA90145-2871-4832-AB64-87C20F0CD526}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jabber", "plugins\jabber\jabber.vcproj", "{5CA24B5A-D161-41B1-8D0E-BEC53807CC0F}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "livejournal", "plugins\livejournal\livejournal.vcproj", "{5F8030EE-C6ED-4B41-A733-99270E4482C4}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loger", "plugins\logger\logger.vcproj", "{ADB0F409-4880-4887-8B38-1DE8E53408B5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logger", "plugins\logger\logger.vcproj", "{ADB0F409-4880-4887-8B38-1DE8E53408B5}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msn", "plugins\msn\msn.vcproj", "{55C7576B-D370-4811-ABFB-F911D2410E5C}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "navigate", "plugins\navigate\navigate.vcproj", "{AABD39D5-DB6F-43F6-A980-A1BC1132A9F2}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netmonitor", "plugins\netmonitor\netmonitor.vcproj", "{6136531A-4E7C-41BD-856B-2749FDAF44B1}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ontop", "plugins\ontop\ontop.vcproj", "{1447D222-8829-4F93-B8BF-1636C0E2C4CF}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osd", "plugins\osd\osd.vcproj", "{93701E41-C716-4345-A1CF-59300BEED9A8}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy", "plugins\proxy\proxy.vcproj", "{770A6EF4-5C46-4471-A369-7095C773063E}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote", "plugins\remote\remote.vcproj", "{B9BEA7D7-C7E8-42D2-85DF-801FA70D6F5B}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "replace", "plugins\replace\replace.vcproj", "{54EB786B-2F50-4E08-BF00-D2A38CCC4D37}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shortcuts", "plugins\shortcuts\shortcuts.vcproj", "{DAA8DD15-2B68-4660-BA90-CC72C2E263C9}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
@@ -134,64 +159,81 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sms", "plugins\sms\sms.vcproj", "{A5B0A6B1-9D82-441E-9C14-120A0CE1630D}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sound", "plugins\sound\sound.vcproj", "{A601598F-D37E-4161-9512-DFB4E2EE3ACB}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spell", "plugins\spell\spell.vcproj", "{ED390F62-EE26-416C-A501-80EC38BEBDA0}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splash", "plugins\splash\splash.vcproj", "{3F562E9B-B0CB-4D06-9DE2-F28C3066BD6F}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "styles", "plugins\styles\styles.vcproj", "{C78169EE-7720-4DA2-B62B-30BC73E91CE0}"
ProjectSection(ProjectDependencies) = postProject
{B5336A5B-C4AF-485A-9A31-BCB89A6EE613} = {B5336A5B-C4AF-485A-9A31-BCB89A6EE613}
- {B731028E-4BE4-46A3-BBAA-5F47D637829E} = {B731028E-4BE4-46A3-BBAA-5F47D637829E}
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
+ {B731028E-4BE4-46A3-BBAA-5F47D637829E} = {B731028E-4BE4-46A3-BBAA-5F47D637829E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transparent", "plugins\transparent\transparent.vcproj", "{39127936-1D9E-419F-94D5-6F4230D62191}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "update", "plugins\update\update.vcproj", "{C0B42E01-C6EF-478F-87E5-406CD89E31D6}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "weather", "plugins\weather\weather.vcproj", "{CD684F73-6869-4873-9086-15AB68D6A485}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windock", "plugins\windock\windock.vcproj", "{ED537124-81BA-412E-AE14-4524EED34B7D}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yahoo", "plugins\yahoo\yahoo.vcproj", "{51136E3D-6915-4C49-9C46-7268C525E016}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zodiak", "plugins\zodiak\zodiak.vcproj", "{A0D57B3F-01EE-43C3-A325-2615940FBBB1}"
ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wood", "plugins\styles\wood\wood.vcproj", "{B5336A5B-C4AF-485A-9A31-BCB89A6EE613}"
+ ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "metal", "plugins\styles\metal\metal.vcproj", "{B731028E-4BE4-46A3-BBAA-5F47D637829E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simctrl", "plugins\remote\simctrl.vcproj", "{5BED4897-E26B-4EB1-8CEB-B14EA623C8EA}"
ProjectSection(ProjectDependencies) = postProject
@@ -202,8 +244,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simipc", "plugins\remote\simipc.vcproj", "{71763B16-D7D9-47EC-9273-40BEB546E27A}"
ProjectSection(ProjectDependencies) = postProject
- {C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
{F8F83E8F-435A-4717-8144-D37E1FA27DA6} = {F8F83E8F-435A-4717-8144-D37E1FA27DA6}
+ {C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simremote", "plugins\remote\simremote.vcproj", "{F8F83E8F-435A-4717-8144-D37E1FA27DA6}"
@@ -211,48 +253,6 @@
{C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcproj", "{5EA3473D-F924-4481-98AF-E64EEEFA1649}"
- ProjectSection(ProjectDependencies) = postProject
- {E01C75FA-688F-4C00-8206-4EA9D96E3D51} = {E01C75FA-688F-4C00-8206-4EA9D96E3D51}
- {770A6EF4-5C46-4471-A369-7095C773063E} = {770A6EF4-5C46-4471-A369-7095C773063E}
- {C78169EE-7720-4DA2-B62B-30BC73E91CE0} = {C78169EE-7720-4DA2-B62B-30BC73E91CE0}
- {5F8030EE-C6ED-4B41-A733-99270E4482C4} = {5F8030EE-C6ED-4B41-A733-99270E4482C4}
- {C152FFE3-3C84-4957-BDCC-63334E6FFA9E} = {C152FFE3-3C84-4957-BDCC-63334E6FFA9E}
- {B9BEA7D7-C7E8-42D2-85DF-801FA70D6F5B} = {B9BEA7D7-C7E8-42D2-85DF-801FA70D6F5B}
- {AABD39D5-DB6F-43F6-A980-A1BC1132A9F2} = {AABD39D5-DB6F-43F6-A980-A1BC1132A9F2}
- {9204D5B1-55E6-4F3B-B373-8C3B04C53F1A} = {9204D5B1-55E6-4F3B-B373-8C3B04C53F1A}
- {A5B0A6B1-9D82-441E-9C14-120A0CE1630D} = {A5B0A6B1-9D82-441E-9C14-120A0CE1630D}
- {3F562E9B-B0CB-4D06-9DE2-F28C3066BD6F} = {3F562E9B-B0CB-4D06-9DE2-F28C3066BD6F}
- {A601598F-D37E-4161-9512-DFB4E2EE3ACB} = {A601598F-D37E-4161-9512-DFB4E2EE3ACB}
- {A4998686-1646-4A03-A3CE-3C7D7CE462EE} = {A4998686-1646-4A03-A3CE-3C7D7CE462EE}
- {CD684F73-6869-4873-9086-15AB68D6A485} = {CD684F73-6869-4873-9086-15AB68D6A485}
- {54EB786B-2F50-4E08-BF00-D2A38CCC4D37} = {54EB786B-2F50-4E08-BF00-D2A38CCC4D37}
- {55C7576B-D370-4811-ABFB-F911D2410E5C} = {55C7576B-D370-4811-ABFB-F911D2410E5C}
- {8ED9356B-88AA-4B57-BB2A-083D18BB9C41} = {8ED9356B-88AA-4B57-BB2A-083D18BB9C41}
- {F669BC66-F5B8-4972-96C0-137A7D1E3C1D} = {F669BC66-F5B8-4972-96C0-137A7D1E3C1D}
- {ED390F62-EE26-416C-A501-80EC38BEBDA0} = {ED390F62-EE26-416C-A501-80EC38BEBDA0}
- {CE17E460-A8AD-4FFE-B015-A6FC62711D77} = {CE17E460-A8AD-4FFE-B015-A6FC62711D77}
- {438ECB60-E207-4DB8-A46A-1EC2EA9A714A} = {438ECB60-E207-4DB8-A46A-1EC2EA9A714A}
- {5CA24B5A-D161-41B1-8D0E-BEC53807CC0F} = {5CA24B5A-D161-41B1-8D0E-BEC53807CC0F}
- {CF4E5053-D51F-4CEB-833C-C6D3233E7403} = {CF4E5053-D51F-4CEB-833C-C6D3233E7403}
- {1392544A-A313-4EA6-B9C8-901452570807} = {1392544A-A313-4EA6-B9C8-901452570807}
- {BDA90145-2871-4832-AB64-87C20F0CD526} = {BDA90145-2871-4832-AB64-87C20F0CD526}
- {93701E41-C716-4345-A1CF-59300BEED9A8} = {93701E41-C716-4345-A1CF-59300BEED9A8}
- {A0D57B3F-01EE-43C3-A325-2615940FBBB1} = {A0D57B3F-01EE-43C3-A325-2615940FBBB1}
- {51136E3D-6915-4C49-9C46-7268C525E016} = {51136E3D-6915-4C49-9C46-7268C525E016}
- {39127936-1D9E-419F-94D5-6F4230D62191} = {39127936-1D9E-419F-94D5-6F4230D62191}
- {16084934-2715-41A5-8206-77BA3B2722FA} = {16084934-2715-41A5-8206-77BA3B2722FA}
- {ED537124-81BA-412E-AE14-4524EED34B7D} = {ED537124-81BA-412E-AE14-4524EED34B7D}
- {1447D222-8829-4F93-B8BF-1636C0E2C4CF} = {1447D222-8829-4F93-B8BF-1636C0E2C4CF}
- {6136531A-4E7C-41BD-856B-2749FDAF44B1} = {6136531A-4E7C-41BD-856B-2749FDAF44B1}
- {DAA8DD15-2B68-4660-BA90-CC72C2E263C9} = {DAA8DD15-2B68-4660-BA90-CC72C2E263C9}
- {0C280015-23BB-49B1-9595-B31637048288} = {0C280015-23BB-49B1-9595-B31637048288}
- {79C5410A-0F63-453C-9EB6-577A60316146} = {79C5410A-0F63-453C-9EB6-577A60316146}
- {ADB0F409-4880-4887-8B38-1DE8E53408B5} = {ADB0F409-4880-4887-8B38-1DE8E53408B5}
- {C2F03B07-FDA9-40C1-81AA-E97A5FE98E9D} = {C2F03B07-FDA9-40C1-81AA-E97A5FE98E9D}
- {C0B42E01-C6EF-478F-87E5-406CD89E31D6} = {C0B42E01-C6EF-478F-87E5-406CD89E31D6}
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -435,10 +435,6 @@
{F8F83E8F-435A-4717-8144-D37E1FA27DA6}.Debug|Win32.Build.0 = Debug|Win32
{F8F83E8F-435A-4717-8144-D37E1FA27DA6}.Release|Win32.ActiveCfg = Release|Win32
{F8F83E8F-435A-4717-8144-D37E1FA27DA6}.Release|Win32.Build.0 = Release|Win32
- {5EA3473D-F924-4481-98AF-E64EEEFA1649}.Debug|Win32.ActiveCfg = Debug|Win32
- {5EA3473D-F924-4481-98AF-E64EEEFA1649}.Debug|Win32.Build.0 = Debug|Win32
- {5EA3473D-F924-4481-98AF-E64EEEFA1649}.Release|Win32.ActiveCfg = Release|Win32
- {5EA3473D-F924-4481-98AF-E64EEEFA1649}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/ballonmsg.cpp
^
|
@@ -19,10 +19,10 @@
#include <qapplication.h>
#include <qbitmap.h>
-#include <qframe.h>
+
#include <qimage.h>
#include <qcheckbox.h>
-#include <qlayout.h>
+
#include <qpainter.h>
#include <qpointarray.h>
#include <qpushbutton.h>
@@ -124,35 +124,35 @@
bool bTailDown = true;
setPalette(QToolTip::palette());
text = _text;
- QFrame *frm = new QFrame(this);
- frm->setPalette(palette());
- QVBoxLayout *vlay = new QVBoxLayout(frm);
- vlay->setMargin(0);
+ m_frm = new QFrame(this);
+ m_frm->setPalette(palette());
+ m_vlay = new QVBoxLayout(m_frm);
+ m_vlay->setMargin(0);
m_check = NULL;
if (!box_msg.isEmpty()){
- m_check = new QCheckBox(box_msg, frm);
- vlay->addWidget(m_check);
+ m_check = new QCheckBox(box_msg, m_frm);
+ m_vlay->addWidget(m_check);
if (m_bChecked)
m_check->setChecked(*m_bChecked);
}
- QHBoxLayout *lay = new QHBoxLayout(vlay);
- lay->setSpacing(5);
- lay->addStretch();
+ m_hlay = new QHBoxLayout(m_vlay);
+ m_hlay->setSpacing(5);
+ m_hlay->addStretch();
unsigned id = 0;
bool bFirst = true;
for (QStringList::Iterator it = btn.begin(); it != btn.end(); ++it, id++){
- BalloonButton *b = new BalloonButton(*it, frm, id);
+ BalloonButton *b = new BalloonButton(*it, m_frm, id);
connect(b, SIGNAL(action(int)), this, SLOT(action(int)));
- lay->addWidget(b);
+ m_hlay->addWidget(b);
if (bFirst){
b->setDefault(true);
bFirst = false;
}
}
setButtonsPict(this);
- lay->addStretch();
- int wndWidth = frm->minimumSizeHint().width();
- int hButton = frm->minimumSizeHint().height();
+ m_hlay->addStretch();
+ int wndWidth = m_frm->minimumSizeHint().width();
+ int hButton = m_frm->minimumSizeHint().height();
int txtWidth = bwidth;
QRect rc;
@@ -168,7 +168,7 @@
richText.setWidth(wndWidth);
richText.adjustSize();
QSize s(richText.widthUsed(), richText.height());
- QSize sMin = frm->minimumSizeHint();
+ QSize sMin = m_frm->minimumSizeHint();
if (s.width() < sMin.width())
s.setWidth(sMin.width());
int BALLOON_SHADOW = BALLOON_SHADOW_DEF;
@@ -208,8 +208,8 @@
if (!bTailDown)
pos += BALLOON_TAIL;
textRect.setRect(BALLOON_R, pos + BALLOON_R, w - BALLOON_R * 2, h);
- frm->resize(s.width(), hButton);
- frm->move(BALLOON_R, pos + h - BALLOON_R - hButton);
+ m_frm->resize(s.width(), hButton);
+ m_frm->move(BALLOON_R, pos + h - BALLOON_R - hButton);
QPainter p;
p.begin(&mask);
#ifdef WIN32
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/ballonmsg.h
^
|
@@ -21,6 +21,8 @@
#include <qstring.h>
#include <qdialog.h>
#include <qbitmap.h>
+#include <qframe.h>
+#include <qlayout.h>
#include <qpushbutton.h>
#include "simapi.h"
@@ -55,6 +57,9 @@
QBitmap mask;
QWidget *m_parent;
QCheckBox *m_check;
+ QVBoxLayout *m_vlay;
+ QHBoxLayout *m_hlay;
+ QFrame *m_frm;
bool m_bAutoHide;
bool m_bYes;
bool *m_bChecked;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/buffer.cpp
^
|
@@ -135,8 +135,7 @@
return readn;
}
-
-Buffer &Buffer::operator << (char c)
+Buffer& Buffer::operator << (char c)
{
pack(&c, 1);
return *this;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/cfg.cpp
^
|
@@ -40,6 +40,7 @@
#include <qstringlist.h>
#include <qapplication.h>
#include <qdir.h>
+#include <qstyle.h>
#ifdef _DEBUG
# include <qmessagebox.h>
#endif
@@ -115,7 +116,11 @@
struct stat st;
if (stat(QFile::encodeName(r).data(), &st) != 0){
+#ifdef __OS2__
+ int idx = r.findRev('\\');
+#else
int idx = r.findRev('/');
+#endif
if(idx == -1)
return false;
if (makedir(r.left(idx))){
@@ -142,16 +147,21 @@
#if defined( WIN32 ) || defined( __OS2__ )
if ((fname[1] == ':') || (fname.left(2) == "\\\\"))
return f;
- WCHAR buff[MAX_PATH];
#ifdef __OS2__
+ CHAR buff[MAX_PATH];
PPIB pib;
PTIB tib;
DosGetInfoBlocks(&tib, &pib);
- DosQueryModuleName(pib->pib_hmte, sizeof(buff), buff);
+ DosQueryModuleName(pib->pib_hmte, sizeof(buff), buff);
#else
+ WCHAR buff[MAX_PATH];
GetModuleFileNameW(NULL, buff, MAX_PATH);
#endif
+#ifdef __OS2__
+ QString b = buff;
+#else
QString b = QString::fromUcs2((unsigned short*)buff);
+#endif
int idx = b.findRev('\\');
if(idx != -1)
b = b.left(idx+1);
@@ -252,7 +262,7 @@
}
}
}
- if ( bQuoteSlash && (from[i] == '\\') && (i+1 == from.length()) ) {
+ if ( bQuoteSlash && (from[i] == '\\') && (i+1 == (int) from.length()) ) {
// There should not be slashe at the end of the string if bQuoteSlash is true
log(L_WARN,"Single slash found at the end of string while unquoting chars '%s' in string '%s'", chars.latin1(), from.latin1());
}
@@ -903,12 +913,21 @@
geo[TOP].asLong() = pos.y();
geo[WIDTH].asLong() = size.width();
geo[HEIGHT].asLong() = size.height();
+ // if window is not visible QT return geometry without frame sizes
+ // may work for X versions too
+ if ( !w->isShown() ) {
+ int th = w->style().pixelMetric( QStyle::PM_TitleBarHeight, w );
+ int fw = w->style().pixelMetric( QStyle::PM_DefaultFrameWidth, w );
+ geo[0].asLong() -= fw * 2; // + size of left frame border
+ geo[1].asLong() -= th + fw; // + size of title and border
+ }
#ifdef WIN32
if (GetWindowLongA(w->winId(), GWL_EXSTYLE) & WS_EX_TOOLWINDOW){
int dc = GetSystemMetrics(SM_CYCAPTION);
+ int dd = GetSystemMetrics(SM_CYDLGFRAME);
int ds = GetSystemMetrics(SM_CYSMCAPTION);
- geo[1].asLong() += dc - ds;
- geo[3].asLong() -= (dc - ds) * 2;
+ geo[1].asLong() += dc - ds;
+ geo[3].asLong() -= dd * 2;
}
#endif
#ifdef USE_KDE
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/cmddef.cpp
^
|
@@ -430,7 +430,7 @@
CommandsMapIterator::CommandsMapIterator(CommandsMap &m)
{
- log(L_DEBUG, "CommandsMapIterator for %p", &m);
+ //log(L_DEBUG, "CommandsMapIterator for %p", &m);
p = new CommandsMapIteratorPrivate(*m.p);
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/event.h
^
|
@@ -77,6 +77,8 @@
eEventQuit = 0x0102, // last event until plugins are unloaded
eEventExec = 0x0110, // execute an external program
eEventSocketActive = 0x0112, // change socket activity state
+ eEventInterfaceDown = 0x0113, // emmited when socket detects eth down
+ eEventInterfaceUp = 0x0114,
eEventArg = 0x0201, // get command line argument
eEventGetArgs = 0x0202, // get all command line arguments
@@ -113,7 +115,8 @@
eEventCommandShow = 0x0515,
eEventCommandWidget = 0x0516,
- eEventCheckState = 0x0520, // check state of a Command
+ eEventCheckCommandState = 0x0520, // check state of a Command
+ eEventUpdateCommandState= 0x0528, // recalculate command state for commands with semi-static (once-calculated) states
eEventAddWidget = 0x0570, // add a widget to main/statuswindow
@@ -121,6 +124,7 @@
eEventRemovePreferences = 0x0581,
eEventClientChanged = 0x0590, // a client changed status
+ eEventLoginStart = 0x0591, // login process initiated
eEventHomeDir = 0x0601, // get home dir for config
eEventGoURL = 0x0602, // open url in browser / mail / ...
@@ -299,6 +303,18 @@
bool m_bActive;
};
+class EXPORT EventInterfaceDown : public Event
+{
+public:
+ EventInterfaceDown() : Event(eEventInterfaceDown) {};
+};
+
+class EXPORT EventInterfaceUp : public Event
+{
+public:
+ EventInterfaceUp() : Event(eEventInterfaceUp) {};
+};
+
class EXPORT EventArg : public Event
{
public:
@@ -711,13 +727,6 @@
: EventError(eEventShowError, data) {}
};
-/* Base bar for mainwindow */
-// FIXME: put them into class EventToolbar?
-const unsigned long ToolBarMain = 1;
-const unsigned long ToolBarContainer = 2;
-const unsigned long ToolBarTextEdit = 3;
-const unsigned long ToolBarMsgEdit = 4;
-
class EXPORT EventToolbar : public Event
{
public:
@@ -756,15 +765,6 @@
CommandsDef *m_defs;
};
-/* Base menu for mainwindow */
-// FIXME: put them into class EventMenu?
-const unsigned long MenuMain = 1;
-const unsigned long MenuGroup = 2;
-const unsigned long MenuContact = 3;
-const unsigned long MenuContactGroup = 4;
-const unsigned long MenuContainer = 5;
-const unsigned long MenuMessage = 6;
-
class EXPORT EventMenu : public Event
{
public:
@@ -901,11 +901,22 @@
Client *m_client;
};
+class EventLoginStart : public Event
+{
+public:
+ EventLoginStart() : Event(eEventLoginStart)
+ {
+ }
+ virtual ~EventLoginStart()
+ {
+ }
+};
+
/* Commands - create command
menu items & bar buttons
param is CommandDef* */
-struct EXPORT CommandDef
+struct EXPORT CommandDef // FIXME: move it to cmddef.h ???
{
unsigned long id; // Command ID
QString text; // Command name
@@ -1074,11 +1085,24 @@
QWidget *m_widget;
};
-class EXPORT EventCheckState : public EventCommand
+class EXPORT EventCheckCommandState : public EventCommand
+{
+public:
+ EventCheckCommandState(CommandDef *cmd)
+ : EventCommand(eEventCheckCommandState, cmd) {}
+};
+
+class EXPORT EventUpdateCommandState : public Event
{
public:
- EventCheckState(CommandDef *cmd)
- : EventCommand(eEventCheckState, cmd) {}
+ EventUpdateCommandState(unsigned long id = ~( (unsigned long)0 ) )// 0xFFF..FF means "update all commands"
+ : Event(eEventUpdateCommandState), m_id(id) {}
+ // Also possible to update command by it's command def
+ EventUpdateCommandState(CommandDef *cmd)
+ : Event(eEventUpdateCommandState), m_id(cmd->id) {}
+ unsigned long commandID() {return m_id;}
+protected:
+ unsigned long m_id;
};
class EventMessage : public Event
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/message.cpp
^
|
@@ -452,12 +452,21 @@
shortName = shortName.mid(n + 1);
return shortName;
}
- QString res;
+
+ QString res=i18n("Files:")+"<br>";
+ const QString *name = ++it;
+ while (name != NULL)
+ {
+ res += *name;
+ res += "<br>";
+ name = ++it;
+ }
+ res += "<br>";
if (it.dirs()){
if (it.dirs() == 1){
- res = "1 directory";
+ res = i18n("1 directory");
}else{
- res = QString("%1 directories") .arg(it.dirs());
+ res = i18n("%1 directories") .arg(it.dirs());
}
}
int nFiles = it.count() - it.dirs();
@@ -465,9 +474,9 @@
if (it.dirs())
res += ", ";
if (nFiles == 1){
- res += "1 file";
+ res += i18n("1 file");
}else{
- res += QString("%1 files") .arg(nFiles);
+ res += i18n("%1 files") .arg(nFiles);
}
}
return res;
@@ -501,9 +510,9 @@
if (size >= 1024 * 1024){
res += i18n("%1 Mbytes") .arg(size / (1024 * 1024));
}else if (size >= 1024){
- res += i18n("%1 kbytes") .arg(size / 1024);
+ res += i18n("%1 kBytes") .arg(size / 1024);
}else{
- res += i18n("%1 bytes") .arg(size);
+ res += i18n("%1 Bytes") .arg(size);
}
}
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/misc.cpp
^
|
@@ -59,7 +59,7 @@
#include "kdeisversion.h"
#endif
-#if !defined(WIN32) && !defined(QT_MACOSX_VERSION) && !defined(QT_MAC)
+#if !defined(WIN32) && !defined(QT_MACOSX_VERSION) && !defined(QT_MAC) && !defined(__OS2__)
//#include <X11/X.h>
//#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -310,7 +310,7 @@
}
#else
-#if !defined(QT_MACOSX_VERSION) && !defined(QT_MAC)
+#if !defined(QT_MACOSX_VERSION) && !defined(QT_MAC) && !defined(__OS2__)
void setWndClass(QWidget *w, const char *name)
{
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/qzip/ioapi.h
^
|
@@ -9,6 +9,9 @@
#ifndef _ZLIBIOAPI_H
#define _ZLIBIOAPI_H
+#pragma warning(disable:4131)
+#pragma warning(disable:4100)
+#pragma warning(disable:4245)
#define ZLIB_FILEFUNC_SEEK_CUR (1)
#define ZLIB_FILEFUNC_SEEK_END (2)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/qzip/qzip.cpp
^
|
@@ -23,8 +23,13 @@
#include<qcstring.h>
#include<qstringlist.h>
#include<qfile.h>
-
-#include"unzip.h"
+#pragma warning(disable:4131)
+#pragma warning(disable:4100)
+#pragma warning(disable:4245)
+ #include"unzip.h"
+#pragma warning(default:4131)
+#pragma warning(default:4100)
+#pragma warning(default:4245)
class UnZipPrivate
{
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/qzip/unzip.h
^
|
@@ -42,6 +42,10 @@
ftp://ftp.pkware.com/probdesc.zip
*/
+#pragma warning(disable:4131)
+#pragma warning(disable:4100)
+#pragma warning(disable:4245)
+
#ifndef _unz_H
#define _unz_H
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/sim.cpp
^
|
@@ -212,16 +212,16 @@
#endif
qInstallMsgHandler(simMessageOutput);
KAboutData aboutData(PACKAGE,
- I18N_NOOP("SIM"),
+ I18N_NOOP("Sim-IM"),
_VERSION,
I18N_NOOP("Multiprotocol Instant Messenger"),
KAboutData::License_GPL,
"Copyright (C) 2002-2004, Vladimir Shutoff\n"
- "2005-2008, SIM-IM Development Team",
+ "2005-2009, Sim-IM Development Team",
0,
"http://sim-im.org/",
"https://mailman.dg.net.ua/listinfo/sim-im-main");
- aboutData.addAuthor("SIM-IM Development Team",I18N_NOOP("Current development"), "sim-im-main@lists.sim-im.org", "http://sim-im.org/");
+ aboutData.addAuthor("Sim-IM Development Team",I18N_NOOP("Current development"), "sim-im-main@lists.sim-im.org", "http://sim-im.org/");
aboutData.addAuthor("Vladimir Shutoff" ,I18N_NOOP("Author"), "vovan@shutoff.ru");
aboutData.addAuthor("Christian Ehrlicher" ,I18N_NOOP("Developer"), "Ch.Ehrlicher@gmx.de");
setAboutData(&aboutData);
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/simapi.h
^
|
@@ -11,79 +11,81 @@
#define _SIMAPI_H
#ifdef HAVE_CONFIG_H
-#include "config.h"
+ #include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+ #include <sys/types.h>
#endif
#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
+ #include <inttypes.h>
#else
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
#endif
#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+ #include <unistd.h>
#endif
// for Q_CC_foo - macros
#include <qglobal.h>
#ifdef Q_CC_MSVC
-// "conditional expression is constant" (W4)
-# pragma warning(disable: 4127)
-// "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'" (W1)
-# pragma warning(disable: 4251)
-// "function' : function not inlined" (W4)4786
-# pragma warning(disable: 4710)
+ // "conditional expression is constant" (W4)
+ # pragma warning(disable: 4127)
+ // "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'" (W1)
+ # pragma warning(disable: 4251)
+ // "function' : function not inlined" (W4)4786
+ # pragma warning(disable: 4710)
#endif
#ifdef HAVE_GCC_VISIBILITY
-# define SIM_EXPORT __attribute__ ((visibility("default")))
-# define SIM_IMPORT __attribute__ ((visibility("default")))
-# define EXPORT_PROC extern "C" __attribute__ ((visibility("default")))
+ # define SIM_EXPORT __attribute__ ((visibility("default")))
+ # define SIM_IMPORT __attribute__ ((visibility("default")))
+ # define EXPORT_PROC extern "C" __attribute__ ((visibility("default")))
#elif defined(Q_OS_WIN)
-# define SIM_EXPORT __declspec(dllexport)
-# define SIM_IMPORT __declspec(dllimport)
-# define EXPORT_PROC extern "C" __declspec(dllexport)
-#else
-# define SIM_EXPORT
-# define SIM_IMPORT
-#ifdef __OS2__
-# define EXPORT_PROC extern "C" _System
-#else
-# define EXPORT_PROC extern "C"
-#endif
+ # define SIM_EXPORT __declspec(dllexport)
+ # define SIM_IMPORT __declspec(dllimport)
+ # define EXPORT_PROC extern "C" __declspec(dllexport)
+#else
+ # define SIM_EXPORT
+ # define SIM_IMPORT
+ #ifdef __OS2__
+ # define EXPORT_PROC extern "C" _System
+ #else
+ # define EXPORT_PROC extern "C"
+ #endif
#endif
#ifdef SIMAPI_EXPORTS // should be set when simapi-lib is build - please add a check for configure
-# define EXPORT SIM_EXPORT
+ # define EXPORT SIM_EXPORT
#else
-# define EXPORT SIM_IMPORT
+ # define EXPORT SIM_IMPORT
#endif
#ifdef Q_CC_MSVC
-# define DEPRECATED __declspec(deprecated)
+ # define DEPRECATED __declspec(deprecated)
#elif defined Q_CC_GNU
-# define DEPRECATED __attribute__ ((deprecated))
+ # define DEPRECATED __attribute__ ((deprecated))
#else
-# define DEPRECATED
+ # define DEPRECATED
#endif
#ifndef COPY_RESTRICTED
-# define COPY_RESTRICTED(A) \
+ # define COPY_RESTRICTED(A) \
private: \
A(const A&); \
A &operator = (const A&);
#endif
-#ifdef WIN32
+#if defined( WIN32 ) || defined( __OS2__ )
#include <list>
#include <map>
#include <string>
- #include <xutility>
#include <vector>
+ #ifndef __OS2__
+ #include <xutility>
+ #endif
#else
#include <memory>
#include <string.h>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/socket.cpp
^
|
@@ -18,6 +18,17 @@
#include <qmutex.h>
#include <qtimer.h>
+#ifdef WIN32
+#include <winsock.h>
+#else
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#endif
+
+
#include "socket.h"
#include "misc.h"
#include "log.h"
@@ -51,8 +62,7 @@
{
if (notify)
notify->error_state(err_text, code);
-}
-
+}
ServerSocket::ServerSocket()
{
notify = NULL;
@@ -95,6 +105,13 @@
m_sock->connect(host, port);
}
+void ClientSocket::connect(unsigned long ip, unsigned short port, TCPClient* /* client */)
+{
+ struct in_addr addr;
+ addr.s_addr = ip;
+ this->connect(inet_ntoa(addr), port, NULL);
+}
+
void ClientSocket::write()
{
if (writeBuffer().size() == 0)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/socket.h
^
|
@@ -163,6 +163,7 @@
virtual void error_state(const QString &err, unsigned code = 0);
void connect(const QString &host, unsigned short port, TCPClient *client);
+ void connect(unsigned long ip, unsigned short port, TCPClient* client);
void write();
void pause(unsigned);
unsigned long localHost();
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/sockfactory.cpp
^
|
@@ -31,6 +31,8 @@
#include <netdb.h>
#include <arpa/inet.h>
#include <pwd.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
#endif
#include <errno.h>
@@ -192,7 +194,7 @@
{
sock = s;
if (sock == NULL)
- sock = new QSocket(NULL);
+ sock = new QSocket(this);
QObject::connect(sock, SIGNAL(connected()), this, SLOT(slotConnected()));
QObject::connect(sock, SIGNAL(connectionClosed()), this, SLOT(slotConnectionClosed()));
QObject::connect(sock, SIGNAL(error(int)), this, SLOT(slotError(int)));
@@ -200,6 +202,7 @@
QObject::connect(sock, SIGNAL(bytesWritten(int)), this, SLOT(slotBytesWritten(int)));
bInWrite = false;
timer = NULL;
+ m_carrierCheckTimer = 0;
}
SIMClientSocket::~SIMClientSocket()
@@ -323,6 +326,10 @@
timerStop();
if (notify) notify->connect_ready();
getSocketFactory()->setActive(true);
+ m_state = true;
+#ifndef WIN32
+ m_carrierCheckTimer = startTimer(10000); // FIXME hardcoded
+#endif
}
void SIMClientSocket::slotConnectionClosed()
@@ -343,6 +350,87 @@
QTimer::singleShot(0, this, SLOT(slotConnectionClosed()));
}
+void SIMClientSocket::timerEvent(QTimerEvent* ev)
+{
+ if(m_carrierCheckTimer != 0 && ev->timerId() == m_carrierCheckTimer)
+ {
+ checkInterface();
+ }
+}
+
+void SIMClientSocket::checkInterface()
+{
+#ifdef WIN32
+ return;
+#endif
+ if(!sock)
+ return;
+#ifndef WIN32
+ // crissi: disabled until detection is fixed, see below FIXME
+ return;
+ int fd = sock->socket();
+ if(fd == -1)
+ {
+ return;
+ }
+ struct ifreq ifr;
+ struct ifreq* ifrp;
+ struct ifreq ibuf[16];
+ struct ifconf ifc;
+
+ ifc.ifc_len = sizeof(ifr)*16;
+ ifc.ifc_buf = (caddr_t)&ibuf;
+ memset(ibuf, 0, sizeof(struct ifreq)*16);
+
+ int hret = ioctl(fd, SIOCGIFCONF, &ifc);
+ if(hret == -1)
+ {
+ return;
+ }
+ for(int i = 0; i < ifc.ifc_len/sizeof(struct ifreq); i++)
+ {
+ ifrp = ibuf + i;
+ strncpy(ifr.ifr_name, ifrp->ifr_name, sizeof(ifr.ifr_name));
+ if(strcmp(ifr.ifr_name, "lo") == 0)
+ continue;
+ hret = ioctl(fd, SIOCGIFFLAGS, &ifr);
+ if(hret != -1)
+ {
+ // FIXME!!! check only interface where default route points (i.e. if default route points to eth1 and eth0 is up or not configured -> failes always
+ int state = ifr.ifr_flags & IFF_RUNNING;
+ if(state < 0)
+ {
+ log(L_DEBUG, "Incorrect state: %d (%s)", state, ifr.ifr_name);
+ return;
+ }
+ if((state == 0) && (m_state))
+ {
+ m_state = false;
+ log(L_DEBUG, "Carrier lost at: %s", ifr.ifr_name);
+ EventInterfaceDown e;
+ e.process();
+ return;
+ }
+ if((state != 0) && (!m_state))
+ {
+ m_state = true;
+ log(L_DEBUG, "Carrier is up again at: %s", ifr.ifr_name);
+ EventInterfaceUp e;
+ e.process();
+ return;
+ }
+ return;
+ }
+ }
+ return;
+#endif
+}
+
+void SIMClientSocket::error(int errcode)
+{
+ log(L_DEBUG, "SIMClientSocket::error(%d), SocketDevice error: %d", errcode, sock->socketDevice()->error());
+}
+
void SIMClientSocket::slotReadReady()
{
if (notify)
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/sockfactory.h
^
|
@@ -52,7 +52,12 @@
void slotLookupFinished(int);
void resolveReady(unsigned long addr, const QString &host);
void timeout();
+ void error(int errcode);
+ void checkInterface();
+ void timerEvent(QTimerEvent* ev);
protected:
+ int m_carrierCheckTimer;
+ bool m_state;
void timerStop();
unsigned short port;
QString host;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/textshow.cpp
^
|
@@ -253,8 +253,8 @@
{
if (m_param == NULL)
return false;
- if (e->type() == eEventCheckState){
- EventCheckState *ecs = static_cast<EventCheckState*>(e);
+ if (e->type() == eEventCheckCommandState){
+ EventCheckCommandState *ecs = static_cast<EventCheckCommandState*>(e);
CommandDef *cmd = ecs->cmd();
if (cmd->param != m_param)
return false;
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/textshow.h
^
|
@@ -20,7 +20,7 @@
#include "simapi.h"
#include "event.h"
-#include "core.h"
+#include "core_consts.h"
#include "msggen.h"
#include <qglobal.h>
|
[-]
[+]
|
Changed |
sim-0.9.5.tar.bz2/sim/toolbtn.cpp
^
|
@@ -118,9 +118,10 @@
void CToolItem::checkState()
{
- if (m_def.flags & COMMAND_CHECK_STATE){
+ if (m_def.flags & COMMAND_CHECK_STATE)
+ {
m_def.param = static_cast<CToolBar*>(widget()->parent())->param();
- EventCheckState(&m_def).process();
+ EventCheckCommandState(&m_def).process();
m_def.flags |= COMMAND_CHECK_STATE;
setState();
}
@@ -645,9 +646,10 @@
void CToolBar::checkState()
{
- for (ButtonsMap::iterator it = buttons->begin(); it != buttons->end(); ++it){
- (*it).second->checkState();
- }
+ for (ButtonsMap::iterator it = buttons->begin(); it != buttons->end(); ++it)
+ {
+ (*it).second->checkState();
+ }
}
void CToolBar::mousePressEvent(QMouseEvent *e)
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/tools
^
|
+(directory)
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/tools/sendEmail-Readme.txt
^
|
@@ -0,0 +1,7 @@
+Calling:
+
+Linux:
+./sendEmail.pl -f from@email.com -t to@email.com -s mailserver.domain.com -xu username -xp password -u Subject -m Message -a appendfile.ext
+
+Win32:
+sendEmail.exe -f from@email.com -t to@email.com -s mailserver.domain.com -xu username -xp password -u Subject -m Message -a appendfile.ext
\ No newline at end of file
|
|
Added |
sim-0.9.5.tar.bz2/tools/sendEmail.exe
^
|
[-]
[+]
|
Added |
sim-0.9.5.tar.bz2/tools/sendEmail.pl
^
|
@@ -0,0 +1,1873 @@
+#!/usr/bin/perl -w
+##############################################################################
+## sendEmail
+## Written by: Brandon Zehm <caspian@dotconf.net>
+##
+## License:
+## sendEmail (hereafter referred to as "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.
+## Note that when redistributing modified versions of this source code, you
+## must ensure that this disclaimer and the above coder's names are included
+## VERBATIM in the modified code.
+##
+## Disclaimer:
+## This program is provided with no warranty of any kind, either expressed or
+## implied. It is the responsibility of the user (you) to fully research and
+## comprehend the usage of this program. As with any tool, it can be misused,
+## either intentionally (you're a vandal) or unintentionally (you're a moron).
+## THE AUTHOR(S) IS(ARE) NOT RESPONSIBLE FOR ANYTHING YOU DO WITH THIS PROGRAM
+## or anything that happens because of your use (or misuse) of this program,
+## including but not limited to anything you, your lawyers, or anyone else
+## can dream up. And now, a relevant quote directly from the GPL:
+##
+## NO WARRANTY
+##
+## 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+## FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+## OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+## PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+## OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+## TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+## PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+## REPAIR OR CORRECTION.
+##
+##############################################################################
+use strict;
+use IO::Socket;
+
+
+
+########################
+## Global Variables ##
+########################
+
+my %conf = (
+ ## General
+ "programName" => $0, ## The name of this program
+ "version" => '1.52', ## The version of this program
+ "authorName" => 'Brandon Zehm', ## Author's Name
+ "authorEmail" => 'caspian@dotconf.net', ## Author's Email Address
+ "timezone" => '+0000 (GMT)', ## We always use +0000 for the time zone
+ "hostname" => 'localhost', ## Used in printmsg() for all output, and in SMTP EHLO.
+ "debug" => 0, ## Default debug level
+ "error" => '', ## Error messages will often be stored here
+
+ ## Logging
+ "debug" => 0,
+ "stdout" => 1,
+ "logging" => 0, ## If this is true the printmsg function prints to the log file
+ "logFile" => '', ## If this is specified (form the command line via -l) this file will be used for logging.
+
+ ## Network
+ "server" => 'localhost', ## Default SMTP server
+ "port" => 25, ## Default port
+ "alarm" => '', ## Default timeout for connects and reads, this gets set from $opt{'timeout'}
+
+ ## Email
+ "delimiter" => "----MIME delimiter for sendEmail-" ## MIME Delimiter
+ . rand(1000000), ## Add some randomness to the delimiter
+ "Message-ID" => rand(1000000) . "-sendEmail", ## Message-ID for email header
+ "authUsername" => '', ## Username used in SMTP Auth
+ "authPassword" => '', ## Password used in SMTP Auth
+
+);
+
+
+## This hash stores the options passed on the command line via the -o option.
+my %opt = (
+ ## Addressing
+ "reply-to" => '', ## Reply-To field
+
+ ## Message
+ "message-file" => '', ## File to read message body from
+ "message-header" => '', ## Additional email header line
+ "message-format" => 'normal', ## If "raw" is specified the message is sent unmodified
+ "message-charset" => 'iso-8859-1', ## Message character-set
+
+ ## Network
+ "timeout" => 60, ## Default timeout for connects and reads, this is copied to $conf{'alarm'} later.
+
+);
+
+## More variables used later in the program
+my $CRLF = "\015\012";
+my $subject = '';
+my $message = '';
+my $from = '';
+my @to = ();
+my @cc = ();
+my @bcc = ();
+my @attachments = ();
+my @attachments_names = ();
+
+## For printing colors to the console
+my ${colorRed} = "\033[31;1m";
+my ${colorGreen} = "\033[32;1m";
+my ${colorCyan} = "\033[36;1m";
+my ${colorWhite} = "\033[37;1m";
+my ${colorNormal} = "\033[m";
+my ${colorBold} = "\033[1m";
+my ${colorNoBold} = "\033[0m";
+
+## Don't use shell escape codes on Windows systems
+if ($^O =~ /win/i) {
+ ${colorRed} = "";
+ ${colorGreen} = "";
+ ${colorCyan} = "";
+ ${colorWhite} = "";
+ ${colorNormal} = "";
+ ${colorBold} = "";
+ ${colorNoBold} = "";
+}
+
+
+
+
+
+#############################
+##
+## MAIN PROGRAM
+##
+#############################
+
+
+## Initialize
+initialize();
+
+## Process Command Line
+processCommandLine();
+$conf{'alarm'} = $opt{'timeout'};
+
+## Abort program after $conf{'alarm'} seconds to avoid infinite hangs
+alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+
+
+
+
+###################################################
+## Read $message from STDIN if -m was not used ##
+###################################################
+
+if (!($message)) {
+ ## Read message body from a file specified with -o message-file=
+ if ($opt{'message-file'}) {
+ if (! -e $opt{'message-file'}) {
+ printmsg("ERROR => Message body file specified [$opt{'message-file'}] does not exist!", 0);
+ printmsg("HINT => 1) check spelling of your file; 2) fully qualify the path; 3) doubble quote it", 1);
+ quit("", 1);
+ }
+ if (! -r $opt{'message-file'}) {
+ printmsg("ERROR => Message body file specified can not be read due to restricted permissions!", 0);
+ printmsg("HINT => Check permissions on file specified to ensure it can be read", 1);
+ quit("", 1);
+ }
+ if (!open(MFILE, "< " . $opt{'message-file'})) {
+ printmsg("ERROR => Error opening message body file [$opt{'message-file'}]: $!", 0);
+ quit("", 1);
+ }
+ while (<MFILE>) {
+ $message .= $_;
+ }
+ close(MFILE);
+ }
+
+ ## Read message body from STDIN
+ else {
+ alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+ if ($conf{'stdout'}) {
+ print "Reading message body from STDIN because the '-m' option was not used.\n";
+ print "If you are manually typing in a message:\n";
+ print " - First line must be received within $conf{'alarm'} seconds.\n" if ($^O !~ /win/i);
+ print " - End manual input with a CTRL-D on its own line.\n\n" if ($^O !~ /win/i);
+ print " - End manual input with a CTRL-Z on its own line.\n\n" if ($^O =~ /win/i);
+ }
+ while (<STDIN>) { ## Read STDIN into $message
+ $message .= $_;
+ alarm(0) if ($^O !~ /win/i); ## Disable the alarm since at least one line was received
+ }
+ printmsg("Message input complete.", 0);
+ }
+}
+
+## Replace bare LF's with CRLF's (\012 should always have \015 with it)
+$message =~ s/(\015)?(\012|$)/\015\012/g;
+
+## Replace bare CR's with CRLF's (\015 should always have \012 with it)
+$message =~ s/(\015)(\012|$)?/\015\012/g;
+
+## Check message for bare periods and encode them
+$message =~ s/(^|$CRLF)(\.{1})($CRLF|$)/$1.$2$3/g;
+
+## Get the current date for the email header
+my ($sec,$min,$hour,$mday,$mon,$year,$day) = gmtime();
+$year += 1900; $mon = return_month($mon); $day = return_day($day);
+my $date = sprintf("%s, %s %s %d %.2d:%.2d:%.2d %s",$day, $mday, $mon, $year, $hour, $min, $sec, $conf{'timezone'});
+
+
+
+
+##################################
+## Connect to the SMTP server ##
+##################################
+printmsg("DEBUG => Connecting to $conf{'server'}:$conf{'port'}", 1);
+$SIG{'ALRM'} = sub {
+ printmsg("ERROR => Timeout while connecting to $conf{'server'}:$conf{'port'} There was no response after $conf{'alarm'} seconds.", 0);
+ printmsg("HINT => Try specifying a different mail relay with the -s option.", 1);
+ quit("", 1);
+};
+alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+my $SERVER = IO::Socket::INET->new( PeerAddr => $conf{'server'},
+ PeerPort => $conf{'port'},
+ Proto => 'tcp',
+ Autoflush => 1,
+ timeout => $conf{'alarm'},
+);
+alarm(0) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+
+## Make sure we got connected
+if ( (!$SERVER) or (!$SERVER->opened()) ) {
+ printmsg("ERROR => Connection attempt to $conf{'server'}:$conf{'port'} failed: $@", 0);
+ printmsg("HINT => Try specifying a different mail relay with the -s option.", 1);
+ quit("", 1);
+}
+
+
+
+
+
+
+#########################
+## Do the SMTP Dance ##
+#########################
+
+## Read initial greeting to make sure we're talking to a live SMTP server
+if (SMTPchat()) { quit($conf{'error'}, 1); }
+
+## EHLO
+if (SMTPchat('EHLO ' . $conf{'hostname'})) {
+ printmsg($conf{'error'}, 0);
+ printmsg("NOTICE => EHLO command failed, attempting HELO instead");
+ if (SMTPchat('HELO ' . $conf{'hostname'})) { quit($conf{'error'}, 1); }
+ if ( $conf{'authUsername'} and $conf{'authPassword'} ) {
+ printmsg("WARNING => The mail server does not support ESMTP or SMTP AUTH!");
+ }
+}
+else {
+ ## Do SMTP Auth if required
+ if ( $conf{'authUsername'} and $conf{'authPassword'} ) {
+ if (SMTPchat('AUTH LOGIN')) { quit($conf{'error'}, 1); }
+ if (SMTPchat($conf{'authUsername'})) { quit($conf{'error'}, 1); }
+ if (SMTPchat($conf{'authPassword'})) { quit($conf{'error'}, 1); }
+ }
+}
+
+## MAIL FROM
+if (SMTPchat('MAIL FROM:<' .(returnAddressParts($from))[1]. '>')) { quit($conf{'error'}, 1); }
+
+## RCPT TO
+my $oneRcptAccepted = 0;
+foreach my $rcpt (@to, @cc, @bcc) {
+ my ($name, $address) = returnAddressParts($rcpt);
+ if (SMTPchat('RCPT TO:<' . $address . '>')) {
+ printmsg("WARNING => The recipient <$address> was rejected by the mail server, error follows:", 0);
+ $conf{'error'} =~ s/^ERROR/WARNING/o;
+ printmsg($conf{'error'}, 0);
+ }
+ elsif ($oneRcptAccepted == 0) {
+ $oneRcptAccepted = 1;
+ }
+}
+## If no recipients were accepted we need to exit with an error.
+if ($oneRcptAccepted == 0) {
+ quit("ERROR => Exiting. No recipients were accepted for delivery by the mail server.", 1);
+}
+
+## DATA
+if (SMTPchat('DATA')) { quit($conf{'error'}, 1); }
+
+
+###############################
+## Build and send the body ##
+###############################
+printmsg("INFO => Sending message body",1);
+
+## If the message-format is raw just send the message as-is.
+if ($opt{'message-format'} =~ /^raw$/i) {
+ print $SERVER $message;
+}
+
+## If the message-format isn't raw, then build and send the message,
+else {
+
+ ## Message-ID: <MessageID>
+ print $SERVER 'Message-ID: <' . $conf{'Message-ID'} . '@' . $conf{'hostname'} . '>' . $CRLF;
+
+ ## From: "Name" <address@domain.com> (the pointless test below is just to keep scoping correct)
+ if ($from) {
+ my ($name, $address) = returnAddressParts($from);
+ print $SERVER 'From: "' . $name . '" <' . $address . '>' . $CRLF;
+ }
+
+ ## Reply-To:
+ if ($opt{'reply-to'}) {
+ my ($name, $address) = returnAddressParts($opt{'reply-to'});
+ print $SERVER 'Reply-To: "' . $name . '" <' . $address . '>' . $CRLF;
+ }
+
+ ## To: "Name" <address@domain.com>
+ if (scalar(@to) > 0) {
+ print $SERVER "To:";
+ for (my $a = 0; $a < scalar(@to); $a++) {
+ my $msg = "";
+
+ my ($name, $address) = returnAddressParts($to[$a]);
+ $msg = " \"$name\" <$address>";
+
+ ## If we're not on the last address add a comma to the end of the line.
+ if (($a + 1) != scalar(@to)) {
+ $msg .= ",";
+ }
+
+ print $SERVER $msg . $CRLF;
+ }
+ }
+ ## We always want a To: line so if the only recipients were bcc'd they don't see who it was sent to
+ else {
+ print $SERVER "To: \"Undisclosed Recipients\" <>$CRLF";
+ }
+
+ if (scalar(@cc) > 0) {
+ print $SERVER "Cc:";
+ for (my $a = 0; $a < scalar(@cc); $a++) {
+ my $msg = "";
+
+ my ($name, $address) = returnAddressParts($cc[$a]);
+ $msg = " \"$name\" <$address>";
+
+ ## If we're not on the last address add a comma to the end of the line.
+ if (($a + 1) != scalar(@cc)) {
+ $msg .= ",";
+ }
+
+ print $SERVER $msg . $CRLF;
+ }
+ }
+
+ print $SERVER 'Subject: ' . $subject . $CRLF; ## Subject
+ print $SERVER 'Date: ' . $date . $CRLF; ## Date
+ print $SERVER 'X-Mailer: sendEmail-'.$conf{'version'}.$CRLF; ## X-Mailer
+
+ ## Send an additional message header line if specified
+ if ($opt{'message-header'}) {
+ print $SERVER $opt{'message-header'} . $CRLF;
+ }
+
+ ## Encode all messages with MIME.
+ print $SERVER "MIME-Version: 1.0$CRLF";
+ print $SERVER "Content-Type: multipart/mixed; boundary=\"$conf{'delimiter'}\"$CRLF";
+ print $SERVER "$CRLF";
+ print $SERVER "This is a multi-part message in MIME format. To properly display this message you need a MIME-Version 1.0 compliant Email program.$CRLF";
+ print $SERVER "$CRLF";
+
+
+ ## Send message body
+ print $SERVER "--$conf{'delimiter'}$CRLF";
+ ## If the message contains HTML change the Content-Type
+ if ($message =~ /^\s*<html>/i) {
+ printmsg("Message is in HTML format", 1);
+ print $SERVER "Content-Type: text/html;$CRLF";
+ }
+ ## Otherwise it's a normal text email
+ else {
+ print $SERVER "Content-Type: text/plain;$CRLF";
+ }
+ print $SERVER " charset=\"" . $opt{'message-charset'} . "\"$CRLF";
+ print $SERVER "Content-Transfer-Encoding: 7bit$CRLF";
+ print $SERVER $CRLF;
+ print $SERVER $message;
+
+
+
+ ## Send Attachemnts
+ if ($attachments[0]) {
+ ## Disable the alarm so people on modems can send big attachments
+ alarm(0) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+
+ ## Send the attachments
+ foreach my $filename (@attachments) {
+ ## This is check 2, we already checked this above, but just in case...
+ if ( ! -f $filename ) {
+ printmsg("ERROR => The file [$filename] doesn't exist! Email will be sent, but without that attachment.", 0);
+ }
+ elsif ( ! -r $filename ) {
+ printmsg("ERROR => Couldn't open the file [$filename] for reading: $! Email will be sent, but without that attachment.", 0);
+ }
+ else {
+ printmsg("DEBUG => Sending the attachment [$filename]", 1);
+ send_attachment($filename);
+ }
+ }
+ }
+
+
+ ## End the mime encoded message
+ print $SERVER "$CRLF--$conf{'delimiter'}--$CRLF";
+}
+
+
+## Tell the server we are done sending the email
+print $SERVER "$CRLF.$CRLF";
+if (SMTPchat()) { quit($conf{'error'}, 1); }
+
+
+
+####################
+# We are done!!! #
+####################
+
+## Disconnect from the server
+if (SMTPchat('QUIT')) { quit($conf{'error'}, 1); }
+close $SERVER;
+
+
+
+
+
+
+#######################################
+## Generate exit message/log entry ##
+#######################################
+
+if ($conf{'debug'} or $conf{'logging'}) {
+ printmsg("Generating a detailed exit message", 3);
+
+ ## Put the message together
+ my $output = "Email was sent successfully! From: <" . (returnAddressParts($from))[1] . "> ";
+
+ if (scalar(@to) > 0) {
+ $output .= "To: ";
+ for ($a = 0; $a < scalar(@to); $a++) {
+ $output .= "<" . (returnAddressParts($to[$a]))[1] . "> ";
+ }
+ }
+ if (scalar(@cc) > 0) {
+ $output .= "Cc: ";
+ for ($a = 0; $a < scalar(@cc); $a++) {
+ $output .= "<" . (returnAddressParts($cc[$a]))[1] . "> ";
+ }
+ }
+ if (scalar(@bcc) > 0) {
+ $output .= "Bcc: ";
+ for ($a = 0; $a < scalar(@bcc); $a++) {
+ $output .= "<" . (returnAddressParts($bcc[$a]))[1] . "> ";
+ }
+ }
+ $output .= "Subject: [$subject] " if ($subject);
+ if (scalar(@attachments_names) > 0) {
+ $output .= "Attachment(s): ";
+ foreach(@attachments_names) {
+ $output .= "[$_] ";
+ }
+ }
+ $output .= "Server: [$conf{'server'}:$conf{'port'}]";
+
+
+######################
+# Exit the program #
+######################
+
+ ## Print / Log the detailed message
+ quit($output, 0);
+}
+else {
+ ## Or the standard message
+ quit("Email was sent successfully!", 0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: initialize ()
+##
+## Does all the script startup jibberish.
+##
+###############################################################################################
+sub initialize {
+
+ ## Set STDOUT to flush immediatly after each print
+ $| = 1;
+
+ ## Intercept signals
+ $SIG{'QUIT'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'INT'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'KILL'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'TERM'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+
+ ## ALARM and HUP signals are not supported in Win32
+ unless ($^O =~ /win/i) {
+ $SIG{'HUP'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'ALRM'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ }
+
+ ## Fixup $conf{'programName'}
+ $conf{'programName'} =~ s/(.)*[\/,\\]//;
+ $0 = $conf{'programName'} . " " . join(" ", @ARGV);
+
+ ## Fixup $conf{'hostname'}
+ if ($conf{'hostname'} eq 'localhost') {
+ $conf{'hostname'} = "";
+
+ if ($ENV{'HOSTNAME'}) {
+ $conf{'hostname'} = lc($ENV{'HOSTNAME'});
+ }
+ elsif ($ENV{'COMPUTERNAME'}) {
+ $conf{'hostname'} = lc($ENV{'COMPUTERNAME'});
+ }
+ else {
+ ## Try the hostname module
+ use Sys::Hostname;
+ $conf{'hostname'} = lc(hostname());
+ }
+
+ ## Assign a name of "localhost" if it can't find anything else.
+ if (!$conf{'hostname'}) {
+ $conf{'hostname'} = 'localhost';
+ }
+
+ $conf{'hostname'} =~ s/\..*$//; ## Remove domain name if it's present
+ }
+
+ return(1);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: processCommandLine ()
+##
+## Processes command line storing important data in global vars (usually %conf)
+##
+###############################################################################################
+sub processCommandLine {
+
+
+ ############################
+ ## Process command line ##
+ ############################
+
+ my @ARGS = @ARGV; ## This is so later we can re-parse the command line args later if we need to
+ my $numargv = @ARGS;
+ help() unless ($numargv);
+ my $counter = 0;
+
+ for ($counter = 0; $counter < $numargv; $counter++) {
+
+ if ($ARGS[$counter] =~ /^-h$/i) { ## Help ##
+ help();
+ }
+
+ elsif ($ARGS[$counter] eq "") { ## Ignore null arguments
+ ## Do nothing
+ }
+
+ elsif ($ARGS[$counter] =~ /^--help/) { ## Topical Help ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ helpTopic($ARGS[$counter]);
+ }
+ else {
+ help();
+ }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-o$/i) { ## Options specified with -o ##
+ $counter++;
+ ## Loop through each option passed after the -o
+ while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+
+ if ($ARGS[$counter] !~ /(\S+)=(\S.*)/) {
+ printmsg("WARNING => Name/Value pair [$ARGS[$counter]] is not properly formatted", 0);
+ printmsg("WARNING => Arguments proceeding -o should be in the form of \"name=value\"", 0);
+ }
+ else {
+ if (exists($opt{$1})) {
+ $opt{$1} = $2;
+ printmsg("DEBUG => Assigned \$opt{} key/value: $1 => $2", 3);
+ }
+ else {
+ printmsg("WARNING => Name/Value pair [$ARGS[$counter]] will be ignored: unknown key [$1]", 0);
+ printmsg("HINT => Try the --help option to find valid command line arguments", 1);
+ }
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-f$/) { ## From ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { $from = $ARGS[$counter]; }
+ else { printmsg("WARNING => The argument after -f was not an email address!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-t$/) { ## To ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ if ($ARGS[$counter] =~ /[;,]/) {
+ push (@to, split(/[;,]/, $ARGS[$counter]));
+ }
+ else {
+ push (@to,$ARGS[$counter]);
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-cc$/) { ## Cc ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ if ($ARGS[$counter] =~ /[;,]/) {
+ push (@cc, split(/[;,]/, $ARGS[$counter]));
+ }
+ else {
+ push (@cc,$ARGS[$counter]);
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-bcc$/) { ## Bcc ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ if ($ARGS[$counter] =~ /[;,]/) {
+ push (@bcc, split(/[;,]/, $ARGS[$counter]));
+ }
+ else {
+ push (@bcc,$ARGS[$counter]);
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-m$/) { ## Message ##
+ $counter++;
+ $message = "";
+ while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ if ($message) { $message .= " "; }
+ $message .= $ARGS[$counter];
+ $counter++;
+ } $counter--;
+
+ ## Replace '\n' with $CRLF.
+ ## This allows newlines with messages sent on the command line
+ $message =~ s/\\n/$CRLF/g;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-u$/) { ## Subject ##
+ $counter++;
+ $subject = "";
+ while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ if ($subject) { $subject .= " "; }
+ $subject .= $ARGS[$counter];
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-s$/) { ## Server ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $conf{'server'} = $ARGS[$counter];
+ if ($conf{'server'} =~ /:/) { ## Port ##
+ ($conf{'server'},$conf{'port'}) = split(":",$conf{'server'});
+ }
+ }
+ else { printmsg("WARNING - The argument after -s was not the server!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-a$/) { ## Attachments ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ push (@attachments,$ARGS[$counter]);
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-xu$/) { ## AuthSMTP Username ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $conf{'authUsername'} = $ARGS[$counter];
+ my $tmp = substr(pack('u', $conf{'authUsername'}), 1); ## Convert the string to uuencoded text
+ chop($tmp);
+ $tmp =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ $conf{'authUsername'} = $tmp;
+ }
+ else {
+ printmsg("WARNING => The argument after -xu was not valid username!", 0);
+ $counter--;
+ }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-xp$/) { ## AuthSMTP Password ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $conf{'authPassword'} = $ARGS[$counter];
+ my $tmp = substr(pack('u', $conf{'authPassword'}), 1); ## Convert the binary to uuencoded text
+ chop($tmp);
+ $tmp =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ $conf{'authPassword'} = $tmp;
+ }
+ else {
+ printmsg("WARNING => The argument after -xp was not valid password!", 0);
+ $counter--;
+ }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-l$/) { ## Logging ##
+ $counter++;
+ $conf{'logging'} = 1;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { $conf{'logFile'} = $ARGS[$counter]; }
+ else { printmsg("WARNING - The argument after -l was not the log file!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ s/^-v+//i) { ## Verbosity ##
+ my $tmp = (length($&) - 1);
+ $conf{'debug'} += $tmp;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-q$/) { ## Quiet ##
+ $conf{'stdout'} = 0;
+ }
+
+ else {
+ printmsg("Error: \"$ARGS[$counter]\" is not a recognized option!", 0);
+ help();
+ }
+
+ }
+
+
+
+
+
+
+
+
+ ###################################################
+ ## Verify required variables are set correctly ##
+ ###################################################
+
+ if (!$conf{'server'}) {
+ $conf{'server'} = 'localhost';
+ }
+ if (!$conf{'port'}) {
+ $conf{'port'} = 25;
+ }
+ if (!$from) {
+ quit("ERROR => You must specify a 'from' field! Try --help.", 1);
+ }
+ if ( ((scalar(@to)) + (scalar(@cc)) + (scalar(@bcc))) <= 0) {
+ quit("ERROR => You must specify at least one recipient via -t, -cc, or -bcc", 1);
+ }
+
+ ## Make sure email addresses look OK.
+ foreach my $addr (@to, @cc, @bcc, $from, $opt{'reply-to'}) {
+ if ($addr) {
+ if (!returnAddressParts($addr)) {
+ printmsg("ERROR => Can't use improperly formatted email address: $addr", 0);
+ printmsg("HINT => Try viewing the extended help on addressing with \"--help addressing\"", 1);
+ quit("", 1);
+ }
+ }
+ }
+
+ ## Make sure all attachments exist.
+ foreach my $file (@attachments) {
+ if ( (! -f $file) or (! -r $file) ) {
+ printmsg("ERROR => The attachment [$file] doesn't exist!", 0);
+ printmsg("HINT => Try specifying the full path to the file or reading extended help with \"--help message\"", 1);
+ quit("", 1);
+ }
+ }
+
+ if ($conf{'logging'} and (!$conf{'logFile'})) {
+ quit("ERROR => You used -l to enable logging but didn't specify a log file!", 1);
+ }
+
+ if ( $conf{'authUsername'} ) {
+ if (!$conf{'authPassword'}) {
+ quit ("ERROR => You must supply both a username and a password to use SMTP auth.",1);
+ }
+ }
+
+ ## Return 0 errors
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## getline($socketRef)
+sub getline {
+ my ($socketRef) = @_;
+ local ($/) = "\r\n";
+ return $$socketRef->getline;
+}
+
+
+
+
+## Receive a (multiline?) SMTP response from ($socketRef)
+sub getResponse {
+ my ($socketRef) = @_;
+ my ($tmp, $reply);
+ local ($/) = "\r\n";
+ return undef unless defined($tmp = getline($socketRef));
+ return("getResponse() socket is not open") unless ($$socketRef->opened);
+ ## Keep reading lines if it's a multi-line response
+ while ($tmp =~ /^\d{3}-/o) {
+ $reply .= $tmp;
+ return undef unless defined($tmp = getline($socketRef));
+ }
+ $reply .= $tmp;
+ $reply =~ s/\r?\n$//o;
+ return $reply;
+}
+
+
+
+
+###############################################################################################
+## Function: SMTPchat ( [string $command] )
+##
+## Description: Sends $command to the SMTP server (on SERVER) and awaits a successfull
+## reply form the server. If the server returns an error, or does not reply
+## within $conf{'alarm'} seconds an error is generated.
+## NOTE: $command is optional, if no command is specified then nothing will
+## be sent to the server, but a valid response is still required from the server.
+##
+## Input: [$command] A (optional) valid SMTP command (ex. "HELO")
+##
+##
+## Output: Returns zero on success, or non-zero on error.
+## Error messages will be stored in $conf{'error'}
+##
+##
+## Example: SMTPchat ("HELO mail.isp.net");
+###############################################################################################
+sub SMTPchat {
+ my ($command) = @_;
+
+ printmsg("INFO => Sending: \t$command", 1) if ($command);
+
+ ## Send our command
+ print $SERVER "$command$CRLF" if ($command);
+
+ ## Read a response from the server
+ $SIG{'ALRM'} = sub { $conf{'error'} = "alarm"; $SERVER->close(); };
+ alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+ my $result = getResponse(\$SERVER);
+ alarm(0) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+
+ ## Generate an alert if we timed out
+ if ($conf{'error'} eq "alarm") {
+ $conf{'error'} = "ERROR => Timeout while reading from $conf{'server'}:$conf{'port'} There was no response after $conf{'alarm'} seconds.";
+ return(1);
+ }
+
+ ## Make sure the server actually responded
+ if (!$result) {
+ $conf{'error'} = "ERROR => $conf{'server'}:$conf{'port'} returned a zero byte response to our query.";
+ return(2);
+ }
+
+ ## Validate the response
+ if (evalSMTPresponse($result)) {
+ ## conf{'error'} will already be set here
+ return(2);
+ }
+
+ ## Print the success messsage
+ printmsg($conf{'error'}, 1);
+
+ ## Return Success
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: evalSMTPresponse (string $message )
+##
+## Description: Searches $message for either an SMTP success or error code, and returns
+## 0 on success, and the actual error code on error.
+##
+##
+## Input: $message Data received from a SMTP server (ex. "220
+##
+##
+## Output: Returns zero on success, or non-zero on error.
+## Error messages will be stored in $conf{'error'}
+##
+##
+## Example: SMTPchat ("HELO mail.isp.net");
+###############################################################################################
+sub evalSMTPresponse {
+ my ($message) = @_;
+
+ ## Validate input
+ if (!$message) {
+ $conf{'error'} = "ERROR => No message was passed to evalSMTPresponse(). What happened?";
+ return(1)
+ }
+
+ printmsg("DEBUG => evalSMTPresponse() - Checking for SMTP success or error status in the message: $message ", 3);
+
+ ## Look for a SMTP success code
+ if ($message =~ /^([23]\d\d)/) {
+ printmsg("DEBUG => evalSMTPresponse() - Found SMTP success code: $1", 2);
+ $conf{'error'} = "SUCCESS => Received: \t$message";
+ return(0);
+ }
+
+ ## Look for a SMTP error code
+ if ($message =~ /^([45]\d\d)/) {
+ printmsg("DEBUG => evalSMTPresponse() - Found SMTP error code: $1", 2);
+ $conf{'error'} = "ERROR => Received: \t$message";
+ return($1);
+ }
+
+ ## If no SMTP codes were found return an error of 1
+ $conf{'error'} = "ERROR => Received a message with no success or error code. The message received was: $message";
+ return(2);
+
+}
+
+
+
+
+
+
+
+
+
+
+#########################################################
+# SUB: &return_month(0,1,etc)
+# returns the name of the month that corrosponds
+# with the number. returns 0 on error.
+#########################################################
+sub return_month {
+ my $x = $_[0];
+ if ($x == 0) { return 'Jan'; }
+ if ($x == 1) { return 'Feb'; }
+ if ($x == 2) { return 'Mar'; }
+ if ($x == 3) { return 'Apr'; }
+ if ($x == 4) { return 'May'; }
+ if ($x == 5) { return 'Jun'; }
+ if ($x == 6) { return 'Jul'; }
+ if ($x == 7) { return 'Aug'; }
+ if ($x == 8) { return 'Sep'; }
+ if ($x == 9) { return 'Oct'; }
+ if ($x == 10) { return 'Nov'; }
+ if ($x == 11) { return 'Dec'; }
+ return (0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#########################################################
+# SUB: &return_day(0,1,etc)
+# returns the name of the day that corrosponds
+# with the number. returns 0 on error.
+#########################################################
+sub return_day {
+ my $x = $_[0];
+ if ($x == 0) { return 'Sun'; }
+ if ($x == 1) { return 'Mon'; }
+ if ($x == 2) { return 'Tue'; }
+ if ($x == 3) { return 'Wed'; }
+ if ($x == 4) { return 'Thu'; }
+ if ($x == 5) { return 'Fri'; }
+ if ($x == 6) { return 'Sat'; }
+ return (0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: returnAddressParts(string $address)
+##
+## Description: Returns a two element array containing the "Name" and "Address" parts of
+## an email address.
+##
+## Example: "Brandon Zehm <caspian@dotconf.net>"
+## would return: ("Brandon Zehm", "caspian@dotconf.net");
+##
+## "caspian@dotconf.net"
+## would return: ("caspian@dotconf.net", "caspian@dotconf.net")
+###############################################################################################
+sub returnAddressParts {
+ my $input = $_[0];
+ my $name = "";
+ my $address = "";
+
+ ## Make sure to fail if it looks totally invalid
+ if ($input !~ /(\S+\@\S+)/) {
+ $conf{'error'} = "ERROR => The address [$input] doesn't look like a valid email address, ignoring it";
+ return(undef());
+ }
+
+ ## Check 1, should find addresses like: "Brandon Zehm <caspian@dotconf.net>"
+ elsif ($input =~ /^\s*(\S(.*\S)?)\s*<(\S+\@\S+)>/o) {
+ ($name, $address) = ($1, $3);
+ }
+
+ ## Otherwise if that failed, just get the address: <caspian@dotconf.net>
+ elsif ($input =~ /<(\S+\@\S+)>/o) {
+ $name = $address = $1;
+ }
+
+ ## Or maybe it was formatted this way: caspian@dotconf.net
+ elsif ($input =~ /(\S+\@\S+)/o) {
+ $name = $address = $1;
+ }
+
+ ## Something stupid happened, just return an error.
+ unless ($name and $address) {
+ printmsg("ERROR => Couldn't parse the address: $input", 0);
+ printmsg("HINT => If you think this should work, consider reporting this as a bug to $conf{'authorEmail'}", 1);
+ return(undef());
+ }
+
+ ## Make sure there aren't invalid characters in the address, and return it.
+ my $ctrl = '\000-\037';
+ my $nonASCII = '\x80-\xff';
+ if ($address =~ /[<> ,;:"'\[\]\\$ctrl$nonASCII]/) {
+ printmsg("WARNING => The address [$address] seems to contain invalid characters: continuing anyway", 0);
+ }
+ return($name, $address);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#########################################################
+# SUB: send_attachment("/path/filename")
+# Sends the mime headers and base64 encoded file
+# to the email server.
+#########################################################
+sub send_attachment {
+ my ($filename) = @_; ## Get filename passed
+ my (@fields, $y, $filename_name, $encoding, ## Local variables
+ @attachlines, $content_type);
+ my $bin = 1;
+
+ @fields = split(/\/|\\/, $filename); ## Get the actual filename without the path
+ $filename_name = pop(@fields);
+ push @attachments_names, $filename_name; ## FIXME: This is only used later for putting in the log file
+
+ ##########################
+ ## Autodetect Mime Type ##
+ ##########################
+
+ @fields = split(/\./, $filename_name);
+ $encoding = $fields[$#fields];
+
+ if ($encoding =~ /txt|text|log|conf|^c$|cpp|^h$|inc|m3u/i) { $content_type = 'text/plain'; }
+ elsif ($encoding =~ /html|htm|shtml|shtm|asp|php|cfm/i) { $content_type = 'text/html'; }
+ elsif ($encoding =~ /sh$/i) { $content_type = 'application/x-sh'; }
+ elsif ($encoding =~ /tcl/i) { $content_type = 'application/x-tcl'; }
+ elsif ($encoding =~ /pl$/i) { $content_type = 'application/x-perl'; }
+ elsif ($encoding =~ /js$/i) { $content_type = 'application/x-javascript'; }
+ elsif ($encoding =~ /man/i) { $content_type = 'application/x-troff-man'; }
+ elsif ($encoding =~ /gif/i) { $content_type = 'image/gif'; }
+ elsif ($encoding =~ /jpg|jpeg|jpe|jfif|pjpeg|pjp/i) { $content_type = 'image/jpeg'; }
+ elsif ($encoding =~ /tif|tiff/i) { $content_type = 'image/tiff'; }
+ elsif ($encoding =~ /xpm/i) { $content_type = 'image/x-xpixmap'; }
+ elsif ($encoding =~ /bmp/i) { $content_type = 'image/x-MS-bmp'; }
+ elsif ($encoding =~ /pcd/i) { $content_type = 'image/x-photo-cd'; }
+ elsif ($encoding =~ /png/i) { $content_type = 'image/png'; }
+ elsif ($encoding =~ /aif|aiff/i) { $content_type = 'audio/x-aiff'; }
+ elsif ($encoding =~ /wav/i) { $content_type = 'audio/x-wav'; }
+ elsif ($encoding =~ /mp2|mp3|mpa/i) { $content_type = 'audio/x-mpeg'; }
+ elsif ($encoding =~ /ra$|ram/i) { $content_type = 'audio/x-pn-realaudio'; }
+ elsif ($encoding =~ /mpeg|mpg/i) { $content_type = 'video/mpeg'; }
+ elsif ($encoding =~ /mov|qt$/i) { $content_type = 'video/quicktime'; }
+ elsif ($encoding =~ /avi/i) { $content_type = 'video/x-msvideo'; }
+ elsif ($encoding =~ /zip/i) { $content_type = 'application/x-zip-compressed'; }
+ elsif ($encoding =~ /tar/i) { $content_type = 'application/x-tar'; }
+ elsif ($encoding =~ /jar/i) { $content_type = 'application/java-archive'; }
+ elsif ($encoding =~ /exe|bin/i) { $content_type = 'application/octet-stream'; }
+ elsif ($encoding =~ /ppt|pot|ppa|pps|pwz/i) { $content_type = 'application/vnd.ms-powerpoint'; }
+ elsif ($encoding =~ /mdb|mda|mde/i) { $content_type = 'application/vnd.ms-access'; }
+ elsif ($encoding =~ /xls|xlt|xlm|xld|xla|xlc|xlw|xll/i) { $content_type = 'application/vnd.ms-excel'; }
+ elsif ($encoding =~ /doc|dot/i) { $content_type = 'application/msword'; }
+ elsif ($encoding =~ /rtf/i) { $content_type = 'application/rtf'; }
+ elsif ($encoding =~ /pdf/i) { $content_type = 'application/pdf'; }
+ elsif ($encoding =~ /tex/i) { $content_type = 'application/x-tex'; }
+ elsif ($encoding =~ /latex/i) { $content_type = 'application/x-latex'; }
+ elsif ($encoding =~ /vcf/i) { $content_type = 'application/x-vcard'; }
+ else { $content_type = 'application/octet-stream'; }
+
+
+ ############################
+ ## Process the attachment ##
+ ############################
+
+ #####################################
+ ## Generate and print MIME headers ##
+ #####################################
+
+ $y = "$CRLF--$conf{'delimiter'}$CRLF";
+ $y .= "Content-Type: $content_type;$CRLF";
+ $y .= " name=\"$filename_name\"$CRLF";
+ $y .= "Content-Transfer-Encoding: base64$CRLF";
+ $y .= "Content-Disposition: attachment; filename=\"$filename_name\"$CRLF";
+ $y .= "$CRLF";
+ print $SERVER $y;
+
+
+ ###########################################################
+ ## Convert the file to base64 and print it to the server ##
+ ###########################################################
+
+ open (FILETOATTACH, $filename) || do {
+ printmsg("ERROR => Opening the file [$filename] for attachment failed with the error: $!", 0);
+ return(1);
+ };
+ binmode(FILETOATTACH); ## Hack to make Win32 work
+
+ my $res = "";
+ my $tmp = "";
+ my $base64 = "";
+ while (<FILETOATTACH>) { ## Read a line from the (binary) file
+ $res .= $_;
+
+ ###################################
+ ## Convert binary data to base64 ##
+ ###################################
+ while ($res =~ s/(.{45})//s) { ## Get 45 bytes from the binary string
+ $tmp = substr(pack('u', $&), 1); ## Convert the binary to uuencoded text
+ chop($tmp);
+ $tmp =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ $base64 .= $tmp;
+ }
+
+ ################################
+ ## Print chunks to the server ##
+ ################################
+ while ($base64 =~ s/(.{76})//s) {
+ print $SERVER "$1$CRLF";
+ }
+
+ }
+
+ ###################################
+ ## Encode and send the leftovers ##
+ ###################################
+ my $padding = "";
+ if ( ($res) and (length($res) >= 1) ) {
+ $padding = (3 - length($res) % 3) % 3; ## Set flag if binary data isn't divisible by 3
+ $res = substr(pack('u', $res), 1); ## Convert the binary to uuencoded text
+ chop($res);
+ $res =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ }
+
+ ############################
+ ## Fix padding at the end ##
+ ############################
+ $res = $base64 . $res; ## Get left overs from above
+ $res =~ s/.{$padding}$/'=' x $padding/e if $padding; ## Fix the end padding if flag (from above) is set
+ if ($res) {
+ while ($res =~ s/(.{1,76})//s) { ## Send it to the email server.
+ print $SERVER "$1$CRLF";
+ }
+ }
+
+ close (FILETOATTACH) || do {
+ printmsg("ERROR - Closing the filehandle for file [$filename] failed with the error: $!", 0);
+ return(2);
+ };
+
+ ## Return 0 errors
+ return(0);
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: printmsg (string $message, int $level)
+##
+## Description: Handles all messages - printing them to the screen only if the messages
+## $level is >= the global debug level. If $conf{'logFile'} is defined it
+## will also log the message to that file.
+##
+## Input: $message A message to be printed, logged, etc.
+## $level The debug level of the message. If
+## not defined 0 will be assumed. 0 is
+## considered a normal message, 1 and
+## higher is considered a debug message.
+##
+## Output: Prints to STDOUT
+##
+## Assumptions: $conf{'hostname'} should be the name of the computer we're running on.
+## $conf{'stdout'} should be set to 1 if you want to print to stdout
+## $conf{'logFile'} should be a full path to a log file if you want that
+## $conf{'syslog'} should be 1 if you want to syslog, the syslog() function
+## written by Brandon Zehm should be present.
+## $conf{'debug'} should be an integer between 0 and 10.
+##
+## Example: printmsg("WARNING: We believe in generic error messages... NOT!", 0);
+###############################################################################################
+sub printmsg {
+ ## Assign incoming parameters to variables
+ my ( $message, $level ) = @_;
+
+ ## Make sure input is sane
+ $level = 0 if (!defined($level));
+ $message =~ s/\s+$//sgo;
+ $message =~ s/\r?\n/, /sgo;
+
+ ## Continue only if the debug level of the program is >= message debug level.
+ if ($conf{'debug'} >= $level) {
+
+ ## Get the date in the format: Dec 3 11:14:04
+ my ($sec, $min, $hour, $mday, $mon) = localtime();
+ $mon = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')[$mon];
+ my $date = sprintf("%s %02d %02d:%02d:%02d", $mon, $mday, $hour, $min, $sec);
+
+ ## Print to STDOUT always if debugging is enabled, or if conf{stdout} is true.
+ if ( ($conf{'debug'} >= 1) or ($conf{'stdout'} == 1) ) {
+ print "$date $conf{'hostname'} $conf{'programName'}\[$$\]: $message\n";
+ }
+
+ ## Print to the log file if $conf{'logging'} is true
+ if ($conf{'logFile'}) {
+ if (openLogFile($conf{'logFile'})) { $conf{'logFile'} = ""; printmsg("ERROR => Opening the file [$conf{'logFile'}] for appending returned the error: $!", 1); }
+ print LOGFILE "$date $conf{'hostname'} $conf{'programName'}\[$$\]: $message\n";
+ }
+
+ }
+
+ ## Return 0 errors
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## FUNCTION:
+## openLogFile ( $filename )
+##
+##
+## DESCRIPTION:
+## Opens the file $filename and attaches it to the filehandle "LOGFILE". Returns 0 on success
+## and non-zero on failure. Error codes are listed below, and the error message gets set in
+## global variable $!.
+##
+##
+## Example:
+## openFile ("/var/log/sendEmail.log");
+##
+###############################################################################################
+sub openLogFile {
+ ## Get the incoming filename
+ my $filename = $_[0];
+
+ ## Make sure our file exists, and if the file doesn't exist then create it
+ if ( ! -f $filename ) {
+ print STDERR "NOTICE: The log file [$filename] does not exist. Creating it now with mode [0600].\n" if ($conf{'stdout'});
+ open (LOGFILE, ">>$filename");
+ close LOGFILE;
+ chmod (0600, $filename);
+ }
+
+ ## Now open the file and attach it to a filehandle
+ open (LOGFILE,">>$filename") or return (1);
+
+ ## Put the file into non-buffering mode
+ select LOGFILE;
+ $| = 1;
+ select STDOUT;
+
+ ## Return success
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: quit (string $message, int $errorLevel)
+##
+## Description: Exits the program, optionally printing $message. It
+## returns an exit error level of $errorLevel to the
+## system (0 means no errors, and is assumed if empty.)
+##
+## Example: quit("Exiting program normally", 0);
+###############################################################################################
+sub quit {
+ my %incoming = ();
+ (
+ $incoming{'message'},
+ $incoming{'errorLevel'}
+ ) = @_;
+ $incoming{'errorLevel'} = 0 if (!defined($incoming{'errorLevel'}));
+
+ ## Print exit message
+ if ($incoming{'message'}) {
+ printmsg($incoming{'message'}, 0);
+ }
+
+ ## Exit
+ exit($incoming{'errorLevel'});
+}
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: help ()
+##
+## Description: For all those newbies ;)
+## Prints a help message and exits the program.
+##
+###############################################################################################
+sub help {
+exit(1) if (!$conf{'stdout'});
+print <<EOM;
+
+${colorBold}$conf{'programName'}-$conf{'version'} by $conf{'authorName'} <$conf{'authorEmail'}>${colorNoBold}
+
+Synopsis: $conf{'programName'} -f ADDRESS [options]
+
+ ${colorRed}Required:${colorNormal}
+ -f ADDRESS from (sender) email address
+ * At least one recipient required via -t, -cc, or -bcc
+ * Message body required via -m, STDIN, or -o message-file=FILE
+
+ ${colorGreen}Common:${colorNormal}
+ -t ADDRESS [ADDR ...] to email address(es)
+ -u SUBJECT message subject
+ -m MESSAGE message body
+ -s SERVER[:PORT] smtp mail relay, default is $conf{'server'}:$conf{'port'}
+
+ ${colorGreen}Optional:${colorNormal}
+ -a FILE [FILE ...] file attachment(s)
+ -cc ADDRESS [ADDR ...] cc email address(es)
+ -bcc ADDRESS [ADDR ...] bcc email address(es)
+
+ ${colorGreen}Paranormal:${colorNormal}
+ -xu USERNAME authentication user (for SMTP authentication)
+ -xp PASSWORD authentication password (for SMTP authentication)
+ -l LOGFILE log to the specified file
+ -v verbosity, use multiple times for greater effect
+ -q be quiet (no stdout output)
+ -o NAME=VALUE see extended help topic "misc" for details
+
+ ${colorGreen}Help:${colorNormal}
+ --help TOPIC The following extended help topics are available:
+ addressing explain addressing and related options
+ message explain message body input and related options
+ misc explain -xu, -xp, and others
+ networking explain -s, etc
+ output explain logging and other output options
+
+EOM
+exit(1);
+}
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: helpTopic ($topic)
+##
+## Description: For all those newbies ;)
+## Prints a help message and exits the program.
+##
+###############################################################################################
+sub helpTopic {
+ exit(1) if (!$conf{'stdout'});
+ my ($topic) = @_;
+
+ CASE: {
+
+
+
+
+## ADDRESSING
+ ($topic eq 'addressing') && do {
+ print <<EOM;
+
+${colorBold}ADDRESSING DOCUMENTATION${colorNormal}
+
+${colorGreen}Addressing Options${colorNormal}
+Options related to addressing:
+ -f ADDRESS
+ -t ADDRESS [ADDRESS ...]
+ -cc ADDRESS [ADDRESS ...]
+ -bcc ADDRESS [ADDRESS ...]
+ -o reply-to=ADDRESS
+
+-f ADDRESS
+ This required option specifies who the email is from, I.E. the sender's
+ email address.
+
+-t ADDRESS [ADDRESS ...]
+ This option specifies the primary recipient(s). At least one recipient
+ address must be specified via the -t, -cc. or -bcc options.
+
+-cc ADDRESS [ADDRESS ...]
+ This option specifies the "carbon copy" recipient(s). At least one
+ recipient address must be specified via the -t, -cc. or -bcc options.
+
+-bcc ADDRESS [ADDRESS ...]
+ This option specifies the "blind carbon copy" recipient(s). At least
+ one recipient address must be specified via the -t, -cc. or -bcc options.
+
+-o reply-to=ADDRESS
+ This option specifies that an optional "Reply-To" address should be
+ written in the email's headers.
+
+
+${colorGreen}Email Address Syntax${colorNormal}
+Email addresses may be specified in one of two ways:
+ Full Name: "John Doe <john.doe\@gmail.com>"
+ Just Address: "john.doe\@gmail.com"
+
+The "Full Name" method is useful if you want a name, rather than a plain
+email address, to be displayed in the recipient's From, To, or Cc fields
+when they view the message.
+
+
+${colorGreen}Multiple Recipients${colorNormal}
+The -t, -cc, and -bcc options each accept multiple addresses. They may be
+specified by separating them by either a white space, comma, or semi-colon
+separated list. You may also specify the -t, -cc, and -bcc options multiple
+times, each occurance will append the new recipients to the respective list.
+
+Examples:
+(I used "-t" in these examples, but it can be "-cc" or "-bcc" as well)
+
+ * Space separated list:
+ -t jane.doe\@yahoo.com "John Doe <john.doe\@gmail.com>"
+
+ * Semi-colon separated list:
+ -t "jane.doe\@yahoo.com; John Doe <john.doe\@gmail.com>"
+
+ * Comma separated list:
+ -t "jane.doe\@yahoo.com, John Doe <john.doe\@gmail.com>"
+
+ * Multiple -t, -cc, or -bcc options:
+ -t "jane.doe\@yahoo.com" -t "John Doe <john.doe\@gmail.com>"
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## MESSAGE
+ ($topic eq 'message') && do {
+ print <<EOM;
+
+${colorBold}MESSAGE DOCUMENTATION${colorNormal}
+
+${colorGreen}Message Options${colorNormal}
+Options related to the message:
+ -u SUBJECT
+ -m MESSAGE
+ -o message-file=FILE
+ -o message-header=EMAIL HEADER
+ -o message-format=raw
+ -o message-charset=CHARSET
+
+-u SUBJECT
+ This option allows you to specify the subject for your email message.
+ It is not required (anymore) that the subject be quoted, although it
+ is recommended. The subject will be read until an argument starting
+ with a hyphen (-) is found.
+ Examples:
+ -u "Contact information while on vacation"
+ -u New Microsoft vulnerability discovered
+
+-m MESSAGE
+ This option is one of three methods that allow you to specify the message
+ body for your email. The message may be specified on the command line
+ with this -m option, read from a file with the -o message-file=FILE
+ option, or read from STDIN if neither of these options are present.
+
+ It is not required (anymore) that the message be quoted, although it is
+ recommended. The message will be read until an argument starting with a
+ hyphen (-) is found.
+ Examples:
+ -m "See you in South Beach, Hawaii. -Todd"
+ -m Please ensure that you upgrade your systems right away
+
+ Multi-line message bodies may be specified with the -m option by putting
+ a "\\n" into the message. Example:
+ -m "This is line 1.\\nAnd this is line 2."
+
+ HTML messages are supported, simply begin your message with "<html>" and
+ sendEmail will properly label the mime header so MUAs properly render
+ the message.
+
+-o message-file=FILE
+ This option is one of three methods that allow you to specify the message
+ body for your email. To use this option simply specify a text file
+ containing the body of your email message. Examples:
+ -o message-file=/root/message.txt
+ -o message-file="C:\\Program Files\\output.txt"
+
+-o message-header=EMAIL HEADER
+ This option allows you to specify an additional single line to insert
+ into the email headers. Do not use this unless you know what you are
+ doing!
+ Example: To scare a Microsoft Outlook user you may want to try this:
+ -o message-header="X-Message-Flag: This message contains illegal content"
+
+-o message-format=raw
+ This option instructs sendEmail to assume the message is already a
+ complete email message. SendEmail will not generate any headers and will
+ transmit the message as-is to the remote SMTP server. Due to the nature
+ of this option the following command line options will be ignored when this
+ one is used:
+ -u SUBJECT
+ -o message-header=EMAIL HEADER
+ -o message-charset=CHARSET
+ -a ATTACHMENT
+
+-o message-charset=CHARSET
+ This option allows you to specify the character-set for the message body.
+ The default is iso-8859-1.
+
+
+${colorGreen}The Message Body${colorNormal}
+The message body may be specified in one of three ways:
+ 1) Via the -m MESSAGE command line option.
+ Example:
+ -m "This is the message body"
+
+ 2) By putting the message body in a file and using the -o message-file=FILE
+ command line option.
+ Example:
+ -o message-file=/root/message.txt
+
+ 3) By piping the message body to sendEmail when nither of the above command
+ line options were specified.
+ Example:
+ grep "ERROR" /var/log/messages | sendEmail -t you\@domain.com ...
+
+If the message body begins with "<html>" then the message will be treated as
+an HTML message and the MIME headers will be written so that a HTML capable
+email client will display the message in it's HTML form.
+Any of the above methods may be used with the -o message-format=raw option
+to deliver an already complete email message.
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## MISC
+ ($topic eq 'misc') && do {
+ print <<EOM;
+
+${colorBold}MISC DOCUMENTATION${colorNormal}
+
+${colorGreen}Misc Options${colorNormal}
+Options that don't fit anywhere else:
+ -xu USERNAME
+ -xp PASSWORD
+ -a ATTACHMENT
+ -o timeout=SECONDS
+
+-xu USERNAME
+ This option, in conjunction with the -xp option, allows you to specify
+ a username and password to be used with SMTP servers requiring
+ authentication (via SMTP AUTH.)
+
+-xp PASSWORD
+ This option, in conjunction with the -xu option, allows you to specify
+ a username and password to be used with SMTP servers requiring
+ authentication (via SMTP AUTH.)
+
+-a ATTACHMENT [ATTACHMENT]
+ This option allows you to attach any number of files to your email
+ message.
+
+-o timeout=SECONDS
+ This option sets the timeout value in seconds used for all network reads,
+ writes, and a few other things.
+
+
+${colorGreen}The Complete -o Parameter List${colorNormal}
+ -o message-file=FILE
+ -o message-header=EMAIL HEADER
+ -o message-format=raw
+ -o message-charset=CHARSET
+ -o reply-to=ADDRESS
+ -o timeout=SECONDS
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## NETWORKING
+ ($topic eq 'networking') && do {
+ print <<EOM;
+
+${colorBold}NETWORKING DOCUMENTATION${colorNormal}
+
+${colorGreen}Networking Options${colorNormal}
+Options related to networking:
+ -s SERVER[:PORT]
+ -o timeout=SECONDS
+
+-s SERVER[:PORT]
+ This option allows you to specify the SMTP server sendEmail should
+ connect to to deliver your email message to. If this option is not
+ specified sendEmail will try to connect to localhost:25 to deliver
+ the message. THIS IS MOST LIKELY NOT WHAT YOU WANT, AND WILL LIKELY
+ FAIL unless you have a email server (commonly known as an MTA) running
+ on your computer!
+ Typically you will need to specify your company or ISP's email server.
+ For example, if you use CableOne you will need to specify:
+ -s mail.cableone.net
+ If you have your own email server running on port 300 you would
+ probably use an option like this:
+ -s myserver.mydomain.com:300
+
+-o timeout=SECONDS
+ This option sets the timeout value in seconds used for all network reads,
+ writes, and a few other things.
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## OUTPUTO
+ ($topic eq 'output') && do {
+ print <<EOM;
+
+${colorBold}OUTPUT DOCUMENTATION${colorNormal}
+
+${colorGreen}Output Options${colorNormal}
+Options related to output:
+ -l LOGFILE
+ -v
+ -q
+
+-l LOGFILE
+ This option allows you to specify a log file to append to. Every message
+ that is displayed to STDOUT is also written to the log file. This may be
+ used in conjunction with -q and -v.
+
+-q
+ This option tells sendEmail to disable printing to STDOUT. In other
+ words nothing will be printed to the console. This does not affect the
+ behavior of the -l or -v options.
+
+-v
+ This option allows you to increase the debug level of sendEmail. You may
+ either use this option more than once, or specify more than one v at a
+ time to obtain a debug level higher than one. Examples:
+ Specifies a debug level of 1: -v
+ Specifies a debug level of 2: -vv
+ Specifies a debug level of 2: -v -v
+ A debug level of one is recommended when doing any sort of debugging.
+ At that level you will see the entire SMTP transaction (except the
+ body of the email message), and hints will be displayed for most
+ warnings and errors. The highest debug level is three.
+
+
+EOM
+ last CASE;
+ };
+
+ ## Unknown option selected!
+ quit("ERROR => The help topic specified is not valid!", 1);
+ };
+
+exit(1);
+}
+
+
|