Skip to content

Commit

Permalink
Deprecating Tizen.Messaging.Messages APIs (#5593)
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kant Jaju <[email protected]>
Co-authored-by: randeepsingh01 <[email protected]>
  • Loading branch information
2 people authored and hinohie committed Oct 25, 2023
1 parent b1d97b3 commit 7bf9836
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Messages/CBMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Tizen.Messaging.Messages
/// This class represents the cell broadcast messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class CBMessage : Message
{
internal CBMessage(IntPtr messageHandle) : base(messageHandle)
Expand Down
9 changes: 9 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Messages/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Tizen.Messaging.Messages
/// This class represents all the messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public abstract class Message : IDisposable
{
internal IntPtr _messageHandle = IntPtr.Zero;
Expand Down Expand Up @@ -72,6 +73,7 @@ internal void FillHandle()
/// Releases all resources used by the Message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public void Dispose()
{
Dispose(true);
Expand Down Expand Up @@ -189,6 +191,7 @@ private void GetAllAddresses()
/// After creating the Message object, the default value of this property is 0. After sending, this value is changed.
/// </remarks>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public int Id
{
get
Expand All @@ -208,6 +211,7 @@ public int Id
/// The destination port of the message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public int Port
{
get
Expand All @@ -227,6 +231,7 @@ public int Port
/// The message box type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MessageBoxType BoxType
{
get
Expand Down Expand Up @@ -255,6 +260,7 @@ public MessageBoxType BoxType
/// The text of the message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public string Text
{
get
Expand Down Expand Up @@ -283,6 +289,7 @@ public string Text
/// The time of the message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public DateTime Time
{
get
Expand Down Expand Up @@ -311,6 +318,7 @@ public DateTime Time
/// The SIM slot index of the message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public SimSlotId SimId
{
get
Expand Down Expand Up @@ -339,6 +347,7 @@ public SimSlotId SimId
/// Indicates the sender of the message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public IReadOnlyCollection<MessagesAddress> From
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Tizen.Messaging.Messages
/// An extended EventArgs class, which contains a received message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class MessageReceivedEventArgs : EventArgs
{
private Message _message;
Expand All @@ -35,6 +36,7 @@ internal MessageReceivedEventArgs(Message message)
/// The received message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public Message ReceivedMessage
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;

namespace Tizen.Messaging.Messages
{
/// <summary>
/// This class is used to manage the information of the message address.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class MessagesAddress
{
internal RecipientType Type;
Expand All @@ -34,6 +36,7 @@ public class MessagesAddress
/// </summary>
/// <param name="number">The recipient's address to receive a message.</param>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MessagesAddress(string number)
{
Number = number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;

namespace Tizen.Messaging.Messages
{
/// <summary>
/// This class is used to manage the information of the message attachment.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class MessagesAttachment
{
/// <summary>
/// The media type of the attachment.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MediaType Type { get; }

/// <summary>
/// The file path of the attachment.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public string FilePath { get; }

/// <summary>
Expand All @@ -40,6 +44,7 @@ public class MessagesAttachment
/// <param name="type">The attachment's type.</param>
/// <param name="filePath">The file path to attach.</param>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MessagesAttachment(MediaType type, string filePath)
{
Type = type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;

namespace Tizen.Messaging.Messages
{
/// <summary>
/// Enumeration for the result of sending a message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public enum SentResult
{
/// <summary>
Expand All @@ -36,6 +38,7 @@ public enum SentResult
/// Enumeration for the message type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public enum MessageType
{
/// <summary>
Expand Down Expand Up @@ -64,6 +67,7 @@ public enum MessageType
/// Enumeration for the message box type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public enum MessageBoxType
{
/// <summary>
Expand Down Expand Up @@ -92,6 +96,7 @@ public enum MessageBoxType
/// Enumeration for the SIM slot index of a message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public enum SimSlotId
{
/// <summary>
Expand Down Expand Up @@ -135,6 +140,7 @@ internal enum RecipientType
/// Enumeration for the attachment type for the MMS messaging.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public enum MediaType
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Tizen.Messaging.Messages
/// </summary>
/// <privilege>http://tizen.org/privilege/message.read</privilege>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public static class MessagesManager
{
/// <summary>
Expand All @@ -39,6 +40,7 @@ public static class MessagesManager
/// <exception cref="ArgumentException">Thrown when input coordinates are invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have proper privileges.</exception>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public static Task<SentResult> SendMessageAsync(Message message, bool saveToSentbox)
{
return MessagesManagerImpl.Instance.SendMessageAsync(message, saveToSentbox);
Expand All @@ -56,6 +58,7 @@ public static Task<SentResult> SendMessageAsync(Message message, bool saveToSent
/// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have proper privileges.</exception>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public static Task<IEnumerable<Message>> SearchMessageAsync(MessagesSearchFilter filter)
{
return MessagesManagerImpl.Instance.SearchMessageAsync(filter);
Expand All @@ -66,6 +69,7 @@ public static Task<IEnumerable<Message>> SearchMessageAsync(MessagesSearchFilter
/// </summary>
/// <privilege>http://tizen.org/privilege/message.read</privilege>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
static public event EventHandler<MessageReceivedEventArgs> MessageReceived
{
add
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;

namespace Tizen.Messaging.Messages
{
/// <summary>
/// This class represents message search filters.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class MessagesSearchFilter
{
/// <summary>
/// Creates a search filter for searching messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MessagesSearchFilter()
{
}
Expand All @@ -34,21 +37,25 @@ public MessagesSearchFilter()
/// The message box type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MessageBoxType MessageBoxType { get; set; }
/// <summary>
/// The message type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MessageType MessageType { get; set; }
/// <summary>
/// The keyword to search in the text and the subject.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public string TextKeyword { get; set; }
/// <summary>
/// The recipient address.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public string AddressKeyword { get; set; }
}
}
7 changes: 7 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Messages/MmsMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace Tizen.Messaging.Messages
/// This class represents multimedia messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class MmsMessage : Message
{
private IList<MessagesAttachment> _attachment = new List<MessagesAttachment>();
Expand All @@ -31,6 +32,7 @@ public class MmsMessage : Message
/// Creates a multimedia message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public MmsMessage() : base(MessageType.Mms)
{
}
Expand All @@ -44,6 +46,7 @@ internal MmsMessage(IntPtr messageHandle) : base(messageHandle)
/// The subject of the multimedia message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public string Subject
{
get
Expand Down Expand Up @@ -72,6 +75,7 @@ public string Subject
/// The collection of normal message recipients.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public ICollection<MessagesAddress> To
{
get
Expand All @@ -84,6 +88,7 @@ public ICollection<MessagesAddress> To
/// The collection of CC (carbon copy) message recipients.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public ICollection<MessagesAddress> Cc
{
get
Expand All @@ -96,6 +101,7 @@ public ICollection<MessagesAddress> Cc
/// The collection of BCC (blind carbon copy) message recipients.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public ICollection<MessagesAddress> Bcc
{
get
Expand All @@ -108,6 +114,7 @@ public ICollection<MessagesAddress> Bcc
/// The list of attachment files.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public IList<MessagesAttachment> Attachments
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Tizen.Messaging.Messages
/// This class represents the WAP push messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class PushMessage : Message
{
internal PushMessage(IntPtr messageHandle) : base(messageHandle)
Expand Down
3 changes: 3 additions & 0 deletions src/Tizen.Messaging/Tizen.Messaging.Messages/SmsMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ namespace Tizen.Messaging.Messages
/// This class represents short text messages.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public class SmsMessage : Message
{
/// <summary>
/// Creates a short text message.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public SmsMessage() : base(MessageType.Sms)
{
}
Expand All @@ -41,6 +43,7 @@ internal SmsMessage(IntPtr messageHandle) : base(messageHandle)
/// The collection of normal message recipients.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated since API11. Might be removed in API13.")]
public ICollection<MessagesAddress> To
{
get
Expand Down
3 changes: 3 additions & 0 deletions src/Tizen.Messaging/doc/api/Tizen.Messaging.Messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@

uid: Tizen.Messaging.Messages
summary: The Tizen.Messaging.Messages namespace contains classes providing the functionality to send, receive, and search messages.

> [!NOTE]
> All Messages 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 7bf9836

Please sign in to comment.