ultristic fancyness
[libuim.git] / libuim / include / libuim.h
blobe8b18b25a94b1f64d542900e590d0dda6efbbbee
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 * Copyright (C) unfancy::labs 2008 <sya@unfancy.org>
5 * libuim is free software copyrighted by unfancy::labs.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name ``unfancy::labs'' nor the name of any other
16 * contributor may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * libuim IS PROVIDED BY unfancy::labs ``AS IS'' AND ANY EXPRESS
20 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL unfancy::labs OR ANY OTHER CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
26 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 /*****************************************************************************/
34 #ifndef _U_LIBUIM_H
35 #define _U_LIBUIM_H
37 #include <stdio.h>
38 #include <stdint.h>
39 #include <wchar.h>
41 /*****************************************************************************/
43 struct peer{
44 uint32_t id;
45 wchar_t* name;
46 void* dummy1;
47 void* dummy2;
48 void* dummy3;
51 /*****************************************************************************/
53 void uiml_init(void);
54 void uiml_exit(void);
56 uint32_t uiml_event_pending(void);
57 void uiml_event_handle(void);
59 void uiml_config_set(wchar_t* setting, wchar_t* value);
60 wchar_t* uiml_config_get(wchar_t* setting);
62 void uiml_peer_add(wchar_t* name);
63 void uiml_peer_remove(struct peer*);
64 uint32_t uiml_peer_get_count(void);
65 struct peer* uiml_peer_get_byid(uint32_t);
66 struct peer* uiml_peer_get_byname(wchar_t* name);
68 //void uiml_send_raw(struct pkg* mypkg);
69 void uiml_send_msg(struct peer* to, wchar_t* msg);
70 void uiml_send_req_keyex(struct peer* to);
72 #endif /* _U_LIBUIM_H */