00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
#include "options.h"
00034
00035
#if QT_VERSION < 300
00036
#include <qmsgbox.h>
00037
#else
00038
#include <qmessagebox.h>
00039
#endif
00040
00041
#include <kconfig.h>
00042
00043
#include "pilotRecord.h"
00044
#include "pilotSerialDatabase.h"
00045
#include "JPilotProxy-conduit.h"
00046
#include "JPilotProxy-factory.h"
00047
#include "jplugin.h"
00048
00049
00050
static const char *JPilotProxy_conduit_id =
"$Id: JPilotProxy-conduit.cc,v 1.6 2003/03/08 01:43:04 waba Exp $";
00051
00052
00053
00054 JPilotProxyConduit::JPilotProxyConduit(KPilotDeviceLink *d,
const char *n,
const QStringList &l) :
ConduitAction(d,n,l) {
00055 FUNCTIONSETUP;
00056
#ifdef DEBUG
00057
DEBUGCONDUIT<<JPilotProxy_conduit_id<<endl;
00058
#endif
00059
}
00060
00061
00062
00063
00064
bool JPilotProxyConduit::exec() {
00065 FUNCTIONSETUP;
00066 DEBUGCONDUIT<<JPilotProxy_conduit_id<<endl;
00067
00068
if (!fConfig)
return false;
00069
00070 KConfigGroupSaver cfgs(fConfig, conduitSettingsGroup());
00071
00072
if (!JPilotProxyConduitFactory::pluginsloaded)
00073 JPilotProxyConduitFactory::loadPlugins(fConfig);
00074
00075
if (JPilotProxyConduitFactory::pluginsloaded) {
00076 PluginIterator_t it(*JPilotProxyConduitFactory::plugins);
00077
for ( ; it.current(); ++it ) {
00078 JPlugin*plug=it.current();
00079
if (plug->info.sync_on) {
00080
#ifdef DEBUG
00081
DEBUGCONDUIT<<
"syncing "<<plug->info.name<<endl;
00082
#endif
00083
plug->pre_sync();
00084
00085
00086
00087 plug->sync(pilotSocket());
00088 plug->post_sync();
00089 }
00090 }
00091 }
00092
00093
00094
00095
return;
00096 }
00097