added iOS source code
[wl-app.git] / iOS / Pods / GoogleUtilities / GoogleUtilities / Reachability / GULReachabilityChecker+Internal.h
1 /*
2  * Copyright 2017 Google
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #import <GoogleUtilities/GULReachabilityChecker.h>
18
19 typedef SCNetworkReachabilityRef (*GULReachabilityCreateWithNameFn)(CFAllocatorRef allocator,
20                                                                     const char *host);
21
22 typedef Boolean (*GULReachabilitySetCallbackFn)(SCNetworkReachabilityRef target,
23                                                 SCNetworkReachabilityCallBack callback,
24                                                 SCNetworkReachabilityContext *context);
25 typedef Boolean (*GULReachabilityScheduleWithRunLoopFn)(SCNetworkReachabilityRef target,
26                                                         CFRunLoopRef runLoop,
27                                                         CFStringRef runLoopMode);
28 typedef Boolean (*GULReachabilityUnscheduleFromRunLoopFn)(SCNetworkReachabilityRef target,
29                                                           CFRunLoopRef runLoop,
30                                                           CFStringRef runLoopMode);
31
32 typedef void (*GULReachabilityReleaseFn)(CFTypeRef cf);
33
34 struct GULReachabilityApi {
35   GULReachabilityCreateWithNameFn createWithNameFn;
36   GULReachabilitySetCallbackFn setCallbackFn;
37   GULReachabilityScheduleWithRunLoopFn scheduleWithRunLoopFn;
38   GULReachabilityUnscheduleFromRunLoopFn unscheduleFromRunLoopFn;
39   GULReachabilityReleaseFn releaseFn;
40 };
41
42 @interface GULReachabilityChecker (Internal)
43
44 - (const struct GULReachabilityApi *)reachabilityApi;
45 - (void)setReachabilityApi:(const struct GULReachabilityApi *)reachabilityApi;
46
47 @end