Arquivos
hhvm/hphp/runtime/ext/ext_ldap.h
T
Drew Paroski 84b9d9a3a2 Separate resources from objects, part 1
In HHVM (and HPHPc before it) we've been piggybacking resources on the
KindOfObject machinery. At the language level, resource is considered to
be a different type than object, and there are a number of differences
in behavior between objects and resources (ex. resources don't allow for
dynamic properties, resources don't work with the clone operator, the
"(object)" cast behaves differently for resources vs. objects, etc).

Piggybacking resources on the KindOfObject machinery has some downsides.
Code that deals with KindOfObject values often needs to check if the value
is a resource and go down a different code path. This makes things harder
to maintain and harder to keep parity with Zend. Also, these extra branches
hurt performance a little, and they make it harder for the JIT to do a good
job in some cases when its generating machine code that operates on objects.

This diff prepares the code base for a new KindOfResource type by adding a
new "Resource" smart pointer type (currently a typedef for the Object smart
pointer type) and it updates the C++ code and the idl files appropriately.
This diff is essentially a cosmetic change and should not impact run time
behavior. In the next diff (part 2) we'll actually add a new KindOfResource
type, detach ResourceData from the ObjectData inheritence hierarchy, and
provide a real implementation for the Resource smart pointer type (instead
of just aliasing the Object smart pointer type).
2013-07-10 11:16:33 -07:00

73 linhas
4.3 KiB
C++

/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
| Copyright (c) 1997-2010 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/
#ifndef incl_HPHP_EXT_LDAP_H_
#define incl_HPHP_EXT_LDAP_H_
// >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
#include "hphp/runtime/base/base_includes.h"
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
Variant f_ldap_connect(CStrRef hostname = null_string, int port = 389);
Variant f_ldap_explode_dn(CStrRef dn, int with_attrib);
Variant f_ldap_dn2ufn(CStrRef db);
String f_ldap_err2str(int errnum);
bool f_ldap_add(CResRef link, CStrRef dn, CArrRef entry);
bool f_ldap_mod_add(CResRef link, CStrRef dn, CArrRef entry);
bool f_ldap_mod_del(CResRef link, CStrRef dn, CArrRef entry);
bool f_ldap_mod_replace(CResRef link, CStrRef dn, CArrRef entry);
bool f_ldap_modify(CResRef link, CStrRef dn, CArrRef entry);
bool f_ldap_bind(CResRef link, CStrRef bind_rdn = null_string, CStrRef bind_password = null_string);
bool f_ldap_set_rebind_proc(CResRef link, CVarRef callback);
bool f_ldap_sort(CResRef link, CResRef result, CStrRef sortfilter);
bool f_ldap_start_tls(CResRef link);
bool f_ldap_unbind(CResRef link);
bool f_ldap_get_option(CResRef link, int option, VRefParam retval);
bool f_ldap_set_option(CVarRef link, int option, CVarRef newval);
bool f_ldap_close(CResRef link);
Variant f_ldap_list(CVarRef link, CVarRef base_dn, CVarRef filter, CArrRef attributes = null_array, int attrsonly = 0, int sizelimit = -1, int timelimit = -1, int deref = -1);
Variant f_ldap_read(CVarRef link, CVarRef base_dn, CVarRef filter, CArrRef attributes = null_array, int attrsonly = 0, int sizelimit = -1, int timelimit = -1, int deref = -1);
Variant f_ldap_search(CVarRef link, CVarRef base_dn, CVarRef filter, CArrRef attributes = null_array, int attrsonly = 0, int sizelimit = -1, int timelimit = -1, int deref = -1);
bool f_ldap_rename(CResRef link, CStrRef dn, CStrRef newrdn, CStrRef newparent, bool deleteoldrdn);
bool f_ldap_delete(CResRef link, CStrRef dn);
Variant f_ldap_compare(CResRef link, CStrRef dn, CStrRef attribute, CStrRef value);
int64_t f_ldap_errno(CResRef link);
String f_ldap_error(CResRef link);
Variant f_ldap_get_dn(CResRef link, CResRef result_entry);
int64_t f_ldap_count_entries(CResRef link, CResRef result);
Variant f_ldap_get_entries(CResRef link, CResRef result);
Variant f_ldap_first_entry(CResRef link, CResRef result);
Variant f_ldap_next_entry(CResRef link, CResRef result_entry);
Array f_ldap_get_attributes(CResRef link, CResRef result_entry);
Variant f_ldap_first_attribute(CResRef link, CResRef result_entry);
Variant f_ldap_next_attribute(CResRef link, CResRef result_entry);
Variant f_ldap_first_reference(CResRef link, CResRef result);
Variant f_ldap_next_reference(CResRef link, CResRef result_entry);
bool f_ldap_parse_reference(CResRef link, CResRef result_entry, VRefParam referrals);
bool f_ldap_parse_result(CResRef link, CResRef result, VRefParam errcode, VRefParam matcheddn = uninit_null(), VRefParam errmsg = uninit_null(), VRefParam referrals = uninit_null());
bool f_ldap_free_result(CResRef result);
Variant f_ldap_get_values_len(CResRef link, CResRef result_entry, CStrRef attribute);
Variant f_ldap_get_values(CResRef link, CResRef result_entry, CStrRef attribute);
///////////////////////////////////////////////////////////////////////////////
}
#endif // incl_HPHP_EXT_LDAP_H_