OpenMAMA
timezone.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MamaTimeZoneH__
23 #define MamaTimeZoneH__
24 
25 #include <mama/config.h>
26 #include <mama/status.h>
27 #include <mama/types.h>
28 #include "wombat/port.h"
29 
30 #include <time.h>
31 
32 
33 #if defined(__cplusplus)
34 extern "C" {
35 #endif
36 
38 MAMAExpDLL
39 extern mamaTimeZone mamaTimeZone_local(void);
40 
42 MAMAExpDLL
43 extern mamaTimeZone mamaTimeZone_utc(void);
44 
47 MAMAExpDLL
49 
51 MAMAExpDLL
52 extern mama_status
54 
57 MAMAExpDLL
58 extern mama_status
60  const char* tzId);
61 
63 MAMAExpDLL
64 extern mama_status
66  const mamaTimeZone timeZoneCopy);
67 
69 MAMAExpDLL
70 extern mama_status
72 
74 MAMAExpDLL
75 extern mama_status
77  const mamaTimeZone timeZoneCopy);
78 
80 MAMAExpDLL
81 extern mama_status
83  const char* tzId);
84 
86 MAMAExpDLL
87 extern mama_status
89 
91 MAMAExpDLL
92 extern mama_status
93 mamaTimeZone_getTz (const mamaTimeZone timeZone,
94  const char** result);
95 
98 MAMAExpDLL
99 extern mama_status
100 mamaTimeZone_getOffset (const mamaTimeZone timeZone,
101  mama_i32_t* result);
102 
105 MAMAExpDLL
106 extern mama_status
108 
113 MAMAExpDLL
114 extern void
116 
117 
118 #if defined(__cplusplus)
119 }
120 #endif
121 
122 #endif
types.h
mama_status
mama_status
Definition: status.h:37
mamaTimeZone_utc
MAMAExpDLL mamaTimeZone mamaTimeZone_utc(void)
Return a pointer to a mamaTimeZone corresponding to the UTC time zone.
mamaTimeZone_createFromTz
MAMAExpDLL mama_status mamaTimeZone_createFromTz(mamaTimeZone *timeZone, const char *tzId)
Create an instance of a mamaTimeZone with a standard TZ identifier (NULL identifier is equivalent to ...
mamaTimeZone
void * mamaTimeZone
Time zone utility type.
Definition: types.h:84
mamaTimeZone_createCopy
MAMAExpDLL mama_status mamaTimeZone_createCopy(mamaTimeZone *timeZone, const mamaTimeZone timeZoneCopy)
Create an instance of a mamaTimeZone by copying from another instance.
mamaTimeZone_usEastern
MAMAExpDLL mamaTimeZone mamaTimeZone_usEastern(void)
Return a pointer to a mamaTimeZone corresponding to the US Eastern time zone.
mama_i32_t
int32_t mama_i32_t
Definition: types.h:38
mamaTimeZone_getTz
MAMAExpDLL mama_status mamaTimeZone_getTz(const mamaTimeZone timeZone, const char **result)
Get the time zone ID string.
mamaTimeZone_getOffset
MAMAExpDLL mama_status mamaTimeZone_getOffset(const mamaTimeZone timeZone, mama_i32_t *result)
Get the offset from UTC (in seconds).
mamaTimeZone_setScanningInterval
MAMAExpDLL void mamaTimeZone_setScanningInterval(mama_f64_t seconds)
Set the interval of the thread updating each MamaTimeZone instance offset.
mamaTimeZone_copy
MAMAExpDLL mama_status mamaTimeZone_copy(mamaTimeZone timeZone, const mamaTimeZone timeZoneCopy)
Copy an instance of a mamaTimeZone (to a previously-created instance).
mamaTimeZone_set
MAMAExpDLL mama_status mamaTimeZone_set(mamaTimeZone timeZone, const char *tzId)
Set an existing instance of a mamaTimeZone to a new time zone.
mamaTimeZone_destroy
MAMAExpDLL mama_status mamaTimeZone_destroy(mamaTimeZone timeZone)
Destroy an instance of a mamaTimeZone.
mama_f64_t
double mama_f64_t
Definition: types.h:44
mamaTimeZone_clear
MAMAExpDLL mama_status mamaTimeZone_clear(mamaTimeZone timeZone)
Clear the time zone (but not destroyed).
mamaTimeZone_check
MAMAExpDLL mama_status mamaTimeZone_check(mamaTimeZone timeZone)
Check (recalculate) the UTC offset in case it has changed due to daylight savings adjustments.
config.h
mamaTimeZone_local
MAMAExpDLL mamaTimeZone mamaTimeZone_local(void)
Return a pointer to a mamaTimeZone corresponding to the local time zone.
mamaTimeZone_create
MAMAExpDLL mama_status mamaTimeZone_create(mamaTimeZone *timeZone)
Create an instance of a mamaTimeZone.
status.h


© 2012 Linux Foundation