summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/cloudkit/CKContainer.inc
blob: e643925e91d53c3a44b3890010d68a831f129229 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{ Parsed from CloudKit.framework CKContainer.h }


{$ifdef TYPES}
type
  CKContainerPtr = ^CKContainer;
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
var
  CKOwnerDefaultName: NSString { available in 10_10, 8_0 }; cvar; external;
{$endif}

{$ifdef CLASSES}

type
  CKContainer = objcclass external (NSObject)
  public
    function init: instancetype; message 'init';
    class function defaultContainer: CKContainer; message 'defaultContainer';
    class function containerWithIdentifier (containerIdentifier: NSString): CKContainer; message 'containerWithIdentifier:';
    function containerIdentifier: NSString; message 'containerIdentifier';
    procedure addOperation (operation: CKOperation); message 'addOperation:';
  end;


type
  Database = objccategory external (CKContainer)
    function privateCloudDatabase: CKDatabase; message 'privateCloudDatabase';
    function publicCloudDatabase: CKDatabase; message 'publicCloudDatabase';
  end;
{$endif}

{$ifdef TYPES}
type
  CKAccountStatus = NSInteger;
  CKAccountStatusPtr = ^CKAccountStatus;

const
  CKAccountStatusCouldNotDetermine = 0;
  CKAccountStatusAvailable = 1;
  CKAccountStatusRestricted = 2;
  CKAccountStatusNoAccount = 3;
{$endif}

{$ifdef CLASSES}

type
  AccountStatus = objccategory external (CKContainer)
    procedure accountStatusWithCompletionHandler (completionHandler: OpaqueCBlock); message 'accountStatusWithCompletionHandler:';
  end;
{$endif}

{$ifdef TYPES}
type
  CKApplicationPermissions = NSUInteger;
  CKApplicationPermissionsPtr = ^CKApplicationPermissions;

const
  CKApplicationPermissionUserDiscoverability = 1 shl 0;

type
  CKApplicationPermissionStatus = NSInteger;
  CKApplicationPermissionStatusPtr = ^CKApplicationPermissionStatus;

const
  CKApplicationPermissionStatusInitialState = 0;
  CKApplicationPermissionStatusCouldNotComplete = 1;
  CKApplicationPermissionStatusDenied = 2;
  CKApplicationPermissionStatusGranted = 3;

type
  CKApplicationPermissionBlock = OpaqueCBlock;
{$endif}

{$ifdef CLASSES}

type
  ApplicationPermission = objccategory external (CKContainer)
    procedure statusForApplicationPermission_completionHandler (applicationPermission: CKApplicationPermissions; completionHandler: CKApplicationPermissionBlock); message 'statusForApplicationPermission:completionHandler:';
    procedure requestApplicationPermission_completionHandler (applicationPermission: CKApplicationPermissions; completionHandler: CKApplicationPermissionBlock); message 'requestApplicationPermission:completionHandler:';
  end;

type
  UserRecords = objccategory external (CKContainer)
    procedure fetchUserRecordIDWithCompletionHandler (completionHandler: OpaqueCBlock); message 'fetchUserRecordIDWithCompletionHandler:';
    procedure discoverAllContactUserInfosWithCompletionHandler (completionHandler: OpaqueCBlock); message 'discoverAllContactUserInfosWithCompletionHandler:';
    procedure discoverUserInfoWithEmailAddress_completionHandler (email: NSString; completionHandler: OpaqueCBlock); message 'discoverUserInfoWithEmailAddress:completionHandler:';
    procedure discoverUserInfoWithUserRecordID_completionHandler (userRecordID: CKRecordID; completionHandler: OpaqueCBlock); message 'discoverUserInfoWithUserRecordID:completionHandler:';
  end;
{$endif}