Arquivos
hhvm/hphp/runtime/ext/ext_imap.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

101 linhas
6.4 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_IMAP_H_
#define incl_HPHP_EXT_IMAP_H_
// >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
#include "hphp/runtime/base/base_includes.h"
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
Variant f_imap_8bit(CStrRef str);
Variant f_imap_alerts();
bool f_imap_append(CResRef imap_stream, CStrRef mailbox, CStrRef message, CStrRef options = "");
Variant f_imap_base64(CStrRef text);
Variant f_imap_binary(CStrRef str);
Variant f_imap_body(CResRef imap_stream, int64_t msg_number, int64_t options = 0);
Variant f_imap_bodystruct(CResRef imap_stream, int64_t msg_number, CStrRef section);
Variant f_imap_check(CResRef imap_stream);
bool f_imap_clearflag_full(CResRef imap_stream, CStrRef sequence, CStrRef flag, int64_t options = 0);
bool f_imap_close(CResRef imap_stream, int64_t flag = 0);
bool f_imap_createmailbox(CResRef imap_stream, CStrRef mailbox);
bool f_imap_delete(CResRef imap_stream, CStrRef msg_number, int64_t options = 0);
bool f_imap_deletemailbox(CResRef imap_stream, CStrRef mailbox);
Variant f_imap_errors();
bool f_imap_expunge(CResRef imap_stream);
Variant f_imap_fetch_overview(CResRef imap_stream, CStrRef sequence, int64_t options = 0);
Variant f_imap_fetchbody(CResRef imap_stream, int64_t msg_number, CStrRef section, int64_t options = 0);
Variant f_imap_fetchheader(CResRef imap_stream, int64_t msg_number, int64_t options = 0);
Variant f_imap_fetchstructure(CResRef imap_stream, int64_t msg_number, int64_t options = 0);
bool f_imap_gc(CResRef imap_stream, int64_t caches);
Variant f_imap_get_quota(CResRef imap_stream, CStrRef quota_root);
Variant f_imap_get_quotaroot(CResRef imap_stream, CStrRef quota_root);
Variant f_imap_getacl(CResRef imap_stream, CStrRef mailbox);
Variant f_imap_getmailboxes(CResRef imap_stream, CStrRef ref, CStrRef pattern);
Variant f_imap_getsubscribed(CResRef imap_stream, CStrRef ref, CStrRef pattern);
Variant f_imap_header(CResRef imap_stream, int64_t msg_number, int64_t fromlength = 0, int64_t subjectlength = 0, CStrRef defaulthost = "");
Variant f_imap_headerinfo(CResRef imap_stream, int64_t msg_number, int64_t fromlength = 0, int64_t subjectlength = 0, CStrRef defaulthost = "");
Variant f_imap_headers(CResRef imap_stream);
Variant f_imap_last_error();
Variant f_imap_list(CResRef imap_stream, CStrRef ref, CStrRef pattern);
Variant f_imap_listmailbox(CResRef imap_stream, CStrRef ref, CStrRef pattern);
Variant f_imap_listscan(CResRef imap_stream, CStrRef ref, CStrRef pattern, CStrRef content);
Variant f_imap_listsubscribed(CResRef imap_stream, CStrRef ref, CStrRef pattern);
Variant f_imap_lsub(CResRef imap_stream, CStrRef ref, CStrRef pattern);
Variant f_imap_mail_compose(CArrRef envelope, CArrRef body);
bool f_imap_mail_copy(CResRef imap_stream, CStrRef msglist, CStrRef mailbox, int64_t options = 0);
bool f_imap_mail_move(CResRef imap_stream, CStrRef msglist, CStrRef mailbox, int64_t options = 0);
bool f_imap_mail(CStrRef to, CStrRef subject, CStrRef message, CStrRef additional_headers = "", CStrRef cc = "", CStrRef bcc = "", CStrRef rpath = "");
Variant f_imap_mailboxmsginfo(CResRef imap_stream);
Variant f_imap_mime_header_decode(CStrRef text);
Variant f_imap_msgno(CResRef imap_stream, int64_t uid);
Variant f_imap_num_msg(CResRef imap_stream);
Variant f_imap_num_recent(CResRef imap_stream);
Variant f_imap_open(CStrRef mailbox, CStrRef username, CStrRef password, int64_t options = 0, int64_t retries = 0);
bool f_imap_ping(CResRef imap_stream);
Variant f_imap_qprint(CStrRef str);
bool f_imap_renamemailbox(CResRef imap_stream, CStrRef old_mbox, CStrRef new_mbox);
bool f_imap_reopen(CResRef imap_stream, CStrRef mailbox, int64_t options = 0, int64_t retries = 0);
Variant f_imap_rfc822_parse_adrlist(CStrRef address, CStrRef default_host);
Variant f_imap_rfc822_parse_headers(CStrRef headers, CStrRef defaulthost = "");
Variant f_imap_rfc822_write_address(CStrRef mailbox, CStrRef host, CStrRef personal);
bool f_imap_savebody(CResRef imap_stream, CVarRef file, int64_t msg_number, CStrRef part_number = "", int64_t options = 0);
Variant f_imap_scanmailbox(CResRef imap_stream, CStrRef ref, CStrRef pattern, CStrRef content);
Variant f_imap_search(CResRef imap_stream, CStrRef criteria, int64_t options = 0, CStrRef charset = "");
bool f_imap_set_quota(CResRef imap_stream, CStrRef quota_root, int64_t quota_limit);
bool f_imap_setacl(CResRef imap_stream, CStrRef mailbox, CStrRef id, CStrRef rights);
bool f_imap_setflag_full(CResRef imap_stream, CStrRef sequence, CStrRef flag, int64_t options = 0);
Variant f_imap_sort(CResRef imap_stream, int64_t criteria, int64_t reverse, int64_t options = 0, CStrRef search_criteria = "", CStrRef charset = "");
Variant f_imap_status(CResRef imap_stream, CStrRef mailbox, int64_t options = 0);
bool f_imap_subscribe(CResRef imap_stream, CStrRef mailbox);
Variant f_imap_thread(CResRef imap_stream, int64_t options = 0);
Variant f_imap_timeout(int64_t timeout_type, int64_t timeout = -1);
Variant f_imap_uid(CResRef imap_stream, int64_t msg_number);
bool f_imap_undelete(CResRef imap_stream, CStrRef msg_number, int64_t flags = 0);
bool f_imap_unsubscribe(CResRef imap_stream, CStrRef mailbox);
Variant f_imap_utf7_decode(CStrRef text);
Variant f_imap_utf7_encode(CStrRef data);
Variant f_imap_utf8(CStrRef mime_encoded_text);
///////////////////////////////////////////////////////////////////////////////
}
#endif // incl_HPHP_EXT_IMAP_H_