summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-26 12:13:17 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-26 12:13:17 +0000
commit965c7db318bb52f6d92f02dd3934e1c01249bdf2 (patch)
treef42a7118db71c40119c583162479b4fda2e525b1 /include
parent60acf9d39e2337ffe440ab1f24cddd6a2fc24577 (diff)
- added support of value type Text (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2911 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
-rw-r--r--include/common.h13
-rw-r--r--include/db.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 6d18ac81..65fbf1aa 100644
--- a/include/common.h
+++ b/include/common.h
@@ -316,6 +316,7 @@ AGENT_RESULT {
zbx_uint64_t ui64;
double dbl;
char *str;
+ char *text;
char *msg;
ZBX_LIST list;
};
@@ -326,6 +327,7 @@ AGENT_RESULT {
#define AR_STRING 4
#define AR_MESSAGE 8
#define AR_LIST 16
+#define AR_TEXT 32
#define SET_DBL_RESULT(res, val) \
@@ -346,6 +348,12 @@ AGENT_RESULT {
(res)->str = (char*)(val); \
}
+#define SET_TEXT_RESULT(res, val) \
+ { \
+ (res)->type |= AR_TEXT; \
+ (res)->text = (char*)(val); \
+ }
+
#define SET_MSG_RESULT(res, val) \
{ \
(res)->type |= AR_MESSAGE; \
@@ -367,6 +375,11 @@ AGENT_RESULT {
(res)->type &= ~AR_STRING; \
}
+#define UNSET_TEXT_RESULT(res) \
+ { \
+ (res)->type &= ~AR_TEXT; \
+ }
+
#define UNSET_MSG_RESULT(res) \
{ \
(res)->type &= ~AR_MESSAGE; \
diff --git a/include/db.h b/include/db.h
index 045dfaa6..7eb619be 100644
--- a/include/db.h
+++ b/include/db.h
@@ -329,6 +329,7 @@ int DBadd_trend(int itemid, double value, int clock);
int DBadd_history(int itemid, double value, int clock);
int DBadd_history_log(int itemid, char *value, int clock, int timestamp, char *source, int severity);
int DBadd_history_str(int itemid, char *value, int clock);
+int DBadd_history_text(int itemid, char *value, int clock);
int DBadd_history_uint(int itemid, zbx_uint64_t value, int clock);
int DBadd_service_alarm(int serviceid,int status,int clock);
int DBadd_alert(int actionid, int triggerid, int userid, int mediatypeid, char *sendto, char *subject, char *message, int maxrepeats, int repeatdelay);