Commits

Ryan Stecker  committed bd43c5b

Added message body support.

  • Participants
  • Parent commits 9a1d090

Comments (0)

Files changed (1)

File SkypeKit.NET/Message.cs

 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Diagnostics;
 
 using com.skype.api;
+
 using SkypeConversation = com.skype.api.Conversation;
 using SkypeMessage = com.skype.api.Message;
 
 
 namespace SkypeKit
 {
+    public enum MessageType
+    {
+        SetMetaData = 0,
+        SpawnedConference,
+        AddedConsumers,
+        AddedApplicants,
+        RetiredOthers,
+        Retired,
+        SetRank,
+        StartedLiveSession,
+        EndedLiveSession,
+        RequestedAuth,
+        GrantedAuth,
+        Blocked,
+        PostedText,
+        PostedEmote,
+        PostedContacts,
+        PostedSMS,
+        PostedAlert,
+        PostedVoiceMessage,
+        PostedFiles,
+        PostedInvoice,
+        HasBirthday,
+    }
+
+    [DebuggerDisplay( "Author = {Author}" )]
     public sealed class Message
     {
         Skype skype;
         SkypeMessage message;
 
 
+        public MessageType Type
+        {
+            get { return ( MessageType )message.getType().ordinal(); }
+        }
+
+        public string Author
+        {
+            get { return message.getAuthor(); }
+        }
+        public string AuthorDisplayName
+        {
+            get { return message.getAuthorDisplayName(); }
+        }
+
+        public string Body
+        {
+            get { return message.getBodyXml(); }
+        }
+
+
         internal Message( Skype skype, SkypeConversation conversation, SkypeMessage message )
         {
             this.skype = skype;