VirtualBox

source: vbox/trunk/include/iprt/locale.h@ 68119

Last change on this file since 68119 was 68119, checked in by vboxsync, 7 years ago

IPRT: added iprt/locale.h with two functions for getting the locale name and country of the user.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/** @file
2 * IPRT - Locale and Related Info.
3 */
4
5/*
6 * Copyright (C) 2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___iprt_locale_h
27#define ___iprt_locale_h
28
29#include <iprt/cdefs.h>
30#include <iprt/types.h>
31
32RT_C_DECLS_BEGIN
33
34/** @defgroup grp_rt_time RTLocale - Locale and Related Info
35 * @ingroup grp_rt
36 * @{
37 */
38
39/**
40 * Returns the setlocale(LC_ALL,NULL) return value.
41 *
42 * @returns IPRT status code.
43 * @retval VERR_NOT_SUPPORTED if not supported.
44 * @param pszName Where to return the name.
45 * @param cbName The size of the name buffer.
46 */
47RTDECL(int) RTLocaleQueryLocaleName(char *pszName, size_t cbName);
48
49
50/**
51 * Gets the two letter country code (ISO 3166-1 alpha-2) for the current user.
52 *
53 * This is not necessarily the country from the locale name, when possible the
54 * source is a different setting (host specific).
55 *
56 * @returns IPRT status code.
57 * @retval VERR_NOT_SUPPORTED if not supported.
58 * @param pszCountryCode Pointer buffer that's at least three bytes in size.
59 * The country code will be returned here on success.
60 */
61RTDECL(int) RTLocaleQueryUserCountryCode(char pszCountryCode[3]);
62
63/** @} */
64
65RT_C_DECLS_END
66
67#endif
68
69
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette