PageRenderTime 1889ms CodeModel.GetById 22ms app.highlight 12ms RepoModel.GetById 44ms app.codeStats 1571ms

/src/backend/android/ftk_source_android.c

http://ftk.googlecode.com/
C | 46 lines | 35 code | 11 blank | 0 comment | 4 complexity | ada939f437b55baca29343b076390fd0 MD5 | raw file
 1
 2#include "ftk_source_android.h"
 3
 4static int ftk_source_android_get_fd(FtkSource* thiz)
 5{
 6    return -1;
 7}
 8
 9static int ftk_source_android_check(FtkSource* thiz)
10{
11    return 0;
12}
13
14static Ret ftk_source_android_dispatch(FtkSource* thiz)
15{
16	usleep(20000);
17
18	return RET_OK;
19}
20
21static void ftk_source_android_destroy(FtkSource* thiz)
22{
23    if(thiz != NULL)
24    {
25        FTK_ZFREE(thiz, sizeof(thiz));
26    }
27}
28
29FtkSource* ftk_source_android_create(void)
30{
31    FtkSource* thiz = NULL;
32
33    thiz = (FtkSource*)FTK_ZALLOC(sizeof(FtkSource));
34
35    if(thiz != NULL)
36    {
37        thiz->get_fd = ftk_source_android_get_fd;
38        thiz->check = ftk_source_android_check;
39        thiz->dispatch = ftk_source_android_dispatch;
40        thiz->destroy = ftk_source_android_destroy;
41
42        thiz->ref = 1;
43    }
44
45    return thiz;
46}