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

tdeabc

  • tdeabc
locknull.cpp
1/*
2 This file is part of libtdeabc.
3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#include "locknull.h"
23
24#include <tdelocale.h>
25#include <kdebug.h>
26
27using namespace TDEABC;
28
29LockNull::LockNull( bool allowAccess )
30 : Lock( TQString::null ), mAllowAccess( allowAccess )
31{
32}
33
34LockNull::~LockNull()
35{
36 unlock();
37}
38
39bool LockNull::lock()
40{
41 if ( !mAllowAccess ) return false;
42
43 kdWarning() << "LockNull::lock() force success. Doesn't actually lock."
44 << endl;
45
46 emit locked();
47
48 return true;
49}
50
51bool LockNull::unlock()
52{
53 emit unlocked();
54 return true;
55}
56
57TQString LockNull::error() const
58{
59 if ( mAllowAccess )
60 return i18n("LockNull: All locks succeed but no actual locking is done.");
61 else
62 return i18n("LockNull: All locks fail.");
63}
TDEABC::LockNull::unlock
bool unlock()
Unlock resource.
Definition: locknull.cpp:51
TDEABC::LockNull::lock
bool lock()
Lock resource.
Definition: locknull.cpp:39
TDEABC::Lock
This class provides locking functionality for a file, directory or an arbitrary string-represented re...
Definition: lock.h:36
kdWarning
kdbgstream kdWarning(int area=0)
endl
kndbgstream & endl(kndbgstream &s)
TDEABC
static data, shared by ALL addressee objects
Definition: address.h:48
tdelocale.h

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.4
This website is maintained by Timothy Pearson.