/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. #include "ftk_source_android.h"
  2. static int ftk_source_android_get_fd(FtkSource* thiz)
  3. {
  4. return -1;
  5. }
  6. static int ftk_source_android_check(FtkSource* thiz)
  7. {
  8. return 0;
  9. }
  10. static Ret ftk_source_android_dispatch(FtkSource* thiz)
  11. {
  12. usleep(20000);
  13. return RET_OK;
  14. }
  15. static void ftk_source_android_destroy(FtkSource* thiz)
  16. {
  17. if(thiz != NULL)
  18. {
  19. FTK_ZFREE(thiz, sizeof(thiz));
  20. }
  21. }
  22. FtkSource* ftk_source_android_create(void)
  23. {
  24. FtkSource* thiz = NULL;
  25. thiz = (FtkSource*)FTK_ZALLOC(sizeof(FtkSource));
  26. if(thiz != NULL)
  27. {
  28. thiz->get_fd = ftk_source_android_get_fd;
  29. thiz->check = ftk_source_android_check;
  30. thiz->dispatch = ftk_source_android_dispatch;
  31. thiz->destroy = ftk_source_android_destroy;
  32. thiz->ref = 1;
  33. }
  34. return thiz;
  35. }