summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/foundation/NSDistributedLock.inc
blob: 1b7cd64d45275bcef4979a204f8b5d6e00c1e74a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ Parsed from Foundation.framework NSDistributedLock.h }

{$ifdef TYPES}
{$ifndef NSDISTRIBUTEDLOCK_PAS_T}
{$define NSDISTRIBUTEDLOCK_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSDISTRIBUTEDLOCK_PAS_R}
{$define NSDISTRIBUTEDLOCK_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSDISTRIBUTEDLOCK_PAS_F}
{$define NSDISTRIBUTEDLOCK_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSDISTRIBUTEDLOCK_PAS_S}
{$define NSDISTRIBUTEDLOCK_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSDistributedLock = objcclass;
  NSDistributedLockPointer = ^NSDistributedLock;
  NSDistributedLockPtr = NSDistributedLockPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSDISTRIBUTEDLOCK_PAS_C}
{$define NSDISTRIBUTEDLOCK_PAS_C}

{ NSDistributedLock }
  NSDistributedLock = objcclass external (NSObject)
  private
    _priv: Pointer;
    
  public
    class function lockWithPath(path: NSString): NSDistributedLock; message 'lockWithPath:';
    function initWithPath(path: NSString): id; message 'initWithPath:';
    function tryLock: Boolean; message 'tryLock';
    procedure unlock; message 'unlock';
    procedure breakLock; message 'breakLock';
    function lockDate: NSDate; message 'lockDate';
  end;

{$endif}
{$endif}