mirror of
https://review.haiku-os.org/haiku
synced 2025-02-21 04:58:56 +01:00
- libicule and libiculx do not exist anymore in newer ICU versions (harfbuzz replaces them), but we didn't actually use them, so remove them from the build feature and from the package dependencies - Add namespace usage marcos since the newer ICU packages put ICU things in a namespace, making it easier to have multiple versions of ICU used side by side. No functional change intended, but this makes it possible to build the code with either ICU 57 (for gcc2) or 66 (for other architectures).
56 lines
1.2 KiB
C++
56 lines
1.2 KiB
C++
/*
|
|
* Copyright 2010-2011, Oliver Tappe, zooey@hirschkaefer.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _ICU_TIME_CONVERSION_H
|
|
#define _ICU_TIME_CONVERSION_H
|
|
|
|
|
|
#include <time.h>
|
|
|
|
#include <StorageDefs.h>
|
|
|
|
#include "ICUTimeData.h"
|
|
#include "LocaleBackend.h"
|
|
|
|
|
|
namespace BPrivate {
|
|
namespace Libroot {
|
|
|
|
|
|
class ICUTimeConversion {
|
|
public:
|
|
ICUTimeConversion(const ICUTimeData& timeData);
|
|
virtual ~ICUTimeConversion();
|
|
|
|
virtual void Initialize(
|
|
TimeConversionDataBridge* dataBridge);
|
|
|
|
status_t TZSet(const char* timeZoneID, const char* tz);
|
|
|
|
status_t Localtime(const time_t* inTime,
|
|
struct tm* tmOut);
|
|
status_t Gmtime(const time_t* inTime, struct tm* tmOut);
|
|
|
|
status_t Mktime(struct tm* inOutTm, time_t& timeOut);
|
|
|
|
private:
|
|
status_t _FillTmValues(const U_NAMESPACE_QUALIFIER
|
|
TimeZone* icuTimeZone,
|
|
const time_t* inTime, struct tm* tmOut);
|
|
|
|
const ICUTimeData& fTimeData;
|
|
|
|
TimeConversionDataBridge* fDataBridge;
|
|
|
|
U_NAMESPACE_QUALIFIER TimeZone* fTimeZone;
|
|
char fTimeZoneID[B_FILE_NAME_LENGTH];
|
|
};
|
|
|
|
|
|
} // namespace Libroot
|
|
} // namespace BPrivate
|
|
|
|
|
|
#endif // _ICU_TIME_BACKEND_H
|