* introduced stubbed TimeBackend to libroot, which will contain implementations

of localtime(), gmtime() and mktime()
* implemented tzset() to read the required info from libroot_timezone_info

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37935 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2010-08-05 21:50:26 +00:00
parent 85b54438f7
commit 562ccb03cc
8 changed files with 307 additions and 1 deletions
@@ -0,0 +1,32 @@
/*
* Copyright 2010, Oliver Tappe, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef _ICU_TIME_BACKEND_H
#define _ICU_TIME_BACKEND_H
#include <TimeBackend.h>
namespace BPrivate {
class ICUTimeBackend : public TimeBackend {
public:
ICUTimeBackend();
virtual ~ICUTimeBackend();
virtual const status_t TZSet();
virtual void Initialize(TimeDataBridge* dataBridge);
private:
TimeDataBridge fDataBridge;
};
} // namespace BPrivate
#endif // _ICU_TIME_BACKEND_H
@@ -0,0 +1,43 @@
/*
* Copyright 2010, Oliver Tappe, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef _TIME_BACKEND_H
#define _TIME_BACKEND_H
#include <SupportDefs.h>
namespace BPrivate {
struct TimeDataBridge {
int* addrOfDaylight;
long* addrOfTimezone;
char** addrOfTZName;
TimeDataBridge();
};
class TimeBackend {
public:
TimeBackend();
virtual ~TimeBackend();
virtual const status_t TZSet() = 0;
virtual void Initialize(TimeDataBridge* dataBridge) = 0;
static status_t LoadBackend();
};
extern TimeBackend* gTimeBackend;
} // namespace BPrivate
#endif // _TIME_BACKEND_H