summaryrefslogtreecommitdiff
path: root/rtclient
diff options
context:
space:
mode:
Diffstat (limited to 'rtclient')
-rw-r--r--rtclient/rtclient.h23
-rw-r--r--rtclient/rtticket.h9
-rw-r--r--rtclient/rtuser.h33
3 files changed, 65 insertions, 0 deletions
diff --git a/rtclient/rtclient.h b/rtclient/rtclient.h
new file mode 100644
index 0000000..a872f37
--- /dev/null
+++ b/rtclient/rtclient.h
@@ -0,0 +1,23 @@
+#ifndef RTCLIENT_H
+#define RTCLIENT_H
+
+#include "rtuser.h"
+#include "rtticket.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ bool rtclient_init(const char *server_url);
+ void rtclient_login(const char *name, const char *password);
+ void rtclient_user_show(struct rt_user **userptr, const char *name);
+ void rtclient_ticket_search(struct rt_ticketlist **listptr, const char *query);
+ void rtclient_ticket_freelist(struct rt_ticketlist *list);
+ void rtclient_user_free(struct rt_user *user);
+ void rtclient_cleanup();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // RTCLIENT_H
diff --git a/rtclient/rtticket.h b/rtclient/rtticket.h
new file mode 100644
index 0000000..3d78ac1
--- /dev/null
+++ b/rtclient/rtticket.h
@@ -0,0 +1,9 @@
+#ifndef RTTICKET_H
+#define RTTICKET_H
+
+struct rt_ticketlist {
+ unsigned int length;
+ char *tickets[];
+};
+
+#endif // RTTICKET_H
diff --git a/rtclient/rtuser.h b/rtclient/rtuser.h
new file mode 100644
index 0000000..9fccea8
--- /dev/null
+++ b/rtclient/rtuser.h
@@ -0,0 +1,33 @@
+#ifndef RTUSER_H
+#define RTUSER_H
+
+#include <stdbool.h>
+
+struct rt_user {
+ char *id;
+ char *password;
+ char *name;
+ char *emailaddress;
+ char *realname;
+ char *nickname;
+ char *gecos;
+ char *organization;
+ char *address1;
+ char *address2;
+ char *city;
+ char *state;
+ char *zip;
+ char *country;
+ char *homephone;
+ char *workphone;
+ char *mobilephone;
+ char *pagerphone;
+ char *contactinfo;
+ char *comments;
+ char *signature;
+ char lang[2];
+ bool privileged;
+ bool disabled;
+};
+
+#endif // RTUSER_H