]> diplodocus.org Git - nmh/blobdiff - h/oauth.h
Escape literal leading full stop in man/new.man.
[nmh] / h / oauth.h
index d1c9c2202c7a6cf05ff29076082fb44f0ee16d0c..ad6bd94054c981d92431f2d27b8fb2e52527262b 100644 (file)
--- a/h/oauth.h
+++ b/h/oauth.h
@@ -105,14 +105,18 @@ struct mh_oauth_service_info {
  * Do the complete dance for XOAUTH2 as used by POP3 and SMTP.
  *
  * Load tokens for svc from disk, refresh if necessary, and return the
- * base64-encoded client response.
+ * client response in client_response and client_response_len.
  *
  * If refreshing, writes freshened tokens to disk.
  *
  * Exits via adios on any error.
+ *
+ * Always returns OK for now, but in the future could return NOTOK on error.
  */
-char *
-mh_oauth_do_xoauth(const char *user, const char *svc, FILE *log);
+
+int
+mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res,
+                  size_t *oauth_res_len, FILE *log);
 
 /*
  * Allocate and initialize a new OAuth context.
@@ -218,7 +222,7 @@ mh_oauth_cred_free(mh_oauth_cred *cred);
  * Never returns NULL.
  */
 const char *
-mh_oauth_cred_fn(mh_oauth_ctx *ctx);
+mh_oauth_cred_fn(const char *svc_name);
 
 /*
  * Serialize OAuth tokens to file.
@@ -254,9 +258,6 @@ mh_oauth_sasl_client_response(size_t *res_len,
  * Retrieve the various entries for the OAuth mechanism
  */
 
-boolean 
+boolean
 mh_oauth_get_service_info(const char *svc_name, mh_oauth_service_info *svcinfo,
                          char *errbuf, size_t errbuflen);
-
-char *
-mh_oauth_node_name_for_svc(const char *entry, const char *svc_name);