libkdepim Library API Documentation

resource.cpp

00001 /*
00002     This file is part of libkdepim.
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 KPIM;
00026 
00027 Resource::Resource() 
00028 {
00029   mReadOnly = true;
00030   mFastResource = true;
00031 }
00032 
00033 Resource::~Resource()
00034 {
00035 }
00036 
00037 QString Resource::identifier() const
00038 {
00039   return "NoIdentifier";
00040 }
00041 
00042 void Resource::setReadOnly( bool value )
00043 {
00044   mReadOnly = value;
00045 }
00046 
00047 bool Resource::readOnly() const
00048 {
00049   return mReadOnly;
00050 }
00051 
00052 void Resource::setFastResource( bool value )
00053 {
00054   mFastResource = value;
00055 }
00056 
00057 bool Resource::fastResource() const
00058 {
00059   return mFastResource;
00060 }
00061 
00062 void Resource::setName( const QString &name )
00063 {
00064   mName = name;
00065 }
00066 
00067 QString Resource::name() const
00068 {
00069   return mName;
00070 }
00071 
00072 QString Resource::encryptStr( const QString &str )
00073 {
00074   QString result;
00075   for ( uint i = 0; i < str.length(); ++i )
00076     result += ( str[ i ].unicode() < 0x20 ) ? str[ i ] :
00077         QChar( 0x1001F - str[ i ].unicode() );
00078                 
00079   return result;
00080 }
00081 
00082 QString Resource::decryptStr( const QString &str )
00083 {
00084   // This encryption is symmetric
00085   return encryptStr( str );
00086 }
00087 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:22 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001