Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ConnectionInterfaceMailNotificationAdaptor Class Reference

#include <TelepathyQt/_gen/svc-connection.h>

Inherits Tp::AbstractAdaptor.

Public Slots

Tp::MailURL RequestInboxURL (const QDBusMessage &dbusMessage)
 
Tp::MailURL RequestMailURL (const QString &ID, const QDBusVariant &URLData, const QDBusMessage &dbusMessage)
 

Signals

void MailsReceived (const Tp::MailList &mails)
 
void UnreadMailsChanged (uint count, const Tp::MailList &mailsAdded, const QStringList &mailsRemoved)
 

Public Member Functions

uint MailNotificationFlags () const
 
uint UnreadMailCount () const
 
Tp::MailList UnreadMails () const
 
QString MailAddress () const
 
- Public Member Functions inherited from Tp::AbstractAdaptor
 AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
 
 ~AbstractAdaptor ()
 
QDBusConnection dbusConnection () const
 
QObject * adaptee () const
 

Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Connection.Interface.MailNotification".

Member Function Documentation

uint Tp::Service::ConnectionInterfaceMailNotificationAdaptor::MailNotificationFlags ( ) const

Return the value of the exported D-Bus object property MailNotificationFlags of type uint.

Adaptees should export this property as a Qt property named 'mailNotificationFlags' with type uint.

Integer representing the bitwise-OR of supported features for e-mails notification on this server. This property MUST NOT change after the Connection becomes CONNECTED. This property indicates the behavior and availability of the other properties and signals within this interface. A connection manager that cannot at least set one of the flags in the Mail_Notification_Flags SHOULD NOT provide this interface.

Returns
The value of exported property MailNotificationFlags.
uint Tp::Service::ConnectionInterfaceMailNotificationAdaptor::UnreadMailCount ( ) const

Return the value of the exported D-Bus object property UnreadMailCount of type uint.

Adaptees should export this property as a Qt property named 'unreadMailCount' with type uint.

The number of unread messages in the Inbox. Change notification is via UnreadMailsChanged() .

This property is only useful if Supports_Unread_Mail_Count is set in the MailNotificationFlags ; otherwise, it MUST be zero.

If Thread_Based appears in the MailNotificationFlags , this property counts the number of threads, not the number of mails.

Note that this count MAY be bigger than the number of items in UnreadMails . See UnreadMails for more details.

Returns
The value of exported property UnreadMailCount.
Tp::MailList Tp::Service::ConnectionInterfaceMailNotificationAdaptor::UnreadMails ( ) const

Return the value of the exported D-Bus object property UnreadMails of type Tp::MailList.

Adaptees should export this property as a Qt property named 'unreadMails' with type Tp::MailList.

An array of unread Mails. Change notification is via UnreadMailsChanged. This property is only useful if Supports_Unread_Mails is set in MailNotificationFlags; otherwise, it MUST be an empty list. The array size MAY be shorter than UnreadMailCount. Some servers may limits the amount of detailed e-mails sent. This can significantly reduce the network traffic for large inbox. For this reason, it is normal that UnreadMailCount be bigger or equal to the size of this array.

Returns
The value of exported property UnreadMails.
QString Tp::Service::ConnectionInterfaceMailNotificationAdaptor::MailAddress ( ) const

Return the value of the exported D-Bus object property MailAddress of type QString.

Adaptees should export this property as a Qt property named 'mailAddress' with type QString.

A string representing the e-mail address of the account. The CMs MUST provide this information. In close integration of MailNotification with other e-mail services, the e-mail address can be used has a unique identifier for the account. Possible integration could be between Telepathy and Evolution where the e-mail address is the common information in both interfaces.

Returns
The value of exported property MailAddress.
Tp::MailURL Tp::Service::ConnectionInterfaceMailNotificationAdaptor::RequestInboxURL ( const QDBusMessage &  dbusMessage)
slot

Begins a call to the exported D-Bus method RequestInboxURL on this object.

Adaptees should export this method as a Qt slot with the following signature: void requestInboxURL(const Tp::Service::ConnectionInterfaceMailNotificationAdaptor::RequestInboxURLContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

This method creates and returns a URL and an optional POST data that allow opening the Inbox folder of a webmail account. This URL MAY contain tokens with a short lifetime, so clients SHOULD request a new URL for each visit to the webmail interface. This method is implemented only if the Supports_Request_Inbox_URL flag is set in MailNotificationFlags. We are not using properties here because the tokens are unsuitable for sharing between clients, and network round-trips may be required to obtain the information that leads to authentication free webmail access.

Returns
A struture containing a URL and optional additional data to open a 
webmail client, without re-authentication if possible.
Tp::MailURL Tp::Service::ConnectionInterfaceMailNotificationAdaptor::RequestMailURL ( const QString &  ID,
const QDBusVariant &  URLData,
const QDBusMessage &  dbusMessage 
)
slot

Begins a call to the exported D-Bus method RequestMailURL on this object.

Adaptees should export this method as a Qt slot with the following signature: void requestMailURL(const QString& ID, const QDBusVariant& URLData, const Tp::Service::ConnectionInterfaceMailNotificationAdaptor::RequestMailURLContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

This method creates and returns a URL and optional POST data that allow opening a specific mail in a webmail interface. This method is implemented only if Supports_Request_Mail_URL flag is set in MailNotificationFlags. See RequestInboxURL for design rationale.

Parameters
ID
The mail&apos;s id as found in the Mail structure, or the empty 
string if no id key was provided.
URLData
Whatever url-data was found in the Mail structure, or the boolean 
value False (D-Bus type &apos;b&apos;) if no url-data was provided 
in the Mail.
Returns
A struture that contains a URL and optional additional data to open 
a webmail client, without re-authentication if possible.
void Tp::Service::ConnectionInterfaceMailNotificationAdaptor::MailsReceived ( const Tp::MailList mails)
signal

Represents the exported D-Bus signal MailsReceived on this object.

Adaptees should export this signal as a Qt signal with the following signature: void mailsReceived(const Tp::MailList& mails);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters
mails

An array of Mails. Those e-mail MUST NOT have the "id" key.

On connections that emit this signal, it's impossible to tell when a mail has been removed, and hence when "id" has become invalid.

void Tp::Service::ConnectionInterfaceMailNotificationAdaptor::UnreadMailsChanged ( uint  count,
const Tp::MailList mailsAdded,
const QStringList &  mailsRemoved 
)
signal

Represents the exported D-Bus signal UnreadMailsChanged on this object.

Adaptees should export this signal as a Qt signal with the following signature: void unreadMailsChanged(uint count, const Tp::MailList& mailsAdded, const QStringList& mailsRemoved);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters
count
Number of unread messages in the inbox (the new value of 
UnreadMailCount).
mailsAdded

A list of Mail that are being added or updated in \\\ \\link requestPropertyUnreadMails() UnreadMails \\endlink \\htmlonly .

Mails may be updated when the URL information (URL and POST data) have changed, or senders were added or removed from an e-mail thread.

If the Supports_Unread_Mails flag is not set, this list MUST be empty, even if Count has increased.

Parameters
mailsRemoved
A list of e-mail IDs that are being removed from UnreadMails. If 
the Supports_Unread_Mails flag is not set, this list MUST be empty, 
even if Count has decreased.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7