• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

  • tdeabc
  • plugins
  • net
resourcenet.h
1 /*
2  This file is part of libtdeabc.
3  Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KABC_RESOURCENET_H
22 #define KABC_RESOURCENET_H
23 
24 #include <tdeconfig.h>
25 
26 #include <sys/types.h>
27 
28 #include <tdeabc/resource.h>
29 
30 class TQFile;
31 class TQTimer;
32 class KTempFile;
33 
34 namespace TDEIO {
35 class Job;
36 }
37 
38 namespace TDEABC {
39 
40 class FormatPlugin;
41 
45 class KABC_EXPORT ResourceNet : public Resource
46 {
47  TQ_OBJECT
48 
49  public:
50  ResourceNet( const TDEConfig* );
51  ResourceNet( const KURL &url, const TQString &format );
52  ~ResourceNet();
53 
54  virtual void writeConfig( TDEConfig* );
55 
56  virtual bool doOpen();
57  virtual void doClose();
58 
59  virtual Ticket *requestSaveTicket();
60  virtual void releaseSaveTicket( Ticket* );
61 
62  virtual bool load();
63  virtual bool asyncLoad();
64  virtual bool save( Ticket* ticket );
65  virtual bool asyncSave( Ticket* ticket );
66 
70  void setUrl( const KURL & );
71 
75  KURL url() const;
76 
80  void setFormat( const TQString &name );
81 
85  TQString format() const;
86 
87  protected:
88  void init( const KURL &url, const TQString &format );
89 
90  private slots:
91  void downloadFinished( TDEIO::Job* );
92  void uploadFinished( TDEIO::Job* );
93  void signalError();
94 
95  private:
96  bool clearAndLoad( TQFile *file );
97  void saveToFile( TQFile *file );
98  bool hasTempFile() const { return mTempFile != 0; }
99  void abortAsyncLoading();
100  void abortAsyncSaving();
101  bool createLocalTempFile();
102  void deleteLocalTempFile();
103  void deleteStaleTempFile();
104 
105  FormatPlugin *mFormat;
106  TQString mFormatName;
107 
108  KURL mUrl;
109  KTempFile *mTempFile;
110 
111  class ResourceNetPrivate;
112  ResourceNetPrivate *d;
113 };
114 
115 }
116 
117 #endif
KTempFile
KURL
TDEConfig
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
TDEStdAccel::save
const TDEShortcut & save()

tdeabc

Skip menu "tdeabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.9.1
This website is maintained by Timothy Pearson.