Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating Tizen.Messaging.Email APIs #5596

Merged
merged 6 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 3 additions & 0 deletions src/Tizen.Messaging/doc/api/Tizen.Messaging.Email.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

[!NOTE]
All Email APIs have been deprecated since Tizen 8.0 and will be removed after two releases without any alternatives.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Obsolete message says "might be removed" and the note in module documentation says "will be removed". Also, please put the note in the remarks and the note lines in old docfx we are using have to start with >.

Suggested change
[!NOTE]
All Email APIs have been deprecated since Tizen 8.0 and will be removed after two releases without any alternatives.
uid: Tizen.Messaging.Email
summary: The Tizen.Messaging.Email namespace contains classes providing the functionality to send emails.
uid: Tizen.Messaging.Email
summary: The Tizen.Messaging.Email namespace contains classes providing the functionality to send emails.
remarks: |
> [!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.

---