Skip to content

Commit

Permalink
Deprecating Tizen.Messaging.Email APIs (#5596)
Browse files Browse the repository at this point in the history
* Deprecating Tizen.Messaging.Email APIs

Signed-off-by: Priya Kohli <[email protected]>

* Added using System

Signed-off-by: Priya Kohli <[email protected]>

* Modified Note

Signed-off-by: Priya Kohli <[email protected]>

---------

Signed-off-by: Priya Kohli <[email protected]>
Co-authored-by: randeepsingh01 <[email protected]>
  • Loading branch information
2 people authored and JoonghyunCho committed Oct 27, 2023
1 parent 94b15cd commit 0939c9e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Email/EmailAttachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,28 @@
* limitations under the License.
*/

using System;

namespace Tizen.Messaging.Email
{
/// <summary>
/// Represents an email attachment.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public class EmailAttachment
{
/// <summary>
/// The absolute full path of the file to be attached.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string FilePath { get; set; }
/// <summary>
/// The constructor.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public EmailAttachment()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
* limitations under the License.
*/

using System;

namespace Tizen.Messaging.Email
{
/// <summary>
/// Result of sending the email.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public enum EmailSendResult
{
/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Email/EmailMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Tizen.Messaging.Email
/// This class contains the Messaging API to support sending email messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public class EmailMessage : IDisposable
{
internal IntPtr _emailHandle = IntPtr.Zero;
Expand All @@ -39,6 +40,7 @@ public class EmailMessage : IDisposable
/// The constructor.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public EmailMessage()
{
int ret = Interop.Email.CreateEmail(out _emailHandle);
Expand All @@ -53,6 +55,7 @@ public EmailMessage()
/// The subject of the email message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string Subject
{
set
Expand All @@ -76,6 +79,7 @@ public string Subject
/// The body of the email message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string Body
{
set
Expand All @@ -98,6 +102,7 @@ public string Body
/// The list of file attachments.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public IList<EmailAttachment> Attachments
{
get
Expand All @@ -113,6 +118,7 @@ public IList<EmailAttachment> Attachments
/// The email address should be in the standard format (as described in the Internet standards RFC 5321 and RFC 5322).
/// </remarks>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public ICollection<EmailRecipient> To
{
get
Expand All @@ -128,6 +134,7 @@ public ICollection<EmailRecipient> To
/// The email address should be in the standard format (as described in the Internet standards RFC 5321 and RFC 5322).
/// </remarks>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public ICollection<EmailRecipient> Cc
{
get
Expand All @@ -143,6 +150,7 @@ public ICollection<EmailRecipient> Cc
/// The email address should be in the standard format (as described in the Internet standards RFC 5321 and RFC 5322).
/// </remarks>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public ICollection<EmailRecipient> Bcc
{
get
Expand All @@ -169,6 +177,7 @@ internal void Save()
/// Releases all resources used by the EmailMessage.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public void Dispose()
{
Dispose(true);
Expand All @@ -180,6 +189,7 @@ public void Dispose()
/// </summary>
/// <param name="disposing">Disposing by User</param>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
protected virtual void Dispose(bool disposing)
{
if (_disposed)
Expand Down
5 changes: 5 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Email/EmailRecipient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,28 @@
* limitations under the License.
*/

using System;

namespace Tizen.Messaging.Email
{
/// <summary>
/// This class represents recipients of an email.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public class EmailRecipient
{
/// <summary>
/// The email address of the recipient.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string Address { get; set; }
/// <summary>
/// The constructor.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public EmailRecipient()
{

Expand Down
2 changes: 2 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Email/EmailSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Tizen.Messaging.Email
/// This class is used to send email messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public static class EmailSender
{
static private Dictionary<int, Interop.Email.EmailSentCallback> _sendCbMap = new Dictionary<int, Interop.Email.EmailSentCallback>();
Expand All @@ -35,6 +36,7 @@ public static class EmailSender
/// <param name="email">The email message.</param>
/// <returns> Failure if the email sending activity failed, otherwise Success.</returns>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13")]
public static async Task<EmailSendResult> SendAsync(EmailMessage email)
{
var task = new TaskCompletionSource<EmailSendResult>();
Expand Down
4 changes: 4 additions & 0 deletions src/Tizen.Messaging/doc/api/Tizen.Messaging.Email.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@

uid: Tizen.Messaging.Email
summary: The Tizen.Messaging.Email namespace contains classes providing the functionality to send emails.

> [!NOTE]
> All Email APIs have been deprecated since Tizen 8.0 (API Level 11) which means they are planned to be removed after two releases.

---

0 comments on commit 0939c9e

Please sign in to comment.