Commit d48871ce authored by Ekta Nandwani's avatar Ekta Nandwani Committed by Debarshi Ray

Introduce org.gnome.OnlineAccounts.Todo

This is meant for accounts that can be used to access to-do lists. eg.,
Todoist.

https://bugzilla.gnome.org/show_bug.cgi?id=780138
parent 41e7e96e
......@@ -246,6 +246,18 @@
-->
<property name="TicketingDisabled" type="b" access="readwrite"/>
<!-- TodoDisabled:
@since: 3.26.0
If %TRUE, the account will not expose any
#org.gnome.OnlineAccounts.Todo interface. If the account does not
provide todo-like capabilities, this property does nothing.
Note that the #org.gnomeOnlineAccounts.Todo interface is added or
removed from the account asynchronously.
-->
<property name="TodoDisabled" type="b" access="readwrite"/>
<!-- ReadLaterDisabled:
@since: 3.12.0
......@@ -779,6 +791,16 @@
<method name="GetTicket"/>
</interface>
<!--
org.gnome.OnlineAccounts.Todo:
@since: 3.26.0
An account object implements this interface if it provides
todo-like capabilities.
-->
<interface name="org.gnome.OnlineAccounts.Todo">
</interface>
<!--
org.gnome.OnlineAccounts.ReadLater:
@since: 3.12.0
......
......@@ -129,6 +129,7 @@
<xi:include href="../src/goa/goa-generated-doc-org.gnome.OnlineAccounts.Exchange.xml"/>
<xi:include href="../src/goa/goa-generated-doc-org.gnome.OnlineAccounts.MediaServer.xml"/>
<xi:include href="../src/goa/goa-generated-doc-org.gnome.OnlineAccounts.Ticketing.xml"/>
<xi:include href="../src/goa/goa-generated-doc-org.gnome.OnlineAccounts.Todo.xml"/>
</chapter>
</part>
......@@ -158,6 +159,7 @@
<xi:include href="xml/GoaExchange.xml"/>
<xi:include href="xml/GoaMediaServer.xml"/>
<xi:include href="xml/GoaTicketing.xml"/>
<xi:include href="xml/GoaTodo.xml"/>
<xi:include href="xml/GoaReadLater.xml"/>
<xi:include href="xml/GoaPrinters.xml"/>
</chapter>
......
......@@ -64,6 +64,7 @@ goa_object_get_photos
goa_object_get_printers
goa_object_get_files
goa_object_get_exchange
goa_object_get_todo
goa_object_peek_manager
goa_object_peek_account
goa_object_peek_oauth_based
......@@ -80,6 +81,7 @@ goa_object_peek_photos
goa_object_peek_printers
goa_object_peek_files
goa_object_peek_exchange
goa_object_peek_todo
GoaObjectProxy
GoaObjectProxyClass
goa_object_proxy_new
......@@ -176,6 +178,8 @@ goa_account_get_files_disabled
goa_account_set_files_disabled
goa_account_get_ticketing_disabled
goa_account_set_ticketing_disabled
goa_account_get_todo_disabled
goa_account_set_todo_disabled
goa_account_call_ensure_credentials
goa_account_call_ensure_credentials_finish
goa_account_call_ensure_credentials_sync
......@@ -1089,6 +1093,47 @@ goa_ticketing_proxy_get_type
goa_ticketing_skeleton_get_type
</SECTION>
<SECTION>
<FILE>GoaTodo</FILE>
GoaTodo
GoaTodoIface
goa_todo_interface_info
goa_todo_override_properties
GoaTodoProxy
GoaTodoProxyClass
goa_todo_proxy_new
goa_todo_proxy_new_finish
goa_todo_proxy_new_sync
goa_todo_proxy_new_for_bus
goa_todo_proxy_new_for_bus_finish
goa_todo_proxy_new_for_bus_sync
GoaTodoSkeleton
GoaTodoSkeletonClass
goa_todo_skeleton_new
<SUBSECTION Standard>
GOA_TYPE_TODO
GOA_IS_TODO
GOA_TODO
GOA_TODO_GET_IFACE
GOA_TYPE_TODO_PROXY
GOA_IS_TODO_PROXY
GOA_IS_TODO_PROXY_CLASS
GOA_TODO_PROXY
GOA_TODO_PROXY_CLASS
GOA_TODO_PROXY_GET_CLASS
GOA_TYPE_TODO_SKELETON
GOA_IS_TODO_SKELETON
GOA_IS_TODO_SKELETON_CLASS
GOA_TODO_SKELETON
GOA_TODO_SKELETON_CLASS
GOA_TODO_SKELETON_GET_CLASS
GoaTodoProxyPrivate
GoaTodoSkeletonPrivate
goa_todo_get_type
goa_todo_proxy_get_type
goa_todo_skeleton_get_type
</SECTION>
<SECTION>
<FILE>GoaReadLater</FILE>
GoaReadLater
......
......@@ -64,6 +64,10 @@ static struct
.feature = GOA_PROVIDER_FEATURE_TICKETING,
.key = "TicketingEnabled"
},
{
.feature = GOA_PROVIDER_FEATURE_TODO,
.key = "TodoEnabled"
},
{
.feature = GOA_PROVIDER_FEATURE_READ_LATER,
.key = "ReadLaterEnabled"
......
......@@ -96,6 +96,7 @@ typedef enum /*< flags >*/
GOA_PROVIDER_FEATURE_PRINTERS = 1 << 11,
GOA_PROVIDER_FEATURE_MAPS = 1 << 12,
GOA_PROVIDER_FEATURE_MUSIC = 1 << 13,
GOA_PROVIDER_FEATURE_TODO = 1 << 14,
GOA_PROVIDER_FEATURE_INVALID = 0
} GoaProviderFeatures;
......
......@@ -232,6 +232,29 @@ goa_object_skeleton_attach_maps (GoaObjectSkeleton *object,
g_clear_object (&maps);
}
void
goa_object_skeleton_attach_todo (GoaObjectSkeleton *object,
gboolean todo_enabled)
{
GoaTodo *todo = NULL;
todo = goa_object_get_todo (GOA_OBJECT (object));
if (todo_enabled)
{
if (todo == NULL)
{
todo = goa_todo_skeleton_new ();
goa_object_skeleton_set_todo (object, todo);
}
}
else
{
if (todo != NULL)
goa_object_skeleton_set_todo (object, NULL);
}
g_clear_object (&todo);
}
void
goa_object_skeleton_attach_read_later (GoaObjectSkeleton *object,
gboolean read_later_enabled)
......
......@@ -58,6 +58,9 @@ void goa_object_skeleton_attach_photos (GoaObjectSkeleton *o
void goa_object_skeleton_attach_printers (GoaObjectSkeleton *object,
gboolean printers_enabled);
void goa_object_skeleton_attach_todo (GoaObjectSkeleton *object,
gboolean todo_enabled);
void goa_object_skeleton_attach_read_later (GoaObjectSkeleton *object,
gboolean read_later_enabled);
......
......@@ -172,6 +172,11 @@ static struct {
.property = "maps-disabled",
.blurb = N_("_Maps"),
},
{
.feature = GOA_PROVIDER_FEATURE_TODO,
.property = "todo-disabled",
.blurb = N_("T_o Do"),
},
{
.feature = GOA_PROVIDER_FEATURE_INVALID,
.property = NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment