Implement the priority +/- buttons
[milk] / src / milk-cache.c
index 0f65230..891d3ff 100644 (file)
@@ -1434,6 +1434,27 @@ milk_cache_task_delete (MilkCache  *cache,
         return milk_auth_task_delete (priv->auth, timeline, task, error);
 }
 
+char*
+milk_cache_task_set_priority (MilkCache  *cache,
+                              char       *timeline,
+                              RtmTask    *task,
+                              const char *priority,
+                              GError    **error)
+{
+        MilkCachePrivate *priv;
+
+        g_return_val_if_fail (MILK_IS_CACHE (cache), NULL);
+
+        priv = MILK_CACHE_PRIVATE (cache);
+
+        /* FIXME: update the task in the database and mark it as having local
+         * changes; then immediately emit the "task-changed" signal, so the
+         * model will immediately reflect that */
+
+        return milk_auth_task_set_priority (priv->auth, timeline, task,
+                        priority, error);
+}
+
 /* XXX: this won't be necessary when the auth handles this transparently; or at
  * least this will merely be a signal to the auth that we're ready to
  * authenticate when it is */