X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=libmodest-dbus-client%2Flibmodest-dbus-client.c;h=183d179c7fce8aca27ffacd51c4fa4cbd1f9d990;hp=19210d3b2155e196d0c213e88f58c11877945943;hb=eeab1fed238484308335d400bcc7c531a48571ed;hpb=aa562c8bc5bec4125180a5d3b940610bd93cf823 diff --git a/libmodest-dbus-client/libmodest-dbus-client.c b/libmodest-dbus-client/libmodest-dbus-client.c index 19210d3..183d179 100644 --- a/libmodest-dbus-client/libmodest-dbus-client.c +++ b/libmodest-dbus-client/libmodest-dbus-client.c @@ -61,60 +61,19 @@ static gchar* get_attachments_string (GSList *attachments) return attachments_str; } - -/* TODO: Is this actually used by anything? - * I guess that everything uses *_compose_mail() instead. murrayc. - */ - + /** - * libmodest_dbus_client_send_mail: + * libmodest_dbus_client_mail_to: * @osso_context: a valid #osso_context_t object. - * @to: The Recipients (From: line) - * @cc: Recipients for carbon copies - * @bcc: Recipients for blind carbon copies - * @subject: Subject line - * @body: The actual body of the mail to send - * @attachments: Additional list of attachments + * @mailto_uri: A mailto URI. * * This function will try to do a remote procedure call (rpc) - * into modest (or start it if necessary) and send a new - * email with the supplied parameters. + * into modest (or start it if necessary) and open a composer + * window with the supplied parameters prefilled. * * Return value: Whether or not the rpc call to modest * was successfull **/ -gboolean -libmodest_dbus_client_send_mail (osso_context_t *osso_context, const gchar *to, const gchar *cc, - const gchar *bcc, const gchar* subject, const gchar* body, GSList *attachments) -{ - gchar *attachments_str = get_attachments_string(attachments); - - osso_rpc_t retval; - const osso_return_t ret = osso_rpc_run_with_defaults(osso_context, - MODEST_DBUS_NAME, - MODEST_DBUS_METHOD_SEND_MAIL, &retval, - DBUS_TYPE_STRING, to, - DBUS_TYPE_STRING, cc, - DBUS_TYPE_STRING, bcc, - DBUS_TYPE_STRING, subject, - DBUS_TYPE_STRING, body, - DBUS_TYPE_STRING, attachments_str, - DBUS_TYPE_INVALID); - - if (ret != OSSO_OK) { - printf("debug: %s: osso_rpc_run() failed.\n", __FUNCTION__); - return FALSE; - } else { - printf("debug: %s: osso_rpc_run() succeeded.\n", __FUNCTION__); - } - - osso_rpc_free_val(&retval); - - g_free (attachments_str); - - return TRUE; -} - gboolean libmodest_dbus_client_mail_to (osso_context_t *osso_context, const gchar *mailto_uri) { @@ -144,8 +103,8 @@ libmodest_dbus_client_mail_to (osso_context_t *osso_context, const gchar *mailto * @cc: Recipients for carbon copies * @bcc: Recipients for blind carbon copies * @subject: Subject line - * @body: The actual body of the mail to send - * @attachments: Additional list of attachments + * @body: The actual body of the mail to compose. + * @attachments: Additional list of attachments. A list of URI strings. * * This function will try to do a remote procedure call (rpc) * into modest (or start it if necessary) and open a composer