aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/src/examples/eina_model_04_whistler.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-04-22 09:20:32 +1000
committerDavid Walter Seikel2012-04-22 09:20:32 +1000
commit3ad3455551be0d7859ecb02290376206d5e66498 (patch)
tree497917e12b4d7f458dff9765d9b53f64c4e03fc3 /libraries/eina/src/examples/eina_model_04_whistler.c
parentUpdate EFL to latest beta. (diff)
downloadSledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.zip
SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.gz
SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.bz2
SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.xz
And actually include new files, plus elementary libraries.
Diffstat (limited to 'libraries/eina/src/examples/eina_model_04_whistler.c')
-rw-r--r--libraries/eina/src/examples/eina_model_04_whistler.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/libraries/eina/src/examples/eina_model_04_whistler.c b/libraries/eina/src/examples/eina_model_04_whistler.c
new file mode 100644
index 0000000..ed9832f
--- /dev/null
+++ b/libraries/eina/src/examples/eina_model_04_whistler.c
@@ -0,0 +1,59 @@
1/*
2 * whistler.c
3 *
4 */
5
6#include "eina_model_04_whistler.h"
7
8void
9whistler_whistle(Eina_Model *m)
10{
11 const Eina_Model_Interface *iface = NULL;
12 iface = eina_model_interface_get(m, WHISTLER_INTERFACE_NAME);
13
14 EINA_SAFETY_ON_NULL_RETURN(iface);
15
16 void (*pf)(Eina_Model *);
17
18 pf = eina_model_interface_method_resolve(iface, m, Whistler_Interface, whistle);
19 EINA_SAFETY_ON_NULL_RETURN(pf);
20 printf("%s() \t", __func__);
21 pf(m);
22}
23/*
24 * call for overridden Swimmer Interface function
25 */
26void
27swimmer_swim(Eina_Model *m)
28{
29 const Eina_Model_Interface *iface = NULL;
30 iface = eina_model_interface_get(m, SWIMMER_INTERFACE_NAME);
31
32 EINA_SAFETY_ON_NULL_RETURN(iface);
33
34 void (*pf)(Eina_Model *);
35
36 pf = eina_model_interface_method_resolve(iface, m, Swimmer_Interface, swim);
37 EINA_SAFETY_ON_NULL_RETURN(pf);
38 printf("%s() \t", __func__);
39 pf(m);
40}
41
42/*
43 * call for overridden Diver Interface function
44 */
45void
46diver_dive(Eina_Model *m)
47{
48 const Eina_Model_Interface *iface = NULL;
49 iface = eina_model_interface_get(m, DIVER_INTERFACE_NAME);
50
51 EINA_SAFETY_ON_NULL_RETURN(iface);
52
53 void (*pf)(Eina_Model *);
54
55 pf = eina_model_interface_method_resolve(iface, m, Diver_Interface, dive);
56 EINA_SAFETY_ON_NULL_RETURN(pf);
57 printf("%s() \t", __func__);
58 pf(m);
59}