[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    make_it_cool: kdenetwork/kget
From:       Enrico Ros <rosenric () dei ! unipd ! it>
Date:       2005-01-22 23:24:27
Message-ID: 20050122232427.AC8551C44E () office ! kde ! org
[Download RAW message or body]

CVS commit by eros: 

Base framework for plugins. No changes in KGet! Only added some files
containing comments and few lines of code. On the /plugin subdirectory
we'll place plugin type definitions (there is an empty TransferFactory
by now).

Tested TransferKIO compilation as a module. Works good and the plugin
is found by KTrader.

Next steps are:
1) Minimal definition of TransferFactory (as KGetPlugin)
2) Convert TransferKIO to a full TransferFactory + Transfer paradigm
3) Implement TransferLoader that queries for plugins and loads factories
   on startup.
4) Connect TransferLoader to the scheduler and GUI to TransferLoader
5) Congratulations, now you can write your favourite Transfer plugin!

Note: KGet plugin framework is not only tied to Transfers. New types
of plugins can be defined and implemented, such as:
- URL Preprocessors (manglers, etc..)
- GUI components (plugins like: Preview Window, Fancy Windows to show
 common Transfers properties, Transparent Dockers on screen, etc..)
- Controllers (plugins that have access to the Scheduler and can
 start transfers at a certain time, or shut them down, etc..)
- PostProcessors (a plugin can do something to a certain type of
 downloaded file, like Installing a Theme, checking MD5 or something
 like that)
Well, some of the stuff will be hardcoded and the rest is silly but it
can eventually lead to new ideas ^_^.


  A            core/plugin/.cvsignore   1.1.2.1
  A            core/plugin/Makefile.am   1.1.2.1
  A            core/plugin/kget_plugin.desktop   1.1.2.1
  A            core/plugin/plugin.cpp   1.1.2.1 [GPL (v2+)]
  A            core/plugin/plugin.h   1.1.2.1 [GPL (v2+)]
  A            core/plugin/transferfactory.h   1.1.2.1 [GPL (v2+)]
  A            transfers/kio/kget_kiotransfer.desktop   1.1.2.1
  M +3 -0      core/Makefile.am   1.1.2.2
  M +10 -0     transfers/kio/Makefile.am   1.1.2.2


--- kdenetwork/kget/core/Makefile.am  #1.1.2.1:1.1.2.2
@@ -1,6 +1,9 @@
+SUBDIRS = plugin .
+
 noinst_LTLIBRARIES = libcore.la 
 
 libcore_la_SOURCES = connection.cpp group.cpp safedelete.cpp scheduler.cpp \
                      transfer.cpp transferlist.cpp viewinterface.cpp
+libcore_la_LIBADD = plugin/libplugin.la
 
 INCLUDES = $(all_includes) -I$(srcdir)/..

--- kdenetwork/kget/transfers/kio/Makefile.am  #1.1.2.1:1.1.2.2
@@ -1,2 +1,12 @@
+## Create plugin library
+#kde_module_LTLIBRARIES = libkget_kiotransfer.la
+#
+#libkget_kiotransfer_la_SOURCES = transferKio.cpp
+#libkget_kiotransfer_la_LIBADD = $(top_builddir)/kget/core/libcore.la \
$(top_builddir)/kget/conf/libconf.la -lkdeui -lkdecore -lkio \
+#libkget_kiotransfer_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +#
+## Install plugin definition
+#kde_services_DATA = kget_kiotransfer.desktop
+
 noinst_LTLIBRARIES = libtkio.la
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic