diff options
Diffstat (limited to '')
-rw-r--r-- | offapi/com/sun/star/mail/MailAttachment.idl | 59 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/MailException.idl | 41 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/MailMessage.idl | 97 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/MailServiceProvider.idl | 44 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/MailServiceType.idl | 44 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/NoMailServiceProviderException.idl | 44 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/NoMailTransportProviderException.idl | 44 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/SendMailMessageFailedException.idl | 60 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/XAuthenticator.idl | 58 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/XConnectionListener.idl | 62 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/XMailMessage.idl | 144 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/XMailService.idl | 203 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/XMailServiceProvider.idl | 56 | ||||
-rw-r--r-- | offapi/com/sun/star/mail/XSmtpService.idl | 81 |
14 files changed, 1037 insertions, 0 deletions
diff --git a/offapi/com/sun/star/mail/MailAttachment.idl b/offapi/com/sun/star/mail/MailAttachment.idl new file mode 100644 index 000000000..e6b696727 --- /dev/null +++ b/offapi/com/sun/star/mail/MailAttachment.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_MailAttachment_idl__ +#define __com_sun_star_mail_MailAttachment_idl__ + +#include <com/sun/star/datatransfer/XTransferable.idl> + +module com { module sun { module star { module mail { + +/** + A MailAttachment specifies a mail message attachment. + + @see ::com::sun::star::mail::XMailMessage + + @since OOo 2.0 +*/ +struct MailAttachment +{ + /** + The actual data which should be attached to a mail message. + It is expected that the transferable delivers the data as + sequence of bytes. Although a transferable may support + multiple data flavors only the first data flavor supplied + will be used to retrieve the data and it is expected that + the type of the data is a sequence of bytes. + + @see ::com::sun::star::datatransfer::XTransferable + */ + ::com::sun::star::datatransfer::XTransferable Data; + + /** + The name of the attachment as seen by the recipient of the + mail message. ReadableName must not be empty. + */ + string ReadableName; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/MailException.idl b/offapi/com/sun/star/mail/MailException.idl new file mode 100644 index 000000000..e9bd503f1 --- /dev/null +++ b/offapi/com/sun/star/mail/MailException.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_MailException_idl__ +#define __com_sun_star_mail_MailException_idl__ + +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module mail { + +/** + An MailException is the base of all mail related + exceptions. + + @since OOo 2.0 + */ +exception MailException: com::sun::star::uno::Exception +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/MailMessage.idl b/offapi/com/sun/star/mail/MailMessage.idl new file mode 100644 index 000000000..ca4d9ac2e --- /dev/null +++ b/offapi/com/sun/star/mail/MailMessage.idl @@ -0,0 +1,97 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_MailMessage_idl__ +#define __com_sun_star_mail_MailMessage_idl__ + +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/mail/MailAttachment.idl> +#include <com/sun/star/datatransfer/XTransferable.idl> + +module com { module sun { module star { module mail { + +interface XMailMessage; + +/** + @since OOo 2.0 + */ +service MailMessage: XMailMessage +{ + /** + Constructs an instance of a mail message. + + @param sTo + [in] the e-mail address of the recipient. + The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + + @param sFrom + [in] the e-mail address of the sender of this mail message. + The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + + @param sSubject + [in] the subject of the mail message. + + @param xBody + [in] the body of the mail message. It is expected that the + transferable delivers the data as a string. Although a + transferable may support multiple data flavors only the + first data flavor supplied will be used to retrieve the data + and it is expected that the data will be provided as a string. + + @see com::sun::star::mail::XMailMessage + @see com::sun::star::datatransfer::XTransferable + */ + create([in] string sTo, [in] string sFrom, [in] string sSubject, [in] com::sun::star::datatransfer::XTransferable xBody); + + /** + Constructs an instance of a mail message. + + @param sTo + [in] the e-mail address of the recipient. + The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + + @param sFrom + [in] the e-mail address of the sender of this mail message. + The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + + @param sSubject + [in] the subject of the mail message. + + @param xBody + [in] the body of the mail message. It is expected that the + transferable delivers the data as a string. Although a + transferable may support multiple data flavors only the + first data flavor supplied will be used to retrieve the data + and it is expected that the data will be provided as a string. + + @param aMailAttachment + [in] specifies an attachment which should be send with this mail message. + + @see com::sun::star::mail::XMailMessage + @see com::sun::star::datatransfer::XTransferable + @see com::sun::star::mail::MailAttachment + */ + createWithAttachment([in] string sTo, [in] string sFrom, [in] string sSubject, [in] com::sun::star::datatransfer::XTransferable xBody, [in] MailAttachment aMailAttachment); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/MailServiceProvider.idl b/offapi/com/sun/star/mail/MailServiceProvider.idl new file mode 100644 index 000000000..0dc0f06fd --- /dev/null +++ b/offapi/com/sun/star/mail/MailServiceProvider.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_MailServiceProvider_idl__ +#define __com_sun_star_mail_MailServiceProvider_idl__ + +#include <com/sun/star/mail/XMailServiceProvider.idl> + +module com { module sun { module star { module mail { + +/** + @since OOo 2.0 + */ +service MailServiceProvider: XMailServiceProvider +{ + /** + Creation method. + + @see com::sun::star::mail::XMailServiceProvider + */ + create(); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/MailServiceType.idl b/offapi/com/sun/star/mail/MailServiceType.idl new file mode 100644 index 000000000..46a38e584 --- /dev/null +++ b/offapi/com/sun/star/mail/MailServiceType.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_MailServiceType_idl__ +#define __com_sun_star_mail_MailServiceType_idl__ + +module com { module sun { module star { module mail { + +/** + @since OOo 2.0 + */ +enum MailServiceType +{ + /** A SMTP service */ + SMTP, + + /** A POP3 service */ + POP3, + + /** A IMAP service */ + IMAP +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/NoMailServiceProviderException.idl b/offapi/com/sun/star/mail/NoMailServiceProviderException.idl new file mode 100644 index 000000000..3a3827b9f --- /dev/null +++ b/offapi/com/sun/star/mail/NoMailServiceProviderException.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_NoMailServiceProviderException_idl__ +#define __com_sun_star_mail_NoMailServiceProviderException_idl__ + +#include <com/sun/star/mail/MailException.idl> + +module com { module sun { module star { module mail { + +/** + A NoMailServiceProviderException will be thrown if an + appropriate provider for requested mail service could not be found or + could not be created. + + @see com::sun::star::mail::MailService + + @since OOo 2.0 + */ +exception NoMailServiceProviderException: com::sun::star::mail::MailException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/NoMailTransportProviderException.idl b/offapi/com/sun/star/mail/NoMailTransportProviderException.idl new file mode 100644 index 000000000..6a45dd177 --- /dev/null +++ b/offapi/com/sun/star/mail/NoMailTransportProviderException.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_NoMailTransportProviderException_idl__ +#define __com_sun_star_mail_NoMailTransportProviderException_idl__ + +#include <com/sun/star/mail/MailException.idl> + +module com { module sun { module star { module mail { + +/** + A NoMailTransportProviderException will be thrown if an + appropriate provider for sending mail messages could not be found or + could not be created. + + @see com::sun::star::mail::MailServer + + @since OOo 2.0 + */ +exception NoMailTransportProviderException: com::sun::star::mail::MailException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/SendMailMessageFailedException.idl b/offapi/com/sun/star/mail/SendMailMessageFailedException.idl new file mode 100644 index 000000000..db63276ed --- /dev/null +++ b/offapi/com/sun/star/mail/SendMailMessageFailedException.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_SendMailMessageFailedException_idl__ +#define __com_sun_star_mail_SendMailMessageFailedException_idl__ + +#include <com/sun/star/mail/MailException.idl> + +module com { module sun { module star { module mail { + +/** + A SendFailedException will be thrown if a mail message + could not be sent because the e-mail addresses of some + recipients are invalid. E-mail addresses have to conform + to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + + @see com::sun::star::mail::XMailService + + @since OOo 2.0 + */ +exception SendMailMessageFailedException: com::sun::star::mail::MailException +{ + /** + The addresses which are invalid because they do not conform + to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + */ + sequence<string> InvalidAddresses; + + /** + The addresses to which the mail message was sent successfully. + */ + sequence<string> ValidSentAddresses; + + /** + The addresses which are valid but to which the message was not sent. + */ + sequence<string> ValidUnsentAddresses; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/XAuthenticator.idl b/offapi/com/sun/star/mail/XAuthenticator.idl new file mode 100644 index 000000000..0beb10ef7 --- /dev/null +++ b/offapi/com/sun/star/mail/XAuthenticator.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_XAuthenticator_idl__ +#define __com_sun_star_mail_XAuthenticator_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module mail { + +/** + Represents an interface that will be used to query for user + information which are necessary to login to a network resource. + An implementation of this interface may for instance show a + dialog to query the user for the necessary data. + + @since OOo 2.0 + */ +interface XAuthenticator: ::com::sun::star::uno::XInterface { + + /** + Will be called when the user name is needed. + + @returns + the user name. + */ + string getUserName(); + + /** + Will be called when the password of the user is needed. + + @returns + the password of the user. + */ + string getPassword(); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/XConnectionListener.idl b/offapi/com/sun/star/mail/XConnectionListener.idl new file mode 100644 index 000000000..1d351c3a5 --- /dev/null +++ b/offapi/com/sun/star/mail/XConnectionListener.idl @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_XConnectionListener_idl__ +#define __com_sun_star_mail_XConnectionListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/lang/EventObject.idl> + +module com { module sun { module star { module mail { + +/** + The listener interface for connection events. + + @see com::sun::star::mail::XMailService + + @since OOo 2.0 + */ +interface XConnectionListener: ::com::sun::star::lang::XEventListener { + + /** + Invoked when the connection to the mail server is established. + + @param aEvent + [in] specific information regarding this event. + + @see com::sun::star::lang::EventObject + */ + void connected([in] com::sun::star::lang::EventObject aEvent); + + /** + Invoked when the connection to the mail server is closed. + + @param aEvent + [in] specific information regarding this event. + + @see com::sun::star::lang::EventObject + */ + void disconnected([in] com::sun::star::lang::EventObject aEvent); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/XMailMessage.idl b/offapi/com/sun/star/mail/XMailMessage.idl new file mode 100644 index 000000000..e9c2d4c77 --- /dev/null +++ b/offapi/com/sun/star/mail/XMailMessage.idl @@ -0,0 +1,144 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_XMailMessage_idl__ +#define __com_sun_star_mail_XMailMessage_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/mail/MailAttachment.idl> +#include <com/sun/star/datatransfer/XTransferable.idl> + +module com { module sun { module star { module mail { + +/** + Represents a mail message. + + @see com::sun::star::mail::XMailService + + @since OOo 2.0 + */ +interface XMailMessage: ::com::sun::star::uno::XInterface { + + /** + The display name of the sender of this mail message. + */ + [attribute, readonly] string SenderName; + /** + The e-mail address of the sender of this mail message. + The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + */ + [attribute, readonly] string SenderAddress; + + /** + The e-mail address where replies on this mail message should be sent to. + If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a> + sending the mail message later will fail. + If no ReplyToAddress is set replies go to the SenderAddress. + */ + [attribute] string ReplyToAddress; + + /** + Add a recipients e-mail address to the list of recipients of this mail message. + If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a> + sending the mail message will fail. + + @param sRecipientAddress + [in] the e-mail address of the recipient. + */ + void addRecipient([in] string sRecipientAddress); + + /** + Add a Cc recipients e-mail address to the list of recipients of this mail message. + If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a> + sending the mail message will fail. + + @param sRecipientAddress + [in] the e-mail address of the Cc recipient. + */ + void addCcRecipient([in] string sRecipientAddress); + + /** + Add a BCC recipients e-mail address to the list of recipients of this mail message. + If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a> + sending the mail message will fail. + + @param sRecipientAddress + [in] the e-mail address of the BCC recipient. + */ + void addBccRecipient([in] string sRecipientAddress); + + /** + Return a sequence of the e-mail addresses of all recipients of + this mail message. + */ + sequence<string> getRecipients(); + + /** + Return a sequence of the e-mail addresses of all the Cc recipients + of this mail message. + */ + sequence<string> getCcRecipients(); + + /** + Return a sequence of the e-mail addresses of all the BCC recipients + of this mail message. + */ + sequence<string> getBccRecipients(); + + /** + The subject of a mail message. + */ + [attribute] string Subject; + + /** + The body of the mail message. + It is expected that the transferable delivers the data as + a string. Although a transferable may support multiple + data flavors only the first data flavor supplied will be + used to retrieve the data and it is expected that the data + will be provided as a string. + + @see com::sun::star::datatransfer::XTransferable + */ + [attribute] com::sun::star::datatransfer::XTransferable Body; + + /** + Add a file attachment to a mail message. + + param aMailAttachment + [in] specifies a file which should be attached to this mail message. + + @see com::sun::star::mail::MailAttachment + */ + void addAttachment([in] MailAttachment aMailAttachment); + + /** + Return a sequence of MailAttachment's that will + be attached to this mail message. + + @see com::sun::star::mail::MailAttachment + */ + sequence<MailAttachment> getAttachments(); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/XMailService.idl b/offapi/com/sun/star/mail/XMailService.idl new file mode 100644 index 000000000..dc6187f8b --- /dev/null +++ b/offapi/com/sun/star/mail/XMailService.idl @@ -0,0 +1,203 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_XMailService_idl__ +#define __com_sun_star_mail_XMailService_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/mail/XAuthenticator.idl> +#include <com/sun/star/auth/AuthenticationFailedException.idl> +#include <com/sun/star/io/AlreadyConnectedException.idl> +#include <com/sun/star/io/NotConnectedException.idl> +#include <com/sun/star/io/UnknownHostException.idl> +#include <com/sun/star/io/NoRouteToHostException.idl> +#include <com/sun/star/io/ConnectException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/mail/XConnectionListener.idl> +#include <com/sun/star/mail/MailException.idl> +#include <com/sun/star/uno/XCurrentContext.idl> + + +module com { module sun { module star { module mail { + +/** + Represents a mail server abstraction. + + @since OOo 2.0 + */ +interface XMailService: ::com::sun::star::uno::XInterface { + + /** + Returns all connection types which are supported to + connect to the mail service. At least support insecure + connections must be supported. Currently defined + connection types are (the values should be handled + case insensitive): + "Insecure" - insecure connections + "SSL" - Secure Socket Layer 2.0/3.0 based connection + + @returns + a sequence of supported connection types. + */ + sequence<string> getSupportedConnectionTypes(); + + /** + Register a connection listener. + + @param xListener + [in] a listener that will be informed about connection events. + + @see com::sun::star::mail::XConnectionListener + */ + void addConnectionListener([in] XConnectionListener xListener); + + /** + Unregister a connection listener. + + @param xListener + [in] a listener that no longer need to be informed about connection events. + + @see com::sun::star::mail::XConnectionListener + */ + void removeConnectionListener([in] XConnectionListener xListener); + + /** + Return the context of the current connection. The context + contains information like the server name, port, connection type + etc. + + @pre + <code>isConnected</code> returns true. + + @returns + the current connection context. + + @throws com::sun::star::io::NotConnectedException + if no connection is currently established. + + @see com::sun::star::mail::connectUser + @see com::sun::star::io::NotConnectedException + */ + com::sun::star::uno::XCurrentContext getCurrentConnectionContext() + raises(com::sun::star::io::NotConnectedException); + + /** + Connect to a mail service. Only one connection to a mail service + can be established at a time. + + @param xConnectionContext + [in] an interface used to query for connection related information. + The context must contain the following values: + <ul> + <li> + <b>ServerName</b> of type 'string'. + </li> + <li> + <b>Port</b> of type 'long'. + </li> + <li> + <b>ConnectionType</b> of type 'string'. + A list of supported connection types can be queried using + getSupportedConnectionTypes(). + </li> + <li> + <b>Timeout</b> of type 'long' (Optional). + Specifies a timeout in seconds for blocking operations, + like the connection attempt. + </li> + </ul> + + @param xAuthenticator + [in] an interface used to query for the necessary user information + needed to login to the mail server. If no authentication is required + the xAuthenticator must return an empty user name and an empty password. + + @throws com::sun::star::lang::IllegalArgumentException + if the provided connection context contains invalid values or + misses required connection parameters. + + @throws com::sun::star::io::AlreadyConnectedException + on a try to connect to an already connect mail server. + + @throws com::sun::star::io::UnknownHostException + usually if the IP address of the mail server could not be + determined. Possible causes are a broken network connection, + a wrong server name, an unreachable DNS server, etc. + + @throws com::sun::star::io::NoRouteToHostException + if an error occurred to connect to the remote mail server. + Typically the remote mail server cannot be reach because of an + intervening firewall, or if an intermediate router is down, + the network connection is broken, etc. + + @throws com::sun::star::io::ConnectException + if an error occurred while attempting to connect to the remote + mail server. Typically the connection was refused remotely, + because the mail server is not listening on the remote address/port. + + @throws com::sun::star::auth::AuthenticationException + if the specified user could not be logged in. + + @throws com::sun::star::mail::MailException + for other errors during login. + + @see com::sun::star::uno::XCurrentContext + @see com::sun::star::mail::XAuthenticator + @see com::sun::star::lang::IllegalArgumentException + @see com::sun::star::io::AlreadyConnectedException + @see com::sun::star::io::UnknownHostException + @see com::sun::star::io::NoRouteToHostException + @see com::sun::star::io::ConnectException + @see com::sun::star::auth::AuthenticationException + @see com::sun::star::mail::IllegalStateException + @see com::sun::star::mail::MailException + */ + void connect([in] com::sun::star::uno::XCurrentContext xConnectionContext, [in] XAuthenticator xAuthenticator) + raises(com::sun::star::lang::IllegalArgumentException, + com::sun::star::io::AlreadyConnectedException, + com::sun::star::io::UnknownHostException, + com::sun::star::io::NoRouteToHostException, + com::sun::star::io::ConnectException, + com::sun::star::auth::AuthenticationFailedException, + com::sun::star::mail::MailException); + + /** + Disconnect from a mail service. + + @throws com::sun::star::mail::MailException + if errors occur during disconnecting. + */ + void disconnect() + raises(com::sun::star::mail::MailException); + + /** + Returns whether a connection to a mail service + currently exist or not. + + @returns + `TRUE` if a connection to a mail service is established. + */ + boolean isConnected(); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/XMailServiceProvider.idl b/offapi/com/sun/star/mail/XMailServiceProvider.idl new file mode 100644 index 000000000..91337f851 --- /dev/null +++ b/offapi/com/sun/star/mail/XMailServiceProvider.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_XMailServiceProvider_idl__ +#define __com_sun_star_mail_XMailServiceProvider_idl__ + +#include <com/sun/star/mail/XMailService.idl> +#include <com/sun/star/mail/NoMailServiceProviderException.idl> +#include <com/sun/star/mail/MailServiceType.idl> + +module com { module sun { module star { module mail { + +/** + A factory for creating different mail services. + + @since OOo 2.0 + */ +interface XMailServiceProvider: ::com::sun::star::uno::XInterface { + + /** + A factory method. + + @param aType + [in] the type of the requested mail service. + + @returns + A XMailService interface. + + @see com::sun::star::mail::XMailServiceProvider + @see com::sun::star::mail::MailServiceType + */ + XMailService create([in] MailServiceType aType) + raises(com::sun::star::mail::NoMailServiceProviderException, com::sun::star::uno::Exception); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/mail/XSmtpService.idl b/offapi/com/sun/star/mail/XSmtpService.idl new file mode 100644 index 000000000..e415ac0b6 --- /dev/null +++ b/offapi/com/sun/star/mail/XSmtpService.idl @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_mail_XSmtpService_idl__ +#define __com_sun_star_mail_XSmtpService_idl__ + +#include <com/sun/star/mail/XMailService.idl> +#include <com/sun/star/mail/XMailMessage.idl> +#include <com/sun/star/io/NotConnectedException.idl> +#include <com/sun/star/io/ConnectException.idl> +#include <com/sun/star/mail/MailException.idl> +#include <com/sun/star/mail/SendMailMessageFailedException.idl> +#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl> + +module com { module sun { module star { module mail { + +/** + Represents a SMTP service abstraction. + + @see com::sun::star::mail::XMailService + @see com::sun::star::mail::XMailMessage + + @since OOo 2.0 + */ +interface XSmtpService: ::com::sun::star::mail::XMailService { + + /** + Send a mail message to its recipients. + + @param xMailMessage + [in] the mail message to be sent. + + @throws com::sun::star::io::NotConnectedException + if no user is currently connected to the mail server. + + @throws com::sun::star::mail::SendMailMessageFailedException + if the message could not be sent because of invalid recipient + addresses. The e-mail addresses of recipients have to conform to + <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>. + + @throws com::sun::star::mail::MailException + is thrown on other errors that may happen during sending. + A possible reason may be for instance that a file attachment + specified in a mail message could not be found or accessed. + + @throws com::sun::star::datatransfer::UnsupportedFlavorException + is thrown when the body of the mail message is provided in an + unsupported mime content type or may be thrown if one of the file + attachments specifies an unsupported mime content type. + + @see com::sun::star::mail::XMailMessage + @see com::sun::star::io::NotConnectedException + @see com::sun::star::mail::SendMailMessageFailedException + @see com::sun::star::mail::MailException + @see com::sun::star::datatransfer::UnsupportedFlavorException + */ + void sendMailMessage([in] XMailMessage xMailMessage) + raises(com::sun::star::io::NotConnectedException, com::sun::star::mail::SendMailMessageFailedException, com::sun::star::mail::MailException, com::sun::star::datatransfer::UnsupportedFlavorException); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |