~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/univint/src/CFUUID.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{       CFUUID.h
 
2
        Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
 
3
}
 
4
{         Pascal Translation Updated:  Peter N Lewis, <peter@stairways.com.au>, November 2005 }
 
5
{
 
6
    Modified for use with Free Pascal
 
7
    Version 210
 
8
    Please report any bugs to <gpc@microbizz.nl>
 
9
}
 
10
 
 
11
{$mode macpas}
 
12
{$packenum 1}
 
13
{$macro on}
 
14
{$inline on}
 
15
{$calling mwpascal}
 
16
 
 
17
unit CFUUID;
 
18
interface
 
19
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
20
{$setc GAP_INTERFACES_VERSION := $0210}
 
21
 
 
22
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
23
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
24
{$endc}
 
25
 
 
26
{$ifc defined CPUPOWERPC and defined CPUI386}
 
27
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
28
{$endc}
 
29
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
30
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
31
{$endc}
 
32
 
 
33
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
34
        {$setc __ppc__ := 1}
 
35
{$elsec}
 
36
        {$setc __ppc__ := 0}
 
37
{$endc}
 
38
{$ifc not defined __i386__ and defined CPUI386}
 
39
        {$setc __i386__ := 1}
 
40
{$elsec}
 
41
        {$setc __i386__ := 0}
 
42
{$endc}
 
43
 
 
44
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
45
        {$error Conflicting definitions for __ppc__ and __i386__}
 
46
{$endc}
 
47
 
 
48
{$ifc defined __ppc__ and __ppc__}
 
49
        {$setc TARGET_CPU_PPC := TRUE}
 
50
        {$setc TARGET_CPU_X86 := FALSE}
 
51
{$elifc defined __i386__ and __i386__}
 
52
        {$setc TARGET_CPU_PPC := FALSE}
 
53
        {$setc TARGET_CPU_X86 := TRUE}
 
54
{$elsec}
 
55
        {$error Neither __ppc__ nor __i386__ is defined.}
 
56
{$endc}
 
57
{$setc TARGET_CPU_PPC_64 := FALSE}
 
58
 
 
59
{$ifc defined FPC_BIG_ENDIAN}
 
60
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
61
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
62
{$elifc defined FPC_LITTLE_ENDIAN}
 
63
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
64
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
65
{$elsec}
 
66
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
67
{$endc}
 
68
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
69
{$setc CALL_NOT_IN_CARBON := FALSE}
 
70
{$setc OLDROUTINENAMES := FALSE}
 
71
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
72
{$setc OPAQUE_UPP_TYPES := TRUE}
 
73
{$setc OTCARBONAPPLICATION := TRUE}
 
74
{$setc OTKERNEL := FALSE}
 
75
{$setc PM_USE_SESSION_APIS := TRUE}
 
76
{$setc TARGET_API_MAC_CARBON := TRUE}
 
77
{$setc TARGET_API_MAC_OS8 := FALSE}
 
78
{$setc TARGET_API_MAC_OSX := TRUE}
 
79
{$setc TARGET_CARBON := TRUE}
 
80
{$setc TARGET_CPU_68K := FALSE}
 
81
{$setc TARGET_CPU_MIPS := FALSE}
 
82
{$setc TARGET_CPU_SPARC := FALSE}
 
83
{$setc TARGET_OS_MAC := TRUE}
 
84
{$setc TARGET_OS_UNIX := FALSE}
 
85
{$setc TARGET_OS_WIN32 := FALSE}
 
86
{$setc TARGET_RT_MAC_68881 := FALSE}
 
87
{$setc TARGET_RT_MAC_CFM := FALSE}
 
88
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
89
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
90
{$setc TYPE_BOOL := FALSE}
 
91
{$setc TYPE_EXTENDED := FALSE}
 
92
{$setc TYPE_LONGLONG := TRUE}
 
93
uses MacTypes,CFBase,CFString;
 
94
{$ALIGN POWER}
 
95
 
 
96
 
 
97
type
 
98
        CFUUIDRef = ^SInt32; { an opaque 32-bit type }
 
