diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-11-01 16:31:59 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-11-01 16:31:59 -0300 |
commit | b643ca0bd58188da3dc98193f97fb220ab008983 (patch) | |
tree | f445722a242dd9e201a14143aa930938520b638a /dpip/dpip.h | |
parent | 13e0d2aabf7d06c3034b878e0cea861e4db1ddce (diff) |
Convert dpid, file dpi and cookies dpi to dsh API
cookies: convert to dsh API (with auth)
file dpi: convert to dsh API (with auth)
dpid: convert to dsh API (with auth)
handle EINTR in connect(), authenticated DpiBye cmd
Diffstat (limited to 'dpip/dpip.h')
-rw-r--r-- | dpip/dpip.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dpip/dpip.h b/dpip/dpip.h index ddc66ed4..74ca9dd5 100644 --- a/dpip/dpip.h +++ b/dpip/dpip.h @@ -57,8 +57,8 @@ char *a_Dpip_build_cmd(const char *format, ...); * (dpip character escaping is removed here) * Return value: the attribute value, or NULL if not present or malformed. */ -char *a_Dpip_get_attr(char *tag, const char *attrname); -char *a_Dpip_get_attr_l(char *tag, size_t tagsize, const char *attrname); +char *a_Dpip_get_attr(const char *tag, const char *attrname); +char *a_Dpip_get_attr_l(const char *tag, size_t tagsize, const char *attrname); int a_Dpip_check_auth(const char *auth); @@ -72,6 +72,13 @@ char *a_Dpip_dsh_read_token(Dsh *dsh); void a_Dpip_dsh_close(Dsh *dsh); void a_Dpip_dsh_free(Dsh *dsh); +#define a_Dpip_dsh_printf(sh, flush, ...) \ + D_STMT_START { \ + Dstr *dstr = dStr_sized_new(128); \ + dStr_sprintf(dstr, __VA_ARGS__); \ + a_Dpip_dsh_write(sh, flush, dstr->str, dstr->len); \ + dStr_free(dstr, 1); \ + } D_STMT_END #ifdef __cplusplus } |