This is squashed commit (sorry -- we'll get better about maintaining a clean history in collaborative branches in the future!) of a massive amount of work from Jim and myself. * EmailIdentifiers for normal (i.e. not outbox, etc.) emails are the same regardless of which folder they came from * New EmailStore interface to manipulate messages that reside in any folder, without having to care what folders are open * Relevant places that manipulate emails (e.g. the toolbar) have been updated to use the new EmailStore interface * Conversation and ImplConversation have been smooshed together * Many, many more items and bugfixes related to the above points
33 lines
1.1 KiB
Vala
33 lines
1.1 KiB
Vala
/* Copyright 2011-2013 Yorba Foundation
|
|
*
|
|
* This software is licensed under the GNU Lesser General Public License
|
|
* (version 2.1 or later). See the COPYING file in this distribution.
|
|
*/
|
|
|
|
[DBus (name = "org.yorba.Geary.Conversation", timeout = 120000)]
|
|
public class Geary.DBus.Conversation : Object {
|
|
|
|
public static const string INTERFACE_NAME = "org.yorba.Geary.Conversation";
|
|
|
|
private Geary.App.Conversation conversation;
|
|
private Geary.Folder folder;
|
|
|
|
public Conversation(Geary.App.Conversation c, Geary.Folder f) {
|
|
conversation = c;
|
|
folder = f;
|
|
}
|
|
|
|
public async ObjectPath[] get_emails() throws IOError {
|
|
Gee.List<Geary.Email> pool = conversation.get_emails(Geary.App.Conversation.Ordering.DATE_ASCENDING);
|
|
if (pool.size == 0)
|
|
return new ObjectPath[0];
|
|
|
|
ObjectPath[] paths = new ObjectPath[0];
|
|
|
|
foreach (Geary.Email e in pool) {
|
|
paths += new ObjectPath(Database.instance.get_email_path(e, folder));
|
|
}
|
|
|
|
return paths;
|
|
}
|
|
}
|