| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# resource.cpp

    00001 /*
    00002     This file is part of libkabc.
    00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public License
    00016     along with this library; see the file COPYING.LIB.  If not, write to
    00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018     Boston, MA 02111-1307, USA.
    00019 */
    00020
    00021 #include <kdebug.h>
    00022
    00023 #include "resource.h"
    00024
    00025 using namespace KABC;
    00026
    00027 Resource::Resource( AddressBook *ab )
    00028     : mAddressBook( ab )
    00029 {
    00030   mReadOnly = false;
    00031   mFastResource = true;
    00032 }
    00033
    00034 Resource::~Resource()
    00035 {
    00036 }
    00037
    00038 bool Resource::open()
    00039 {
    00040   return true;
    00041 }
    00042
    00043 void Resource::close()
    00044 {
    00045 }
    00046
    00047 Ticket *Resource::requestSaveTicket()
    00048 {
    00049   return 0;
    00050 }
    00051
    00052 bool Resource::load()
    00053 {
    00054   return true;
    00055 }
    00056
    00057 bool Resource::save( Ticket * )
    00058 {
    00059   return false;
    00060 }
    00061
    00062 Ticket *Resource::createTicket( Resource *resource )
    00063 {
    00064   return new Ticket( resource );
    00065 }
    00066
    00067 QString Resource::identifier() const
    00068 {
    00069   return "NoIdentifier";
    00070 }
    00071
    00072 void Resource::removeAddressee( const Addressee& )
    00073 {
    00074   // do nothing
    00075 }
    00076
    00077 void Resource::cleanUp()
    00078 {
    00079   // do nothing
    00080 }
    00081
    00082 void Resource::setReadOnly( bool value )
    00083 {
    00084   mReadOnly = value;
    00085 }
    00086
    00087 bool Resource::readOnly() const
    00088 {
    00089   return mReadOnly;
    00090 }
    00091
    00092 void Resource::setFastResource( bool value )
    00093 {
    00094   mFastResource = value;
    00095 }
    00096
    00097 bool Resource::fastResource() const
    00098 {
    00099   return mFastResource;
    00100 }
    00101
    00102 void Resource::setName( const QString &name )
    00103 {
    00104   mName = name;
    00105 }
    00106
    00107 QString Resource::name() const
    00108 {
    00109   return mName;
    00110 }
    00111
    00112 QString Resource::cryptStr( const QString &str )
    00113 {
    00114   QString result;
    00115   for ( uint i = 0; i < str.length(); ++i )
    00116     result += ( str[ i ].unicode() < 0x20 ) ? str[ i ] :
    00117         QChar( 0x1001F - str[ i ].unicode() );
    00118
    00119   return result;
    00120 }

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:21 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001