]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/localsvc.cpp
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / common / localsvc.cpp
1 //
2 // localsvc.cpp -- Apple-specific service hook
3 // Copyright (c) 2007 Apple Inc. All rights reserved.
4 //
5
6 #include "unicode/utypes.h"
7
8 #if !UCONFIG_NO_BREAK_ITERATION
9
10 #include "aaplbfct.h"
11 #include "cstring.h"
12 // platform.h now includes <TargetConditionals.h> if U_PLATFORM_IS_DARWIN_BASED
13
14 // Return an appropriate Apple-specific object, based on the service in question
15 U_CAPI void* uprv_svc_hook(const char *what, UErrorCode *status)
16 {
17 if (uprv_strcmp(what, "languageBreakFactory") == 0) {
18 #if U_PLATFORM_IS_DARWIN_BASED && TARGET_OS_MAC
19 return new icu::AppleLanguageBreakFactory(*status);
20 }
21 #else
22 }
23 #endif
24 return NULL;
25 }
26
27 #endif