~ubuntu-branches/ubuntu/oneiric/pykde4/oneiric-proposed

« back to all changes in this revision

Viewing changes to sip/kdecore/klockfile.sip

  • Committer: Bazaar Package Importer
  • Author(s): Romain Perier
  • Date: 2011-07-11 12:42:17 UTC
  • Revision ID: james.westby@ubuntu.com-20110711124217-stfa5thgiyis668w
Tags: upstream-4.6.90
ImportĀ upstreamĀ versionĀ 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
 
3
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply
 
4
 
 
5
//                 Generated by twine
 
6
 
 
7
// This file is part of PyKDE4.
 
8
 
 
9
// PyKDE4 is free software; you can redistribute it and/or modify
 
10
// it under the terms of the GNU Lesser General Public License as
 
11
// published by the Free Software Foundation; either version 2.1 of
 
12
// the License, or (at your option) any later version.
 
13
 
 
14
// PyKDE4 is distributed in the hope that it will be useful,
 
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
// GNU General Public License for more details.
 
18
 
 
19
// You should have received a copy of the GNU General Public License
 
20
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
 
 
22
 
 
23
class KLockFile
 
24
{
 
25
%TypeHeaderCode
 
26
#include <klockfile.h>
 
27
%End
 
28
 
 
29
 
 
30
public:
 
31
    typedef KSharedPtr<KLockFile> Ptr;
 
32
 
 
33
    explicit                KLockFile (const QString& file, const KComponentData& componentName = KGlobal::mainComponent());
 
34
 
 
35
    enum LockResult
 
36
    {
 
37
        LockOK,
 
38
        LockFail,
 
39
        LockError,
 
40
        LockStale
 
41
    };
 
42
 
 
43
 
 
44
    enum LockFlag
 
45
    {
 
46
        NoBlockFlag,
 
47
        ForceFlag
 
48
    };
 
49
 
 
50
    typedef QFlags<KLockFile::LockFlag> LockFlags;
 
51
 
 
52
    KLockFile::LockResult   lock (KLockFile::LockFlags flags = KLockFile::LockFlags());
 
53
    bool                    isLocked () const;
 
54
    void                    unlock ();
 
55
    int                     staleTime () const;
 
56
    void                    setStaleTime (int _staleTime);
 
57
    bool                    getLockInfo (int& pid /Out/, QString& hostname /Out/, QString& appname /Out/);
 
58
 
 
59
private:
 
60
//force
 
61
                            KLockFile (const KLockFile& other);
 
62
//end
 
63
public:
 
64
    ~KLockFile ();
 
65
};
 
66
// KLockFile
 
67
 
 
68