Support adding a new task from the entry box
[milk] / src / milk-auth.c
index 37343bf..96155c5 100644 (file)
@@ -216,6 +216,24 @@ milk_auth_timeline_create (MilkAuth  *auth,
         return rtm_glib_timelines_create (priv->rtm_glib, error);
 }
 
+RtmTask*
+milk_auth_task_add (MilkAuth    *auth,
+                    char        *timeline,
+                    const char  *name,
+                    GError     **error)
+{
+        MilkAuthPrivate *priv;
+
+        g_return_val_if_fail (MILK_IS_AUTH (auth), NULL);
+
+        priv = MILK_AUTH_PRIVATE (auth);
+
+        /* XXX: this uses Smart Add parsing; make this user-settable? */
+        /* FIXME: the cast to char* is actually a bug in the rtm-glib API */
+        return rtm_glib_tasks_add (priv->rtm_glib, timeline, (char*) name, NULL,
+                        TRUE, error);
+}
+
 char*
 milk_auth_task_complete (MilkAuth  *auth,
                          char      *timeline,