Singleton class to get the exact handler (plugin) of the service In case of API with a notebook argument, the plugin to be used is determined calling Notebook::pluginName()
.
More...
#include <servicehandler.h>
|
bool | sendInvitation (const Notebook::Ptr ¬ebook, const KCalendarCore::Incidence::Ptr &invitation, const QString &body) |
| Send the invitation to the list of people stated as attendees.
|
|
bool | sendUpdate (const Notebook::Ptr ¬ebook, const KCalendarCore::Incidence::Ptr &invitation, const QString &body) |
| Send the updated invitation to the list of people stated as attendees.
|
|
bool | sendResponse (const Notebook::Ptr ¬ebook, const KCalendarCore::Incidence::Ptr &invitation, const QString &body) |
| Send the updated invitation to the organiser.
|
|
QString | icon (const QString &serviceId) |
| Icon.
|
|
bool | multiCalendar (const QString &serviceId) |
| multiCalendar
|
|
QString | emailAddress (const Notebook::Ptr ¬ebook) |
| emailAddress Retrieve the email address of the notebook.
|
|
QString | displayName (const Notebook::Ptr ¬ebook) |
| displayName
|
|
int | downloadAttachment (const Notebook::Ptr ¬ebook, const QString &uri, const QString &path) |
| downloadAttachment
|
|
bool | deleteAttachment (const KCalendarCore::Incidence::Ptr &incidence, const Notebook::Ptr ¬ebook, const QString &uri) |
| deleteAttachment
|
|
bool | shareNotebook (const Notebook::Ptr ¬ebook, const QStringList &sharedWith) |
| Share notebook.
|
|
QStringList | sharedWith (const Notebook::Ptr ¬ebook) |
| sharedWith
|
|
QString | defaultNotebook (const QString &productId) |
| Try to get the notebook where to put the invitation.
|
|
ServiceHandler::ErrorCode | error () const |
| In case of error, more detailed information can be provided Sometimes the true/false is not enough, so in case of false more details can be obtained.
|
|
QStringList | availableServices () |
| MultiCalendar services.
|
|
QString | icon (QString serviceId) |
| Get the Icon of a service based on the id of the plugin.
|
|
QString | uiName (QString serviceId) |
| Get the Name to be shown on the UI of a service based on the id of the plugin.
|
|
ServiceInterface * | service (const QString &serviceId) |
| Get the plugin object providing the service.
|
|
Singleton class to get the exact handler (plugin) of the service In case of API with a notebook argument, the plugin to be used is determined calling Notebook::pluginName()
.
◆ ErrorCode
Error Codes that can be returned by the plugins.
Enumerator |
---|
ErrorOk | |
ErrorNoAccount | |
ErrorNotSupported | |
ErrorNoConnectivity | |
ErrorInvalidParameters | |
ErrorInternal | |
◆ availableServices()
QStringList ServiceHandler::availableServices |
( |
| ) |
|
MultiCalendar services.
List available Services There can be many available services. This method returns the ids of the plugins that handle those services.
- Note
- this id can be used in the Notebook creation to "attach" a notebook to a certain service.
- Returns
- list of the ids of the plugins available
◆ defaultNotebook()
QString ServiceHandler::defaultNotebook |
( |
const QString & | productId | ) |
|
Try to get the notebook where to put the invitation.
This is done based on the product Id of the invitation received. (in the iCal file).
- Parameters
-
productId | the id of the generator of the iCal |
- Returns
- a string with the id of the notebook. it can be null
◆ deleteAttachment()
bool ServiceHandler::deleteAttachment |
( |
const KCalendarCore::Incidence::Ptr & | incidence, |
|
|
const Notebook::Ptr & | notebook, |
|
|
const QString & | uri ) |
deleteAttachment
- Parameters
-
incience | incidence of attachment to be deleted |
notebook | notebook |
storage | Pointer to the storage in use |
uri | uri of attachment to be deleted |
- Returns
- True if OK, false in case of error
◆ displayName()
QString ServiceHandler::displayName |
( |
const Notebook::Ptr & | notebook | ) |
|
displayName
- Parameters
-
notebook | notebook |
storage | Pointer to the storage in use |
- Returns
- display name
◆ downloadAttachment()
int ServiceHandler::downloadAttachment |
( |
const Notebook::Ptr & | notebook, |
|
|
const QString & | uri, |
|
|
const QString & | path ) |
downloadAttachment
- Parameters
-
notebook | notebook |
storage | Pointer to the storage in use |
uri | uri of attachment to be downloaded |
path | path whre attachment to be downloaded to |
- Returns
- Id of the attachment download. It will be used to notify changes about it. If < 0 there was an error.
◆ downloadError
void mKCal::ServiceHandler::downloadError |
( |
int | id, |
|
|
ErrorCode | error ) |
|
signal |
Informs that the download is finished with errors.
The id is the return value got when download started
◆ downloadFinished
void mKCal::ServiceHandler::downloadFinished |
( |
int | id | ) |
|
|
signal |
Informs that the download is over.
The id is the return value got when download started
◆ downloadProgress
void mKCal::ServiceHandler::downloadProgress |
( |
int | id, |
|
|
int | percentage ) |
|
signal |
Monitors the progress of the download.
The id is the return value got when download started
◆ emailAddress()
QString ServiceHandler::emailAddress |
( |
const Notebook::Ptr & | notebook | ) |
|
emailAddress Retrieve the email address of the notebook.
◆ error()
In case of error, more detailed information can be provided Sometimes the true/false is not enough, so in case of false more details can be obtained.
- Parameters
-
notebook | notebook |
storage | Pointer to the storage in use |
- Returns
- the ErrorCode of what happened
◆ icon() [1/2]
QString ServiceHandler::icon |
( |
const QString & | serviceId | ) |
|
Icon.
- Parameters
-
serviceId | the name of the service to use |
- Returns
- Icon
◆ icon() [2/2]
QString ServiceHandler::icon |
( |
QString | serviceId | ) |
|
Get the Icon of a service based on the id of the plugin.
- Returns
- Path to the icon
- See also
- availableMulticalendarServices
◆ instance()
Obtain an instance of the ServiceHandler.
- Returns
- The instance that handles all the services
◆ multiCalendar()
bool ServiceHandler::multiCalendar |
( |
const QString & | serviceId | ) |
|
multiCalendar
- Parameters
-
serviceId | the name of the service to use |
- Returns
- True if multicalendar otherwise false
◆ sendInvitation()
bool ServiceHandler::sendInvitation |
( |
const Notebook::Ptr & | notebook, |
|
|
const KCalendarCore::Incidence::Ptr & | invitation, |
|
|
const QString & | body ) |
Send the invitation to the list of people stated as attendees.
- Parameters
-
notebook | notebook to use for account info |
invitation | The Incidence to send |
body | The body of the reply if any |
- Returns
- True if OK, false in case of error
◆ sendResponse()
bool ServiceHandler::sendResponse |
( |
const Notebook::Ptr & | notebook, |
|
|
const KCalendarCore::Incidence::Ptr & | invitation, |
|
|
const QString & | body ) |
Send the updated invitation to the organiser.
- Parameters
-
notebook | notebook to use for account info |
invitation | The Incidence to udpate |
body | The body of the reply if any |
- Returns
- True if OK, false in case of error
◆ sendUpdate()
bool ServiceHandler::sendUpdate |
( |
const Notebook::Ptr & | notebook, |
|
|
const KCalendarCore::Incidence::Ptr & | invitation, |
|
|
const QString & | body ) |
Send the updated invitation to the list of people stated as attendees.
- Parameters
-
notebook | notebook to use for account info |
invitation | The Incidence to udpate |
body | The body of the reply if any |
- Returns
- True if OK, false in case of error
◆ service()
Get the plugin object providing the service.
- Returns
- the plugin object
- See also
- availableMulticalendarServices
◆ sharedWith()
QStringList ServiceHandler::sharedWith |
( |
const Notebook::Ptr & | notebook | ) |
|
sharedWith
- Parameters
-
notebook | notebook |
storage | Pointer to the storage in use |
- Returns
- list of users to share with
◆ shareNotebook()
bool ServiceHandler::shareNotebook |
( |
const Notebook::Ptr & | notebook, |
|
|
const QStringList & | sharedWith ) |
Share notebook.
- Parameters
-
notebook | Shared notebook |
sharedWith | The list of email addresses or phone numbers of users |
storage | Pointer to the storage in use |
- Returns
- True if OK, false in case of error
◆ uiName()
QString ServiceHandler::uiName |
( |
QString | serviceId | ) |
|
Get the Name to be shown on the UI of a service based on the id of the plugin.
- Returns
- Name of the service
- See also
- availableMulticalendarServices
The documentation for this class was generated from the following files: