4e32062b2a757e28959debbec5f7cc1afbb904bf
[modest] / src / modest-tny-transport-actions.h
1 /* modest-tny-transport-actions.h */
2 /* insert (c)/licensing information) */
3
4 #ifndef __MODEST_TNY_TRANSPORT_ACTIONS_H__
5 #define __MODEST_TNY_TRANSPORT_ACTIONS_H__
6
7 #include <glib-object.h>
8 #include <tny-transport-account-iface.h>
9
10 G_BEGIN_DECLS
11
12 /* standard convenience macros */
13 #define MODEST_TYPE_TNY_TRANSPORT_ACTIONS             (modest_tny_transport_actions_get_type())
14 #define MODEST_TNY_TRANSPORT_ACTIONS(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TNY_TRANSPORT_ACTIONS,ModestTnyTransportActions))
15 #define MODEST_TNY_TRANSPORT_ACTIONS_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TNY_TRANSPORT_ACTIONS,GObject))
16 #define MODEST_IS_TNY_TRANSPORT_ACTIONS(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TNY_TRANSPORT_ACTIONS))
17 #define MODEST_IS_TNY_TRANSPORT_ACTIONS_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TNY_TRANSPORT_ACTIONS))
18 #define MODEST_TNY_TRANSPORT_ACTIONS_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TNY_TRANSPORT_ACTIONS,ModestTnyTransportActionsClass))
19
20 typedef struct _ModestTnyTransportActions      ModestTnyTransportActions;
21 typedef struct _ModestTnyTransportActionsClass ModestTnyTransportActionsClass;
22
23 struct _ModestTnyTransportActions {
24          GObject parent;
25         /* insert public members, if any */
26 };
27
28 struct _ModestTnyTransportActionsClass {
29         GObjectClass parent_class;
30         /* insert signal callback declarations, eg. */
31         /* void (* my_event) (ModestTnyTransportActions* obj); */
32 };
33
34 /* member functions */
35 GType        modest_tny_transport_actions_get_type    (void) G_GNUC_CONST;
36
37 /* typical parameter-less _new function */
38 /* if this is a kind of GtkWidget, it should probably return at GtkWidget*, */
39 /*    otherwise probably a GObject*. */
40 GObject*    modest_tny_transport_actions_new         (void);
41
42
43 /**
44  * modest_tny_transport_actions_send_message:
45  * @self: a ModestTnyTransportActions object
46  * @transport_account: the TnyTransportAccountIface to use for sending this message
47  * @from: the email address of the sender
48  * @to: the email address of the receiver
49  * @cc: the receivers of a copy of the message (comma-seperated)
50  * @bcc: the receivers of a blind copy of the message (comma-seperated)
51  * @subject: the Subject: of the message
52  * @body: a string containing the message body (text)
53  *
54  * send a email message to @to
55  *
56  * Returns: TRUE but this will change to whether sending was successful
57  */
58 gboolean modest_tny_transport_actions_send_message (ModestTnyTransportActions *self,
59                                                     TnyTransportAccountIface *transport_account,
60                                                     const gchar *from,
61                                                     const gchar *to,
62                                                     const gchar *cc,
63                                                     const gchar *bcc,
64                                                     const gchar *subject,
65                                                     const gchar *body,
66                                                     const GList *attachments_list);
67
68 G_END_DECLS
69
70 #endif /* __MODEST_TNY_TRANSPORT_ACTIONS_H__ */
71