/hphp/runtime/ext/ext_fb.h

https://bitbucket.org/gnanakeethan/hiphop-php · C Header · 101 lines · 72 code · 9 blank · 20 comment · 0 complexity · 74a24e37365cb5a4f5e3062a4d2a5872 MD5 · raw file

  1. /*
  2. +----------------------------------------------------------------------+
  3. | HipHop for PHP |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
  6. | Copyright (c) 1997-2010 The PHP Group |
  7. +----------------------------------------------------------------------+
  8. | This source file is subject to version 3.01 of the PHP license, |
  9. | that is bundled with this package in the file LICENSE, and is |
  10. | available through the world-wide-web at the following url: |
  11. | http://www.php.net/license/3_01.txt |
  12. | If you did not receive a copy of the PHP license and are unable to |
  13. | obtain it through the world-wide-web, please send a note to |
  14. | license@php.net so we can mail you a copy immediately. |
  15. +----------------------------------------------------------------------+
  16. */
  17. #ifndef incl_HPHP_EXT_FB_H_
  18. #define incl_HPHP_EXT_FB_H_
  19. // >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
  20. #include "hphp/runtime/base/base_includes.h"
  21. namespace HPHP {
  22. ///////////////////////////////////////////////////////////////////////////////
  23. Variant f_fb_thrift_serialize(CVarRef thing);
  24. Variant f_fb_thrift_unserialize(CVarRef thing, VRefParam success, VRefParam errcode = null_variant);
  25. Variant f_fb_serialize(CVarRef thing);
  26. Variant f_fb_unserialize(CVarRef thing, VRefParam success, VRefParam errcode = null_variant);
  27. Variant f_fb_compact_serialize(CVarRef thing);
  28. Variant f_fb_compact_unserialize(CVarRef thing, VRefParam success, VRefParam errcode = null_variant);
  29. bool f_fb_could_include(CStrRef file);
  30. bool f_fb_intercept(CStrRef name, CVarRef handler, CVarRef data = null_variant);
  31. Variant f_fb_stubout_intercept_handler(CStrRef name, CVarRef obj, CArrRef params, CVarRef data, VRefParam done);
  32. Variant f_fb_rpc_intercept_handler(CStrRef name, CVarRef obj, CArrRef params, CVarRef data, VRefParam done);
  33. void f_fb_renamed_functions(CArrRef names);
  34. bool f_fb_rename_function(CStrRef orig_func_name, CStrRef new_func_name);
  35. bool f_fb_autoload_map(CVarRef map, CStrRef root);
  36. bool f_fb_utf8ize(VRefParam input);
  37. int64_t f_fb_utf8_strlen_deprecated(CStrRef input);
  38. int64_t f_fb_utf8_strlen(CStrRef input);
  39. Variant f_fb_utf8_substr(CStrRef str, int start, int length = INT_MAX);
  40. Array f_fb_call_user_func_safe(int _argc, CVarRef function, CArrRef _argv = null_array);
  41. Variant f_fb_call_user_func_safe_return(int _argc, CVarRef function, CVarRef def, CArrRef _argv = null_array);
  42. Array f_fb_call_user_func_array_safe(CVarRef function, CArrRef params);
  43. Variant f_fb_get_code_coverage(bool flush);
  44. void f_fb_enable_code_coverage();
  45. Variant f_fb_disable_code_coverage();
  46. void f_xhprof_enable(int flags = 0, CArrRef args = null_array);
  47. Variant f_xhprof_disable();
  48. void f_xhprof_network_enable();
  49. Variant f_xhprof_network_disable();
  50. void f_xhprof_frame_begin(CStrRef name);
  51. void f_xhprof_frame_end();
  52. Variant f_xhprof_run_trace(CStrRef packedTrace, int flags);
  53. void f_xhprof_sample_enable();
  54. Variant f_xhprof_sample_disable();
  55. void f_fb_load_local_databases(CArrRef servers);
  56. Array f_fb_parallel_query(CArrRef sql_map, int max_thread = 50, bool combine_result = true, bool retry_query_on_fail = true, int connect_timeout = -1, int read_timeout = -1, bool timeout_in_ms = false);
  57. Array f_fb_crossall_query(CStrRef sql, int max_thread = 50, bool retry_query_on_fail = true, int connect_timeout = -1, int read_timeout = -1, bool timeout_in_ms = false);
  58. Variant f_fb_const_fetch(CVarRef key);
  59. bool f_fb_output_compression(bool new_value);
  60. void f_fb_set_exit_callback(CVarRef function);
  61. Array f_fb_get_flush_stat();
  62. int64_t f_fb_get_last_flush_size();
  63. Variant f_fb_lazy_stat(CStrRef filename);
  64. Variant f_fb_lazy_lstat(CStrRef filename);
  65. String f_fb_lazy_realpath(CStrRef filename);
  66. void f_fb_setprofile(CVarRef callback);
  67. String f_fb_gc_collect_cycles();
  68. void f_fb_gc_detect_cycles(CStrRef filename);
  69. extern const int64_t k_FB_UNSERIALIZE_NONSTRING_VALUE;
  70. extern const int64_t k_FB_UNSERIALIZE_UNEXPECTED_END;
  71. extern const int64_t k_FB_UNSERIALIZE_UNRECOGNIZED_OBJECT_TYPE;
  72. extern const int64_t k_FB_UNSERIALIZE_UNEXPECTED_ARRAY_KEY_TYPE;
  73. extern const int64_t k_XHPROF_FLAGS_NO_BUILTINS;
  74. extern const int64_t k_XHPROF_FLAGS_CPU;
  75. extern const int64_t k_XHPROF_FLAGS_MEMORY;
  76. extern const int64_t k_XHPROF_FLAGS_VTSC;
  77. extern const int64_t k_XHPROF_FLAGS_TRACE;
  78. extern const int64_t k_XHPROF_FLAGS_MEASURE_XHPROF_DISABLE;
  79. extern const int64_t k_XHPROF_FLAGS_MALLOC;
  80. ///////////////////////////////////////////////////////////////////////////////
  81. int fb_unserialize_from_buffer(Variant &res, const char *buff, int buff_len,
  82. int *pos);
  83. int fb_compact_unserialize_from_buffer(Variant &res, const char *buff,
  84. int buff_len, int &pos);
  85. Variant fb_unserialize(const char* str, int len, VRefParam success,
  86. VRefParam errcode = null_variant);
  87. Variant fb_compact_unserialize(const char* str, int len,
  88. VRefParam success,
  89. VRefParam errcode = null_variant);
  90. ///////////////////////////////////////////////////////////////////////////////
  91. }
  92. #endif // incl_HPHP_EXT_FB_H_