99
        CFUUIDRefPtr = ^CFUUIDRef;
 
100
 
 
101
type
 
102
        CFUUIDBytes = record
 
103
                byte0: SInt8;
 
104
                byte1: SInt8;
 
105
                byte2: SInt8;
 
106
                byte3: SInt8;
 
107
                byte4: SInt8;
 
108
                byte5: SInt8;
 
109
                byte6: SInt8;
 
110
                byte7: SInt8;
 
111
                byte8: SInt8;
 
112
                byte9: SInt8;
 
113
                byte10: SInt8;
 
114
                byte11: SInt8;
 
115
                byte12: SInt8;
 
116
                byte13: SInt8;
 
117
                byte14: SInt8;
 
118
                byte15: SInt8;
 
119
        end;
 
120
        CFUUIDBytesPtr = ^CFUUIDBytes;
 
121
{ The CFUUIDBytes struct is a 128-bit struct that contains the
 
122
raw UUID.  A CFUUIDRef can provide such a struct from the
 
123
CFUUIDGetUUIDBytes() function.  This struct is suitable for
 
124
passing to APIs that expect a raw UUID.
 
125
}
 
126
        
 
127
function CFUUIDGetTypeID: CFTypeID; external name '_CFUUIDGetTypeID';
 
128
 
 
129
function CFUUIDCreate( alloc: CFAllocatorRef ): CFUUIDRef; external name '_CFUUIDCreate';
 
130
    { Create and return a brand new unique identifier }
 
131
 
 
132
function CFUUIDCreateWithBytes( alloc: CFAllocatorRef; byte0: ByteParameter; byte1: ByteParameter; byte2: ByteParameter; byte3: ByteParameter; byte4: ByteParameter; byte5: ByteParameter; byte6: ByteParameter; byte7: ByteParameter; byte8: ByteParameter; byte9: ByteParameter; byte10: ByteParameter; byte11: ByteParameter; byte12: ByteParameter; byte13: ByteParameter; byte14: ByteParameter; byte15: ByteParameter ): CFUUIDRef; external name '_CFUUIDCreateWithBytes';
 
133
    { Create and return an identifier with the given contents.  This may return an existing instance with its ref count bumped because of uniquing. }
 
134
 
 
135
function CFUUIDCreateFromString( alloc: CFAllocatorRef; uuidStr: CFStringRef ): CFUUIDRef; external name '_CFUUIDCreateFromString';
 
136
    { Converts from a string representation to the UUID.  This may return an existing instance with its ref count bumped because of uniquing. }
 
137
 
 
138
function CFUUIDCreateString( alloc: CFAllocatorRef; uuid: CFUUIDRef ): CFStringRef; external name '_CFUUIDCreateString';
 
139
    { Converts from a UUID to its string representation. }
 
140
 
 
141
function CFUUIDGetConstantUUIDWithBytes( alloc: CFAllocatorRef; byte0: ByteParameter; byte1: ByteParameter; byte2: ByteParameter; byte3: ByteParameter; byte4: ByteParameter; byte5: ByteParameter; byte6: ByteParameter; byte7: ByteParameter; byte8: ByteParameter; byte9: ByteParameter; byte10: ByteParameter; byte11: ByteParameter; byte12: ByteParameter; byte13: ByteParameter; byte14: ByteParameter; byte15: ByteParameter ): CFUUIDRef; external name '_CFUUIDGetConstantUUIDWithBytes';
 
142
    { This returns an immortal CFUUIDRef that should not be released.  It can be used in headers to declare UUID constants with #define. }
 
143
 
 
144
function CFUUIDGetUUIDBytes( uuid: CFUUIDRef ): CFUUIDBytes; external name '_CFUUIDGetUUIDBytes';
 
145
 
 
146
function CFUUIDCreateFromUUIDBytes( alloc: CFAllocatorRef; bytes: CFUUIDBytes ): CFUUIDRef; external name '_CFUUIDCreateFromUUIDBytes';
 
147
 
 
148
 
 
149
end.