<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> <head> <title>kpilot/lib: kpilotlink.h Source File (kpilot/lib)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> <meta name="trademark" content="KDE e.V." /> <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="robots" content="all" /> <link rel="shortcut icon" href="../../../favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" /> <style type="text/css"> <!-- hr { display: none; } #content h2 { margin-left: 0px; } table.mdTable { background-color: #f8f8f8; border: .2em solid #d7d7d7; } td.mdRow { padding: 8px 20px; } td.md { font-weight: bold; } td.mdname1 { font-weight: bold; color: #602020; } td.mdname { font-weight: bold; color: #602020; } --> </style> </head> <body> <div id="nav_header_top" align="right"> <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a> <a href="../../.."><img id="nav_header_logo" alt="Home" align="left" src="../../../kde_gear_64.png" border="0" /></a> <span class="doNotDisplay">::</span> <img id="nav_header_logo_right" alt="" align="right" src="../../../pimlogo.png" border="0" /> <div id="nav_header_title" align="left">KDE PIM API Reference</div> </div> <div id="nav_header_bottom" align="right"> <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span> <div id="nav_header_bottom_left" style="text-align: left;"> / <a href="../../../">API Reference</a> / <a href="../../html/index.html">kpilot</a> / <a href=".">lib</a> </div> </div> <table id="main" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" class="menuheader" height="0"></td> <td id="contentcolumn" valign="top" rowspan="2" > <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;"> <h2><a name="content"></a>kpilot/lib</h2> <!-- Generated by Doxygen 1.5.5 --> <h1>kpilotlink.h</h1><a href="kpilotlink_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _KPILOT_KPILOTLINK_H</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _KPILOT_KPILOTLINK_H</span> <a name="l00003"></a>00003 <span class="preprocessor"></span><span class="comment">/* KPilot</span> <a name="l00004"></a>00004 <span class="comment">**</span> <a name="l00005"></a>00005 <span class="comment">** Copyright (C) 1998-2001 by Dan Pilone</span> <a name="l00006"></a>00006 <span class="comment">** Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com></span> <a name="l00007"></a>00007 <span class="comment">** Copyright (C) 2006 Adriaan de Groot <groot@kde.org></span> <a name="l00008"></a>00008 <span class="comment">**</span> <a name="l00009"></a>00009 <span class="comment">*/</span> <a name="l00010"></a>00010 <a name="l00011"></a>00011 <span class="comment">/*</span> <a name="l00012"></a>00012 <span class="comment">** This program is free software; you can redistribute it and/or modify</span> <a name="l00013"></a>00013 <span class="comment">** it under the terms of the GNU Lesser General Public License as published by</span> <a name="l00014"></a>00014 <span class="comment">** the Free Software Foundation; either version 2.1 of the License, or</span> <a name="l00015"></a>00015 <span class="comment">** (at your option) any later version.</span> <a name="l00016"></a>00016 <span class="comment">**</span> <a name="l00017"></a>00017 <span class="comment">** This program is distributed in the hope that it will be useful,</span> <a name="l00018"></a>00018 <span class="comment">** but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00019"></a>00019 <span class="comment">** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00020"></a>00020 <span class="comment">** GNU Lesser General Public License for more details.</span> <a name="l00021"></a>00021 <span class="comment">**</span> <a name="l00022"></a>00022 <span class="comment">** You should have received a copy of the GNU Lesser General Public License</span> <a name="l00023"></a>00023 <span class="comment">** along with this program in a file called COPYING; if not, write to</span> <a name="l00024"></a>00024 <span class="comment">** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,</span> <a name="l00025"></a>00025 <span class="comment">** MA 02110-1301, USA.</span> <a name="l00026"></a>00026 <span class="comment">*/</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="comment">/*</span> <a name="l00029"></a>00029 <span class="comment">** Bug reports and questions can be sent to kde-pim@kde.org</span> <a name="l00030"></a>00030 <span class="comment">*/</span> <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="preprocessor">#include <pi-dlp.h></span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="preprocessor">#include <qobject.h></span> <a name="l00035"></a>00035 <span class="preprocessor">#include <qvaluelist.h></span> <a name="l00036"></a>00036 <a name="l00043"></a>00043 <span class="keyword">class </span>QThread; <a name="l00044"></a>00044 <span class="keyword">class </span>KPilotUser; <a name="l00045"></a>00045 <span class="keyword">class </span>KPilotSysInfo; <a name="l00046"></a>00046 <span class="keyword">class </span>KPilotCard; <a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="classPilotDatabase.html" title="Methods to access a database on the pilot.">PilotDatabase</a>; <a name="l00048"></a>00048 <a name="l00049"></a>00049 <a name="l00050"></a>00050 <a name="l00171"></a><a class="code" href="classKPilotLink.html">00171</a> <span class="keyword">class </span>KDE_EXPORT <a class="code" href="classKPilotLink.html" title="KPilotLink handles some aspects of communication with a Handheld.">KPilotLink</a> : <span class="keyword">public</span> QObject <a name="l00172"></a>00172 { <a name="l00173"></a>00173 Q_OBJECT <a name="l00174"></a>00174 <span class="keyword">friend</span> <span class="keyword">class </span>SyncAction; <a name="l00175"></a>00175 <span class="keyword">public</span>: <a name="l00177"></a><a class="code" href="classKPilotLink.html#a36b97890b47c51a47d2dcd60a84c1d3">00177</a> <span class="keyword">typedef</span> QValueList<struct DBInfo> DBInfoList; <a name="l00178"></a>00178 <a name="l00180"></a>00180 <a class="code" href="classKPilotLink.html" title="KPilotLink handles some aspects of communication with a Handheld.">KPilotLink</a>( QObject *parent = 0, <span class="keyword">const</span> <span class="keywordtype">char</span> *name = 0 ); <a name="l00181"></a>00181 <a name="l00186"></a>00186 <span class="keyword">virtual</span> ~<a class="code" href="classKPilotLink.html" title="KPilotLink handles some aspects of communication with a Handheld.">KPilotLink</a>(); <a name="l00187"></a>00187 <a name="l00188"></a>00188 <a name="l00190"></a>00190 <span class="keyword">virtual</span> QString statusString() <span class="keyword">const</span> = 0; <a name="l00191"></a>00191 <a name="l00196"></a>00196 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isConnected() <span class="keyword">const</span> = 0; <a name="l00197"></a>00197 <a name="l00198"></a>00198 <a name="l00207"></a><a class="code" href="classKPilotLink.html#17da9e490e5929d6b5ada57b9488b85b">00207</a> QString pilotPath()<span class="keyword"> const</span> <a name="l00208"></a>00208 <span class="keyword"> </span>{ <a name="l00209"></a>00209 <span class="keywordflow">return</span> fPilotPath; <a name="l00210"></a>00210 } <a name="l00211"></a>00211 <a name="l00220"></a>00220 <span class="keyword">virtual</span> <span class="keywordtype">void</span> reset(<span class="keyword">const</span> QString &pilotPath) = 0; <a name="l00221"></a>00221 <a name="l00226"></a>00226 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> event(QEvent *e); <a name="l00227"></a>00227 <a name="l00235"></a>00235 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> installFiles(<span class="keyword">const</span> QStringList &l, <span class="keyword">const</span> <span class="keywordtype">bool</span> deleteFiles); <a name="l00236"></a>00236 <a name="l00244"></a>00244 <span class="keywordtype">void</span> addSyncLogEntry(<span class="keyword">const</span> QString &entry,<span class="keywordtype">bool</span> log=<span class="keyword">true</span>); <a name="l00245"></a>00245 <a name="l00256"></a>00256 <span class="keyword">virtual</span> <span class="keywordtype">int</span> findDatabase(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a name="l00257"></a>00257 <span class="keyword">struct</span> DBInfo *info, <a name="l00258"></a>00258 <span class="keywordtype">int</span> index=0, <a name="l00259"></a>00259 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> type=0, <a name="l00260"></a>00260 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> creator=0) = 0; <a name="l00261"></a>00261 <a name="l00269"></a>00269 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> retrieveDatabase(<span class="keyword">const</span> QString &path, <span class="keyword">struct</span> DBInfo *db) = 0; <a name="l00270"></a>00270 <a name="l00278"></a>00278 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getNextDatabase(<span class="keywordtype">int</span> index,<span class="keyword">struct</span> DBInfo *db) = 0; <a name="l00279"></a>00279 <a name="l00292"></a>00292 <span class="keyword">virtual</span> DBInfoList getDBList(<span class="keywordtype">int</span> cardno=0, <span class="keywordtype">int</span> flags=dlpDBListRAM) = 0; <a name="l00293"></a>00293 <a name="l00303"></a>00303 <span class="keyword">virtual</span> <a class="code" href="classPilotDatabase.html" title="Methods to access a database on the pilot.">PilotDatabase</a> *database( <span class="keyword">const</span> QString &name ) = 0; <a name="l00304"></a>00304 <a name="l00313"></a>00313 <span class="keyword">virtual</span> <a class="code" href="classPilotDatabase.html" title="Methods to access a database on the pilot.">PilotDatabase</a> *database( <span class="keyword">const</span> DBInfo *info ); <a name="l00314"></a>00314 <a name="l00323"></a><a class="code" href="classKPilotLink.html#5aa7b902245c4533efa16eebb6454eaf">00323</a> KPilotUser &getPilotUser() <a name="l00324"></a>00324 { <a name="l00325"></a>00325 <span class="keywordflow">return</span> *fPilotUser; <a name="l00326"></a>00326 } <a name="l00327"></a>00327 <a name="l00335"></a><a class="code" href="classKPilotLink.html#db6b9c0b9c02333dd9e5bc65e44ed84e">00335</a> <span class="keyword">const</span> KPilotSysInfo &getSysInfo() <a name="l00336"></a>00336 { <a name="l00337"></a>00337 <span class="keywordflow">return</span> *fPilotSysInfo; <a name="l00338"></a>00338 } <a name="l00339"></a>00339 <a name="l00351"></a>00351 <span class="keyword">virtual</span> <span class="keyword">const</span> KPilotCard *getCardInfo(<span class="keywordtype">int</span> card=0) = 0; <a name="l00352"></a>00352 <a name="l00359"></a><a class="code" href="classKPilotLink.html#61758d52e6a0684866d82f5ba224f8c9">00359</a> <span class="keyword">enum</span> <a class="code" href="classKPilotLink.html#61758d52e6a0684866d82f5ba224f8c9" title="When ending the sync, you can do so gracefully, updating the last-sync time to indicate...">EndOfSyncFlags</a> { <a name="l00360"></a><a class="code" href="classKPilotLink.html#61758d52e6a0684866d82f5ba224f8c97ef56e417eaed4d3a65ee66b27caaa8b">00360</a> NoUpdate, <a name="l00361"></a><a class="code" href="classKPilotLink.html#61758d52e6a0684866d82f5ba224f8c985394b99f137dd96d2410e4a03729454">00361</a> UpdateUserInfo <a name="l00362"></a>00362 } ; <a name="l00363"></a>00363 <a name="l00367"></a><a class="code" href="classKPilotLink.html#0ebed48f990103c6ee407a658f973324">00367</a> <span class="keyword">enum</span> <a class="code" href="classKPilotLink.html#0ebed48f990103c6ee407a658f973324" title="Custom events we can be handling.">CustomEvents</a> { <a name="l00368"></a>00368 EventTickleTimeout = 1066 <a name="l00369"></a>00369 }; <a name="l00370"></a>00370 <a name="l00376"></a>00376 <span class="keyword">virtual</span> <span class="keywordtype">void</span> endSync( EndOfSyncFlags f ) = 0; <a name="l00377"></a>00377 <a name="l00378"></a>00378 signals: <a name="l00387"></a>00387 <span class="keywordtype">void</span> timeout(); <a name="l00388"></a>00388 <a name="l00390"></a>00390 <span class="keywordtype">void</span> logMessage(<span class="keyword">const</span> QString &); <a name="l00391"></a>00391 <a name="l00393"></a>00393 <span class="keywordtype">void</span> logError(<span class="keyword">const</span> QString &); <a name="l00394"></a>00394 <a name="l00400"></a>00400 <span class="keywordtype">void</span> logProgress(<span class="keyword">const</span> QString &s, <span class="keywordtype">int</span> p); <a name="l00401"></a>00401 <a name="l00406"></a>00406 <span class="keywordtype">void</span> deviceReady( <a class="code" href="classKPilotLink.html" title="KPilotLink handles some aspects of communication with a Handheld.">KPilotLink</a> * ); <a name="l00407"></a>00407 <a name="l00408"></a>00408 <a name="l00409"></a>00409 <span class="keyword">public</span> slots: <a name="l00414"></a>00414 <span class="keyword">virtual</span> <span class="keywordtype">void</span> close() = 0; <a name="l00415"></a>00415 <a name="l00421"></a>00421 <span class="keyword">virtual</span> <span class="keywordtype">void</span> reset() = 0; <a name="l00422"></a>00422 <a name="l00424"></a>00424 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> tickle() = 0; <a name="l00425"></a>00425 <a name="l00426"></a>00426 <span class="keyword">protected</span>: <a name="l00432"></a><a class="code" href="classKPilotLink.html#49e621f9a9aaea2e96bae802fa3b9cea">00432</a> QString fPilotPath; <a name="l00433"></a>00433 <a name="l00442"></a>00442 <span class="keywordtype">void</span> startTickle(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> timeout=0); <a name="l00443"></a>00443 <a name="l00449"></a>00449 <span class="keywordtype">void</span> stopTickle(); <a name="l00450"></a>00450 <a name="l00456"></a>00456 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> installFile( <span class="keyword">const</span> QString &f, <span class="keyword">const</span> <span class="keywordtype">bool</span> deleteFile ) = 0; <a name="l00457"></a>00457 <a name="l00466"></a>00466 <span class="keyword">virtual</span> <span class="keywordtype">int</span> openConduit(); <a name="l00467"></a>00467 <a name="l00474"></a>00474 <span class="keyword">virtual</span> <span class="keywordtype">int</span> pilotSocket() <span class="keyword">const</span>; <a name="l00475"></a>00475 <a name="l00480"></a>00480 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addSyncLogEntryImpl( <span class="keyword">const</span> QString &s ) = 0; <a name="l00481"></a>00481 <a name="l00486"></a><a class="code" href="classKPilotLink.html#1e899f38254dd6afc3067726d1a08aa9">00486</a> KPilotUser *fPilotUser; <a name="l00487"></a>00487 <a name="l00492"></a><a class="code" href="classKPilotLink.html#6cc39da0ab26bde7a7c88193028bb500">00492</a> KPilotSysInfo *fPilotSysInfo; <a name="l00493"></a>00493 <a name="l00494"></a>00494 <a name="l00495"></a>00495 <span class="keyword">private</span>: <a name="l00496"></a>00496 <span class="keywordtype">bool</span> fTickleDone; <a name="l00497"></a>00497 QThread *fTickleThread; <a name="l00498"></a>00498 <a name="l00499"></a>00499 } ; <a name="l00500"></a>00500 <a name="l00501"></a>00501 <span class="preprocessor">#endif</span> </pre></div></div> </div></div> </td> </tr> <tr> <td valign="top" id="leftmenu" width="25%"> <a name="navigation"></a> <div class="menu_box"><h2>kpilot/lib</h2> <div class="nav_list"> <ul><li><a href="index.html">Main Page</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="functions.html">Class Members</a></li></ul> <!-- <h2>Class Picker</h2> <div style="text-align: center;"> <form name="guideform"> <select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> <option value="annotated.html">-- Choose --</option> <option value="classActionQueue.html">actionqueue</option>, <option value="classCleanupAction.html">cleanupaction</option>, <option value="classConduitAction.html">conduitaction</option>, <option value="classConduitConfigBase.html">conduitconfigbase</option>, <option value="classConduitFactory.html">conduitfactory</option>, <option value="classConduitProxy.html">conduitproxy</option>, <option value="classCUDCounter.html">cudcounter</option>, <option value="classDatabaseInterpreter.html">databaseinterpreter</option>, <option value="classDeviceCommThread.html">devicecommthread</option>, <option value="classIDMapper.html">idmapper</option>, <option value="classKPilotDeviceLink.html">kpilotdevicelink</option>, <option value="classKPilotLink.html">kpilotlink</option>, <option value="classKPilotLocalLink.html">kpilotlocallink</option>, <option value="classNullMapper.html">nullmapper</option>, <option value="classPhoneSlot.html">phoneslot</option>, <option value="classPilotAddress.html">pilotaddress</option>, <option value="classPilotAppInfo.html">pilotappinfo</option>, <option value="classPilotAppInfoBase.html">pilotappinfobase</option>, <option value="classPilotDatabase.html">pilotdatabase</option>, <option value="classPilotDateEntry.html">pilotdateentry</option>, <option value="classPilotLocalDatabase.html">pilotlocaldatabase</option>, <option value="classPilotRecord.html">pilotrecord</option>, <option value="classPilotRecordBase.html">pilotrecordbase</option>, <option value="classPilotSerialDatabase.html">pilotserialdatabase</option>, <option value="classPilotTodoEntry.html">pilottodoentry</option>, <option value="classRecordConduitBase.html">recordconduitbase</option>, <option value="classSorryAction.html">sorryaction</option>, <option value="classSyncAction_1_1SyncMode.html">syncaction::syncmode</option>, <option value="classTestLink.html">testlink</option>, <option value="classWelcomeAction.html">welcomeaction</option>, </select> </form> </div> --> </div></div> <div class="menu_box"><h2>API Dox</h2> <div class="nav_list"> <ul> <li><a href="../../../akregator/html/index.html">akregator</a></li><li> <a href="../../../akregator/src/html/index.html">src</a></li><li> <a href="../../../akregator/src/librss/html/index.html">librss</a></li><li><a href="../../../certmanager/html/index.html">certmanager</a></li><li> <a href="../../../certmanager/lib/html/index.html">lib</a></li><li><a href="../../../kaddressbook/html/index.html">kaddressbook</a></li><li><a href="../../../kalarm/html/index.html">kalarm</a></li><li> <a href="../../../kalarm/lib/html/index.html">lib</a></li><li><a href="../../../kandy/html/index.html">kandy</a></li><li><a href="../../../karm/html/index.html">karm</a></li><li><a href="../../../kdgantt/html/index.html">kdgantt</a></li><li><a href="../../../kgantt/html/index.html">kgantt</a></li><li><a href="../../../kioslaves/html/index.html">kioslaves</a></li><li> <a href="../../../kioslaves/imap4/html/index.html">imap4</a></li><li> <a href="../../../kioslaves/mbox/html/index.html">mbox</a></li><li><a href="../../../kitchensync/html/index.html">kitchensync</a></li><li><a href="../../../kmail/html/index.html">kmail</a></li><li><a href="../../../knotes/html/index.html">knotes</a></li><li><a href="../../../konsolekalendar/html/index.html">konsolekalendar</a></li><li><a href="../../../kontact/html/index.html">kontact</a></li><li><a href="../../../korganizer/html/index.html">korganizer</a></li><li><a href="../../../kpilot/html/index.html">kpilot</a></li><li> <a href="../../../kpilot/kpilot/html/index.html">kpilot</a></li><li> <a href="../../../kpilot/lib/html/index.html">lib</a></li><li><a href="../../../libemailfunctions/html/index.html">libemailfunctions</a></li><li><a href="../../../libkcal/html/index.html">libkcal</a></li><li><a href="../../../libkdepim/html/index.html">libkdepim</a></li><li><a href="../../../libkholidays/html/index.html">libkholidays</a></li><li><a href="../../../libkmime/html/index.html">libkmime</a></li><li><a href="../../../libkpgp/html/index.html">libkpgp</a></li><li><a href="../../../libkpimidentities/html/index.html">libkpimidentities</a></li> </ul></div></div> </td> </tr> </table> <span class="doNotDisplay"> <a href="http://www.kde.org/" accesskey="8">KDE Home</a> | <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> | <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a> </span> <div style="height: 8px"></div> <div id="footer"> <div id="footer_left"> Maintained by <a href="mailto:groot@kde.org">Adriaan de Groot</a> and <a href="mailto:winter@kde.org">Allen Winter</a>. <br/> KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div> <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div> </div> <!-- WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL BE BLOCKED INSTANTLY AND PERMANENTLY! <a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a> WARNING END --> </body> </html>