php_gearman_job.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Gearman PHP Extension
  3. *
  4. * Copyright (C) 2008 James M. Luedke <contact@jamesluedke.com>,
  5. * Eric Day <eday@oddments.org>
  6. * All rights reserved.
  7. *
  8. * Use and distribution licensed under the PHP license. See
  9. * the LICENSE file in this directory for full text.
  10. */
  11. #ifndef __PHP_GEARMAN_JOB_H
  12. #define __PHP_GEARMAN_JOB_H
  13. #include "php.h"
  14. #include "php_ini.h"
  15. #include "ext/standard/info.h"
  16. #include "zend_exceptions.h"
  17. #include "zend_interfaces.h"
  18. #include "php_gearman.h"
  19. #include <libgearman-1.0/gearman.h>
  20. #include <libgearman-1.0/interface/status.h>
  21. #include <libgearman-1.0/status.h>
  22. extern zend_class_entry *gearman_job_ce;
  23. extern zend_object_handlers gearman_job_obj_handlers;
  24. zend_object *gearman_job_obj_new(zend_class_entry *ce);
  25. typedef enum {
  26. GEARMAN_JOB_OBJ_CREATED = (1 << 0)
  27. } gearman_job_obj_flags_t;
  28. typedef struct {
  29. gearman_return_t ret;
  30. gearman_job_obj_flags_t flags;
  31. gearman_job_st *job;
  32. zend_object std;
  33. } gearman_job_obj;
  34. gearman_job_obj *gearman_job_fetch_object(zend_object *obj);
  35. #define Z_GEARMAN_JOB_P(zv) gearman_job_fetch_object(Z_OBJ_P((zv)))
  36. #endif /* __PHP_GEARMAN_JOB_H */