Bug 35946

Summary: Need a way to get dates for any contact
Product: Telepathy Reporter: Emilio Pozuelo Monfort <pochu27>
Component: loggerAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED WONTFIX QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: low CC: nicolas, pochu27
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Emilio Pozuelo Monfort 2011-04-04 03:37:57 UTC
tpl_log_manager_get_dates_async() could accept entity = NULL to get dates for any contacts in one account, and both { entity = NULL, account = NULL } to get dates for any contacts in any account.

I need this for "Anyone" in https://bugzilla.gnome.org/show_bug.cgi?id=619866 (see the mockup)
Comment 1 Nicolas Dufresne 2011-04-04 06:38:10 UTC
Adding myself in CC ...

Note that this method is going to take some time to execute (on XML store) as we have to look into each file to see event mask item matches. This problem can be resolved by fixing Bug #35882 . Shall I make those two bugs dependent ?
Comment 2 Nicolas Dufresne 2011-04-06 08:30:39 UTC
I thought about this one, and it's seems quite useless to have a list of dates you can't associate with any account/entity. I think you must elaborate a bit more your use case.
Comment 3 Emilio Pozuelo Monfort 2011-04-06 08:41:55 UTC
This should come with another API to get events for a given date (for all entities). The use case is having 'Anyone' selected in the new history viewer: I need a way to get all the dates, and then a way to get the events when one of those dates is selected.
Comment 4 Nicolas Dufresne 2011-04-06 11:17:37 UTC
(In reply to comment #3)
> This should come with another API to get events for a given date (for all
> entities). The use case is having 'Anyone' selected in the new history viewer:
> I need a way to get all the dates, and then a way to get the events when one of
> those dates is selected.

There a lot of 'I need a' and very few use cases and rational here. I'm trying to push the design further, so please provide more information, don't pull the discussion backward. It's not a bug I need to fix, but a feature you would like to get added.

The current API already provide the feature you are requesting, the only difference is that it requires you to do multiple calls, but it also allow you doing more optimal operations, because you hold all the information that let you later skip certain date for certain account/entity.

Also the Gnome UI design seems to not consider the fact that after several years, the logs will become quite big, and loading all of it like you are doing is not the way to go. Until we have some sort of iterator in the API, all those things need great care, so we don't end up having to support and optimize call that are design non-optimal.
Comment 5 Nicolas Dufresne 2011-04-15 11:55:35 UTC
The use case you are trying to cover is already covered by current API, so I'll simply drop this idea. Also, like entity and contact, a date is useless if not associated with proper account/entity.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.