Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: third_party/twisted_8_1/twisted/internet/cfsupport/cfdecl.pxi

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 cdef extern from "pymactoolbox.h":
2 # CFBase
3 ctypedef void *CFTypeRef
4 ctypedef CFTypeRef CFAllocatorRef
5 ctypedef CFTypeRef CFStringRef
6 ctypedef CFStringRef CFMutableStringRef
7 ctypedef CFTypeRef CFDataRef
8 ctypedef CFDataRef CFMutableDataRef
9 ctypedef CFTypeRef CFArrayRef
10 ctypedef CFArrayRef CFMutableArrayRef
11 ctypedef CFTypeRef CFDictionaryRef
12 ctypedef CFDictionaryRef CFMutableDictionaryRef
13 ctypedef CFTypeRef CFURLRef
14
15 ctypedef unsigned short UniChar
16 ctypedef int CFIndex
17 ctypedef int CFOptionFlags
18 ctypedef int Boolean
19
20 ctypedef struct CFRange:
21 CFIndex location
22 CFIndex length
23
24 cdef extern CFAllocatorRef kCFAllocatorDefault
25 cdef extern CFAllocatorRef kCFAllocatorNull
26
27 cdef CFTypeRef CFRetain(CFTypeRef cf)
28 cdef void CFRelease(CFTypeRef cf)
29 cdef CFIndex CFGetRetainCount(CFTypeRef cf)
30 cdef CFStringRef CFCopyDescription(CFTypeRef cf)
31 cdef CFRange CFRangeMake(CFIndex location, CFIndex length)
32
33 # CFData
34 cdef CFDataRef CFDataCreate(CFAllocatorRef allocator, unsigned char *bytes, CFIndex length)
35 cdef CFDataRef CFDataCreateWithBytesNoCopy(CFAllocatorRef, unsigned char *by tes, CFIndexLength, CFAllocatorRef bytesDeallocator)
36 cdef CFMutableDataRef CFDataCreateMutable(CFAllocatorRef allocator, CFIndex capacity)
37 cdef CFMutableDataRef CFDataCreateMutableCopy(CFAllocatorRef allocator, CFIn dex capacity, CFDataRef theData)
38 cdef CFIndex CFDataGetLength(CFDataRef theData)
39 cdef unsigned char *CFDataGetBytePtr(CFDataRef theData)
40 cdef unsigned char *CFDataGetMutableBytePtr(CFMutableDataRef theData)
41 cdef CFDataGetBytes(CFDataRef theData, CFRange range, unsigned char *buffer)
42 cdef CFDataSetLength(CFMutableDataRef theData, CFIndex length)
43 cdef CFDataIncreaseLength(CFMutableDataRef theData, CFIndex extraLength)
44 cdef CFDataAppendBytes(CFMutableDataRef theData, unsigned char *bytes, CFInd ex length)
45 cdef CFDataReplaceBytes(CFMutableDataRef theData, CFRange range, unsigned ch ar *newBytes, CFIndex newLength)
46 cdef CFDataDeleteBytes(CFMutableDataRef theData, CFRange range)
47
48
49 # CFString
50
51 ctypedef enum CFStringBuiltInEncodings:
52 kCFStringEncodingMacRoman = 0
53 kCFStringEncodingWindowsLatin1 = 0x0500
54 kCFStringEncodingISOLatin1 = 0x0201
55 kCFStringEncodingNextStepLatin = 0x0B01
56 kCFStringEncodingASCII = 0x0600
57 kCFStringEncodingUnicode = 0x0100
58 kCFStringEncodingUTF8 = 0x08000100
59 kCFStringEncodingNonLossyASCII = 0x0BFF
60 kCFStringEncodingInvalidId = 0xffffffff
61 ctypedef unsigned int CFStringEncoding
62
63 cdef void CFStringGetCharacters(CFStringRef theString, CFRange range, UniCha r *ubuffer)
64 cdef CFIndex CFStringGetLength(CFStringRef theString)
65 cdef CFStringRef CFStringCreateWithCString(CFAllocatorRef alloc, char *cStr, CFStringEncoding encoding)
66 cdef CFStringRef CFStringCreateWithCharacters(CFAllocatorRef alloc, UniChar *chars, CFIndex numChars)
67
68 # CFArray
69
70 cdef CFIndex CFArrayGetCount(CFArrayRef theArray)
71 cdef void *CFArrayGetValueAtIndex(CFArrayRef theArray, CFIndex idx)
72 cdef void CFArrayGetValues(CFArrayRef theArray, CFRange range, void **values )
73
74 # CFDate
75 ctypedef double CFTimeInterval
76 ctypedef CFTimeInterval CFAbsoluteTime
77
78 cdef CFAbsoluteTime CFAbsoluteTimeGetCurrent()
79
80 # CFRunLoop
81 ctypedef struct CFRunLoopTimerContext:
82 CFIndex version
83 void* info
84 void *(*retain)(void *info)
85 void (*release)(void *info)
86 CFStringRef (*copyDescription)(void *info)
87
88 ctypedef CFTypeRef CFRunLoopRef
89 ctypedef CFTypeRef CFRunLoopTimerRef
90 ctypedef CFTypeRef CFRunLoopSourceRef
91 ctypedef void (*CFRunLoopTimerCallBack)(CFRunLoopTimerRef timer, void *info)
92
93 cdef extern CFStringRef kCFRunLoopCommonModes
94
95 cdef CFRunLoopRef CFRunLoopGetCurrent()
96 cdef void CFRunLoopRun()
97 cdef void CFRunLoopStop(CFRunLoopRef rl)
98 cdef void CFRunLoopAddSource(CFRunLoopRef rl, CFRunLoopSourceRef source, CFS tringRef mode)
99 cdef void CFRunLoopRemoveSource(CFRunLoopRef rl, CFRunLoopSourceRef source, CFStringRef mode)
100 cdef CFStringRef CFRunLoopCopyCurrentMode(CFRunLoopRef rl)
101
102 cdef void CFRunLoopAddTimer(CFRunLoopRef rl, CFRunLoopTimerRef timer, CFStri ngRef mode)
103 cdef void CFRunLoopRemoveTimer(CFRunLoopRef rl, CFRunLoopTimerRef timer, CFS tringRef mode)
104
105 cdef CFRunLoopTimerRef CFRunLoopTimerCreate(CFAllocatorRef allocator, CFAbso luteTime fireDate, CFTimeInterval interval, CFOptionFlags flags, CFIndex order, CFRunLoopTimerCallBack callout, CFRunLoopTimerContext *context)
106 cdef CFAbsoluteTime CFRunLoopTimerGetNextFireDate(CFRunLoopTimerRef timer)
107 cdef void CFRunLoopTimerSetNextFireDate(CFRunLoopTimerRef timer, CFAbsoluteT ime fireDate)
108 cdef void CFRunLoopTimerInvalidate(CFRunLoopTimerRef timer)
109
110 # CFSocket
111 enum kCFSocketFlags:
112 kCFSocketAutomaticallyReenableReadCallBack = 1
113 kCFSocketAutomaticallyReenableAcceptCallBack = 2
114 kCFSocketAutomaticallyReenableDataCallBack = 3
115 kCFSocketAutomaticallyReenableWriteCallBack = 8
116 kCFSocketCloseOnInvalidate = 128
117
118 ctypedef enum CFSocketCallBackType:
119 kCFSocketNoCallBack = 0
120 kCFSocketReadCallBack = 1
121 kCFSocketAcceptCallBack = 2
122 kCFSocketDataCallBack = 3
123 kCFSocketConnectCallBack = 4
124 kCFSocketWriteCallBack = 8
125
126 ctypedef struct CFSocketContext:
127 CFIndex version
128 void *info
129 void *(*retain)(void *info)
130 void (*release)(void *info)
131 CFStringRef (*copyDescription)(void *info)
132
133 ctypedef int CFSocketNativeHandle
134 ctypedef void *CFSocketRef
135 ctypedef void (*CFSocketCallBack)(CFSocketRef s, CFSocketCallBackType _type, CFDataRef address, void *data, void *info)
136
137 cdef CFSocketRef CFSocketCreateWithNative(CFAllocatorRef allocator, CFSocket NativeHandle sock, CFOptionFlags callbackTypes, CFSocketCallBack callout, CFSock etContext* context)
138 cdef CFSocketNativeHandle CFSocketGetNative(CFSocketRef s)
139 cdef CFRunLoopSourceRef CFSocketCreateRunLoopSource(CFAllocatorRef allocator , CFSocketRef s, CFIndex order)
140 cdef void CFSocketEnableCallBacks(CFSocketRef s, CFOptionFlags callBackTypes )
141 cdef void CFSocketDisableCallBacks(CFSocketRef s, CFOptionFlags callBackType s)
142 cdef CFOptionFlags CFSocketGetSocketFlags(CFSocketRef s)
143 cdef void CFSocketSetSocketFlags(CFSocketRef s, CFOptionFlags socketFlags)
144 cdef void CFSocketInvalidate(CFSocketRef s)
145
146 # CFStream
147 ctypedef enum CFStreamErrorDomain:
148 kCFStreamErrorDomainCustom = -1
149 kCFStreamErrorDomainPOSIX = 1
150 kCFStreamErrorDomainMacOSStatus = 2
151
152 ctypedef struct CFStreamError:
153 CFStreamErrorDomain domain
154 int error
155
156 cdef object CFObj_New(CFTypeRef)
157 cdef int CFObj_Convert(object, CFTypeRef *)
158 cdef object CFTypeRefObj_New(CFTypeRef)
159 cdef int CFTypeRefObj_Convert(object, CFTypeRef *)
160 cdef object CFStringRefObj_New(CFStringRef)
161 cdef int CFStringRefObj_Convert(object, CFStringRef *)
162 cdef object CFMutableStringRefObj_New(CFMutableStringRef)
163 cdef int CFMutableStringRefObj_Convert(object, CFMutableStringRef *)
164 cdef object CFArrayRefObj_New(CFArrayRef)
165 cdef int CFArrayRefObj_Convert(object, CFArrayRef *)
166 cdef object CFMutableArrayRefObj_New(CFMutableArrayRef)
167 cdef int CFMutableArrayRefObj_Convert(object, CFMutableArrayRef *)
168 cdef object CFDictionaryRefObj_New(CFDictionaryRef)
169 cdef int CFDictionaryRefObj_Convert(object, CFDictionaryRef *)
170 cdef object CFMutableDictionaryRefObj_New(CFMutableDictionaryRef)
171 cdef int CFMutableDictionaryRefObj_Convert(object, CFMutableDictionaryRef *)
172 cdef object CFURLRefObj_New(CFURLRef)
173 cdef int CFURLRefObj_Convert(object, CFURLRef *)
174 cdef int OptionalCFURLRefObj_Convert(object, CFURLRef *)
175
176 # CFNetwork
177 ctypedef struct CFNetServiceClientContext:
178 CFIndex version
179 void *info
180 void *(*retain)(void *info)
181 void (*release)(void *info)
182 CFStringRef (*copyDescription)(void *info)
183
184 ctypedef enum CFNetServiceBrowserClientCallBackFlags:
185 kCFNetServiceFlagMoreComing = 1
186 kCFNetServiceFlagIsDomain = 2
187 kCFNetServiceFlagIsRegistrationDomain = 4
188 kCFNetServiceFlagRemove = 8
189
190 ctypedef CFTypeRef CFNetServiceBrowserRef
191 ctypedef CFTypeRef CFNetServiceRef
192 ctypedef void (*CFNetServiceBrowserClientCallBack)(CFNetServiceBrowserRef br owser, CFOptionFlags flags, CFTypeRef domainOrService, CFStreamError* error, voi d* info)
193 ctypedef void (*CFNetServiceClientCallBack)(CFNetServiceRef theService, CFSt reamError* error, void* info)
194
195 cdef CFNetServiceBrowserRef CFNetServiceBrowserCreate(CFAllocatorRef alloc, CFNetServiceBrowserClientCallBack clientCB, CFNetServiceClientContext* clientCon text)
196 cdef void CFNetworkServiceBrowserInvalidate(CFNetServiceBrowserRef browser)
197 cdef void CFNetServiceBrowserScheduleWithRunLoop(CFNetServiceBrowserRef brow ser, CFRunLoopRef runLoop, CFStringRef runLoopMode)
198 cdef Boolean CFNetServiceBrowserSearchForDomains(CFNetServiceBrowserRef brow ser, Boolean registrationDomain, CFStreamError* error)
199 cdef Boolean CFNetServiceBrowserSearchForServices(CFNetServiceBrowserRef bro wser, CFStringRef domain, CFStringRef type, CFStreamError* error)
200 cdef void CFNetServiceBrowserStopSearch(CFNetServiceBrowserRef browser, CFSt reamError* error)
201
202 # Call this function to shut down a browser that is running asynchronously.
203 # To complete the shutdown, call CFNetServiceBrowserInvalidate followed by C FNetServiceBrowserStopSearch.
204 cdef void CFNetServiceBrowserUnscheduleFromRunLoop(CFNetServiceBrowserRef br owser, CFRunLoopRef runLoop, CFStringRef runLoopMode)
205
206 cdef void CFNetServiceCancel(CFNetServiceRef theService)
207 cdef CFNetServiceRef CFNetServiceCreate(CFAllocatorRef alloc, CFStringRef do main, CFStringRef type, CFStringRef name, unsigned int port)
208
209 cdef CFArrayRef CFNetServiceGetAddressing(CFNetServiceRef theService)
210 cdef CFStringRef CFNetServiceGetDomain(CFNetServiceRef theService)
211 cdef CFStringRef CFNetServiceGetName(CFNetServiceRef theService)
212 cdef CFStringRef CFNetServiceGetProtocolSpecificInformation(CFNetServiceRef theService)
213 cdef CFStringRef CFNetServiceGetType(CFNetServiceRef theService)
214 cdef Boolean CFNetServiceRegister(CFNetServiceRef theService, CFStreamError* error)
215 cdef Boolean CFNetServiceResolve(CFNetServiceRef theService, CFStreamError* error)
216 cdef void CFNetServiceScheduleWithRunLoop(CFNetServiceRef theService, CFRunL oopRef runLoop, CFStringRef runLoopMode)
217
218 # For CFNetServices that will operate asynchronously, call this function and then call CFNetServiceScheduleWithRunLoop to schedule the service on a run loop .
219 # Then call CFNetServiceRegister or CFNetServiceResolve
220 cdef Boolean CFNetServiceSetClient(CFNetServiceRef theService, CFNetServiceC lientCallBack clientCB, CFNetServiceClientContext* clientContext)
221
222 cdef void CFNetServiceSetProtocolSpecificInformation(CFNetServiceRef theServ ice, CFStringRef theInfo)
223
224 # Unschedules the specified service from the specified run loop and mode.
225 # Call this function to shut down a service that is running asynchronously.
226 # To complete the shutdown, call CFNetServiceSetClient and set clientCB to N ULL. Then call CFNetServiceCancel.
227 cdef void CFNetServiceUnscheduleFromRunLoop(CFNetServiceRef theService, CFRu nLoopRef runLoop, CFStringRef runLoopMode)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698