summaryrefslogtreecommitdiff
path: root/src/classlibnative/inc/nlsinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/classlibnative/inc/nlsinfo.h')
-rw-r--r--src/classlibnative/inc/nlsinfo.h169
1 files changed, 4 insertions, 165 deletions
diff --git a/src/classlibnative/inc/nlsinfo.h b/src/classlibnative/inc/nlsinfo.h
index a5dc13f9a8..505827bc90 100644
--- a/src/classlibnative/inc/nlsinfo.h
+++ b/src/classlibnative/inc/nlsinfo.h
@@ -18,10 +18,6 @@
#ifndef _NLSINFO_H_
#define _NLSINFO_H_
-#define DEFAULT_SORT_VERSION 0
-#define SORT_VERSION_WHIDBEY 0x00001000
-#define SORT_VERSION_V4 0x00060101
-
//
//This structure must map 1-for-1 with the InternalDataItem structure in
//System.Globalization.EncodingTable.
@@ -43,80 +39,22 @@ struct CodePageDataItem {
const char * names;
};
-// Normalization
-typedef BOOL (*PFN_NORMALIZATION_IS_NORMALIZED_STRING)
- ( int NormForm, LPCWSTR lpInString, int cchInString);
-
-typedef int (*PFN_NORMALIZATION_NORMALIZE_STRING)
- ( int NormForm, LPCWSTR lpInString, int cchInString, LPWSTR lpOutString, int cchOutString);
-
-typedef BYTE* (*PFN_NORMALIZATION_INIT_NORMALIZATION)
- ( int NormForm, BYTE* pTableData);
-
-////////////////////////////////////////////////////////////////////////////
-//
-// Forward declarations
-//
-////////////////////////////////////////////////////////////////////////////
-
-class CharTypeTable;
-class CasingTable;
-class SortingTable;
-class NativeTextInfo;
-class CultureDataBaseObject;
-
-class COMNlsInfo {
-
+class COMNlsInfo
+{
public:
-#ifdef FEATURE_SYNTHETIC_CULTURES
- static INT32 WstrToInteger4(__in_z LPCWSTR wstrLocale, __in int Radix);
-#endif // FEATURE_SYNTHETIC_CULTURES
- static INT32 GetCHTLanguage();
- static INT32 CallGetSystemDefaultUILanguage();
static INT32 CallGetUserDefaultUILanguage();
- static LANGID GetDownLevelSystemDefaultUILanguage();
-
- //
- // Native helper functions for methods in CultureInfo.
- //
- static BOOL QCALLTYPE InternalGetDefaultLocaleName(INT32 langType, QCall::StringHandleOnStack defaultLocaleName);
- static BOOL QCALLTYPE InternalGetUserDefaultUILanguage(QCall::StringHandleOnStack userDefaultUiLanguage);
- static BOOL QCALLTYPE InternalGetSystemDefaultUILanguage(QCall::StringHandleOnStack systemDefaultUiLanguage);
-
-// Added but disabled from desktop in .NET 4.0, stayed disabled in .NET 4.5
-#ifdef FEATURE_CORECLR
- static FCDECL0(Object*, nativeGetResourceFallbackArray);
-#endif
//
// Native helper functions for methods in DateTimeFormatInfo
//
static FCDECL1(FC_BOOL_RET, nativeSetThreadLocale, StringObject* localeNameUNSAFE);
- static FCDECL2(Object*, nativeGetLocaleInfoEx, StringObject* localeNameUNSAFE, INT32 lcType);
- static FCDECL2(INT32, nativeGetLocaleInfoExInt, StringObject* localeNameUNSAFE, INT32 lcType);
//
// Native helper functions for CultureData
//
- static FCDECL1(FC_BOOL_RET, nativeInitCultureData, CultureDataBaseObject *data);
- static FCDECL3(FC_BOOL_RET, nativeGetNumberFormatInfoValues, StringObject* localeNameUNSAFE, NumberFormatInfo* nfi, CLR_BOOL useUserOverride);
- static FCDECL1(Object*, LCIDToLocaleName, LCID lcid);
- static FCDECL1(INT32, LocaleNameToLCID, StringObject* localeNameUNSAFE);
- static INT32 QCALLTYPE InternalCompareString (INT_PTR handle, INT_PTR handleOrigin, LPCWSTR localeName, LPCWSTR string1, INT32 offset1, INT32 length1, LPCWSTR string2, INT32 offset2, INT32 length2, INT32 flags);
- static INT32 QCALLTYPE InternalGetGlobalizedHashCode(INT_PTR handle, INT_PTR handleOrigin, LPCWSTR localeName, LPCWSTR pString, INT32 length, INT32 dwFlagsIn, BOOL bForceRandomizedHashing, INT64 additionalEntropy);
-
- static BOOL QCALLTYPE InternalIsSortable(INT_PTR handle, INT_PTR handleOrigin, LPCWSTR localeName, LPCWSTR pString, INT32 length);
- static INT_PTR QCALLTYPE InternalInitSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin);
- static INT_PTR InitSortHandleHelper(LPCWSTR localeName, INT_PTR* handleOrigin);
- static INT_PTR InternalInitOsSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin);
-#ifndef FEATURE_CORECLR
- static INT_PTR InternalInitVersionedSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin);
- static INT_PTR InternalInitVersionedSortHandle(LPCWSTR localeName, INT_PTR* handleOrigin, DWORD sortVersion);
- static DWORD QCALLTYPE InternalGetSortVersion();
-#endif
- static BOOL QCALLTYPE InternalGetNlsVersionEx(INT_PTR handle, INT_PTR handleOrigin, LPCWSTR lpLocaleName, NLSVERSIONINFOEX * lpVersionInformation);
+ static INT32 QCALLTYPE InternalGetGlobalizedHashCode(INT_PTR handle, LPCWSTR localeName, LPCWSTR pString, INT32 length, INT32 dwFlagsIn, INT64 additionalEntropy);
//
// Native helper function for methods in EncodingTable
@@ -124,103 +62,6 @@ public:
static FCDECL0(INT32, nativeGetNumEncodingItems);
static FCDECL0(EncodingDataItem *, nativeGetEncodingTableDataPointer);
static FCDECL0(CodePageDataItem *, nativeGetCodePageTableDataPointer);
-#if FEATURE_CODEPAGES_FILE
- static FCDECL3(LPVOID, nativeCreateOpenFileMapping,
- StringObject* inSectionNameUNSAFE, int inBytesToAllocate, HANDLE *mappedFile);
-#endif // FEATURE_CODEPAGES_FILE
-
- //
- // Native helper function for methods in CharacterInfo
- //
- static FCDECL0(void, AllocateCharTypeTable);
-
- //
- // Native helper function for methods in TextInfo
- //
- static FCDECL5(FC_CHAR_RET, InternalChangeCaseChar, INT_PTR handle, INT_PTR handleOrigin, StringObject* localeNameUNSAFE, CLR_CHAR wch, CLR_BOOL bIsToUpper);
- static FCDECL5(Object*, InternalChangeCaseString, INT_PTR handle, INT_PTR handleOrigin, StringObject* localeNameUNSAFE, StringObject* pString, CLR_BOOL bIsToUpper);
- static FCDECL6(INT32, InternalGetCaseInsHash, INT_PTR handle, INT_PTR handleOrigin, StringObject* localeNameUNSAFE, LPVOID strA, CLR_BOOL bForceRandomizedHashing, INT64 additionalEntropy);
- static INT32 QCALLTYPE InternalCompareStringOrdinalIgnoreCase(LPCWSTR string1, INT32 index1, LPCWSTR string2, INT32 index2, INT32 length1, INT32 length2);
-
- static BOOL QCALLTYPE InternalTryFindStringOrdinalIgnoreCase(
- __in DWORD dwFindNLSStringFlags, // mutually exclusive flags: FIND_FROMSTART, FIND_STARTSWITH, FIND_FROMEND, FIND_ENDSWITH
- __in_ecount(cchSource) LPCWSTR lpStringSource, // the string we search in
- __in int cchSource, // number of characters lpStringSource after sourceIndex
- __in int sourceIndex, // index from where the search will start in lpStringSource
- __in_ecount(cchValue) LPCWSTR lpStringValue, // the string we search for
- __in int cchValue,
- __out int* foundIndex); // the index in lpStringSource where we found lpStringValue
-
- //
- // Native helper function for methods in Normalization
- //
- static FCDECL6(int, nativeNormalizationNormalizeString,
- int NormForm, int& iError,
- StringObject* inString, int inLength,
- CHARArray* outChars, int outLength);
- static FCDECL4(FC_BOOL_RET, nativeNormalizationIsNormalizedString,
- int NormForm, int& iError,
- StringObject* inString, int cwLength);
-
- static void QCALLTYPE nativeNormalizationInitNormalization(int NormForm, BYTE* pTableData);
-
- //
- // QCalls prototype
- //
-
- static int QCALLTYPE nativeEnumCultureNames(INT32 cultureTypes, QCall::ObjectHandleOnStack retStringArray);
-
- static int QCALLTYPE InternalFindNLSStringEx(
- __in_opt INT_PTR handle, // optional sort handle
- __in_opt INT_PTR handleOrigin, // optional pointer to the native function that created the sort handle
- __in_z LPCWSTR lpLocaleName, // locale name
- __in int dwFindNLSStringFlags, // search falg
- __in_ecount(cchSource) LPCWSTR lpStringSource, // the string we search in
- __in int cchSource, // number of characters lpStringSource after sourceIndex
- __in int sourceIndex, // index from where the search will start in lpStringSource
- __in_ecount(cchValue) LPCWSTR lpStringValue, // the string we search for
- __in int cchValue); // length of the string we search for
-
- static int QCALLTYPE InternalGetSortKey(
- __in_opt INT_PTR handle, // PSORTHANDLE
- __in_opt INT_PTR handleOrigin, // optional pointer to the native function that created the sort handle
- __in_z LPCWSTR pLocaleName, // locale name
- __in int flags, // flags
- __in_ecount(cchSource) LPCWSTR pStringSource, // Source string
- __in int cchSource, // number of characters in lpStringSource
- __in_ecount(cchTarget) PBYTE pTarget, // Target data buffer (may be null to count)
- __in int cchTarget); // Character count for target buffer
-
-
-private:
-
- //
- // Internal helper functions.
- //
- static LPVOID internalEnumSystemLocales(DWORD dwFlags);
- static INT32 CompareOrdinal(__in_ecount(Length1) WCHAR* strAChars, int Length1, __in_ecount(Length2) WCHAR* strBChars, int Length2 );
- static INT32 FastIndexOfString(__in WCHAR *sourceString, INT32 startIndex, INT32 endIndex, __in_ecount(patternLength) WCHAR *pattern, INT32 patternLength);
- static INT32 FastIndexOfStringInsensitive(__in WCHAR *sourceString, INT32 startIndex, INT32 endIndex, __in_ecount(patternLength) WCHAR *pattern, INT32 patternLength);
- static INT32 FastLastIndexOfString(__in WCHAR *sourceString, INT32 startIndex, INT32 endIndex, __in_ecount(patternLength) WCHAR *pattern, INT32 patternLength);
- static INT32 FastLastIndexOfStringInsensitive(__in WCHAR *sourceString, INT32 startIndex, INT32 endIndex, __in_ecount(patternLength) WCHAR *pattern, INT32 patternLength);
-
- static BOOL GetNativeDigitsFromWin32(LPCWSTR locale, PTRARRAYREF* pOutputStrAry, BOOL useUserOverride);
- static BOOL CallGetLocaleInfoEx(LPCWSTR locale, int lcType, STRINGREF* pOutputStrRef, BOOL useUserOverride);
- static BOOL CallGetLocaleInfoEx(LPCWSTR locale, int lcType, INT32* pOutputInt32, BOOL useUserOverride);
-
- static BOOL IsWindows7();
-
- //
- // Definitions.
- //
-
-#ifndef FEATURE_COREFX_GLOBALIZATION
- // Normalization
- static HMODULE m_hNormalization;
- static PFN_NORMALIZATION_IS_NORMALIZED_STRING m_pfnNormalizationIsNormalizedStringFunc;
- static PFN_NORMALIZATION_NORMALIZE_STRING m_pfnNormalizationNormalizeStringFunc;
- static PFN_NORMALIZATION_INIT_NORMALIZATION m_pfnNormalizationInitNormalizationFunc;
-#endif
private:
//
@@ -231,8 +72,6 @@ private:
const static int m_nCodePageTableItems;
const static CodePageDataItem CodePageDataTable[];
-
- static INT_PTR EnsureValidSortHandle(INT_PTR handle, INT_PTR handleOrigin, LPCWSTR localeName);
};
-#endif // _NLSINFO_H_
+#endif // _NLSINFO_H_ \ No newline at end of file