public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, ConversationID);
     ByteBufUtils.WriteUTF8(byteBuf, ConversationName);
     byteBuf.WriteLong(LastActive);
     return(byteBuf);
 }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, UserID.ToString());
            ByteBufUtils.WriteUTF8(byteBuf, ResponseID.ToString());

            return(byteBuf);
        }
Exemple #3
0
 public override IByteBuffer EncodeToBuffer(IByteBuffer buffer)
 {
     buffer.WriteInt(GetPreviewCode());
     ByteBufUtils.WriteUTF8(buffer, FileID);
     ByteBufUtils.WriteUTF8(buffer, FileName);
     return(buffer);
 }
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, TargetID);
     byteBuf.WriteBoolean(Accepted);
     byteBuf.WriteInt(NotiPosition);
     return(byteBuf);
 }
Exemple #5
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, ConversationID);
            byteBuf.WriteInt(BubbleColor);

            return(byteBuf);
        }
Exemple #6
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            byteBuf.WriteInt(StatusCode);
            ByteBufUtils.WriteUTF8(byteBuf, Token);

            return(byteBuf);
        }
Exemple #7
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, ConversationID);
            byteBuf = Message.EncodeToBuffer(byteBuf);

            return byteBuf;
        }
Exemple #8
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            byteBuf.WriteBoolean(Runnable);
            byteBuf.WriteBoolean(ForceUpdate);
            ByteBufUtils.WriteUTF8(byteBuf, CurrentVersion);

            return(byteBuf);
        }
Exemple #9
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, ConversationID);
            byteBuf.WriteInt(MediaPosition);
            byteBuf.WriteInt(Quantity);

            return(byteBuf);
        }
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     foreach (string id in Friends)
     {
         ByteBufUtils.WriteUTF8(byteBuf, id);
     }
     ByteBufUtils.WriteUTF8(byteBuf, "~");
     return(byteBuf);
 }
Exemple #11
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     foreach (var noti in Notifications)
     {
         ByteBufUtils.WriteUTF8(byteBuf, noti);
     }
     ByteBufUtils.WriteUTF8(byteBuf, "~");
     return(byteBuf);
 }
        public override IByteBuffer EncodeToBuffer(IByteBuffer buffer)
        {
            string notification = new ChatUserStore().Load(AdderID).FirstName +
                                  " invited " + new ChatUserStore().Load(AddedID).FirstName +
                                  " to group";

            ByteBufUtils.WriteUTF8(buffer, notification);
            return(buffer);
        }
Exemple #13
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, FirstName);
     ByteBufUtils.WriteUTF8(byteBuf, LastName);
     ByteBufUtils.WriteUTF8(byteBuf, Town);
     ByteBufUtils.WriteUTF8(byteBuf, DateOfBirth.ToString());
     byteBuf.WriteInt((int)Gender);
     return(byteBuf);
 }
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, ID);
     ByteBufUtils.WriteUTF8(byteBuf, Name);
     ByteBufUtils.WriteUTF8(byteBuf, Email);
     ByteBufUtils.WriteUTF8(byteBuf, DoB);
     ByteBufUtils.WriteUTF8(byteBuf, Town);
     return(byteBuf);
 }
Exemple #15
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, Email);
     ByteBufUtils.WriteUTF8(byteBuf, PassHashed);
     ByteBufUtils.WriteUTF8(byteBuf, FirstName);
     ByteBufUtils.WriteUTF8(byteBuf, LastName);
     byteBuf.WriteLong(DoB.Ticks);
     byteBuf.WriteInt((int)Gender);
     return(byteBuf);
 }
Exemple #16
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, FirstName);
     ByteBufUtils.WriteUTF8(byteBuf, LastName);
     ByteBufUtils.WriteUTF8(byteBuf, Town);
     ByteBufUtils.WriteUTF8(byteBuf, Email);
     byteBuf.WriteLong(DateOfBirth.Ticks);
     byteBuf.WriteInt((int)Gender);
     return(byteBuf);
 }
Exemple #17
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     for (int i = 0; i < SenderID.Count; ++i)
     {
         ByteBufUtils.WriteUTF8(byteBuf, SenderID[i]);
         byteBuf = Content[i].EncodeToBuffer(byteBuf);
     }
     ByteBufUtils.WriteUTF8(byteBuf, "~");
     byteBuf.WriteBoolean(LoadConversation);
     return(byteBuf);
 }
Exemple #18
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            foreach (var conversation in Conversations)
            {
                ByteBufUtils.WriteUTF8(byteBuf, conversation.Key.ToString());
                byteBuf.WriteLong(conversation.Value);
            }

            ByteBufUtils.WriteUTF8(byteBuf, "~");
            return(byteBuf);
        }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, BackgroundId);
            byteBuf.WriteInt(BackgroundBlur);

            byteBuf.WriteInt(BackgroundColor);

            byteBuf.WriteInt((int)UseType);

            byteBuf.WriteInt(IconColor);

            return(byteBuf);
        }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            for (int i = 0; i < FileIDs.Count; ++i)
            {
                ByteBufUtils.WriteUTF8(byteBuf, FileIDs[i]);
                ByteBufUtils.WriteUTF8(byteBuf, FileNames[i]);
                byteBuf.WriteInt(Positions[i]);
            }

            ByteBufUtils.WriteUTF8(byteBuf, "~");

            return(byteBuf);
        }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, Theme.BackgroundId);
            byteBuf.WriteInt(Theme.BackgroundBlur);

            byteBuf.WriteInt(Theme.BackgroundColor);

            byteBuf.WriteInt((int)Theme.Use);

            byteBuf.WriteInt(Theme.IconColor);

            return(byteBuf);
        }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, ID);
            ByteBufUtils.WriteUTF8(byteBuf, FirstName);
            ByteBufUtils.WriteUTF8(byteBuf, LastName);
            ByteBufUtils.WriteUTF8(byteBuf, LastMess);
            ByteBufUtils.WriteUTF8(byteBuf, ConversationID);
            byteBuf.WriteInt(PreviewCode);
            byteBuf.WriteBoolean(IsOnline);
            byteBuf.WriteLong(LastLogout.Ticks);
            byteBuf.WriteInt(RelationshipType);

            return(byteBuf);
        }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            foreach (var item in Results)
            {
                ByteBufUtils.WriteUTF8(byteBuf, item.ID);
                ByteBufUtils.WriteUTF8(byteBuf, item.FirstName);
                ByteBufUtils.WriteUTF8(byteBuf, item.LastName);
                ByteBufUtils.WriteUTF8(byteBuf, item.LastMessage);
                ByteBufUtils.WriteUTF8(byteBuf, item.ConversationID);
                byteBuf.WriteInt(item.PreviewCode);
                byteBuf.WriteBoolean(item.IsOnline);
                byteBuf.WriteLong(item.LastLogout.Ticks);
                byteBuf.WriteInt(item.Relationship);
            }

            ByteBufUtils.WriteUTF8(byteBuf, "~");

            return(byteBuf);
        }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, ConversationID);
            ByteBufUtils.WriteUTF8(byteBuf, ConversationName);
            byteBuf.WriteInt(StatusCode);
            byteBuf.WriteLong(LastActive);

            foreach (var member in Members)
            {
                ByteBufUtils.WriteUTF8(byteBuf, member);
            }
            ByteBufUtils.WriteUTF8(byteBuf, "~");

            byteBuf.WriteInt(LastMessID);
            byteBuf.WriteInt(LastMediaID);
            byteBuf.WriteInt(LastAttachmentID);
            byteBuf.WriteInt(PreviewCode);
            byteBuf.WriteInt(BubbleColor);
            ByteBufUtils.WriteUTF8(byteBuf, PreviewContent);

            return(byteBuf);
        }
Exemple #25
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, Username);
     ByteBufUtils.WriteUTF8(byteBuf, Passhash);
     return(byteBuf);
 }
Exemple #26
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, mess);
     return(byteBuf);
 }
Exemple #27
0
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, TargetUserID);

            return(byteBuf);
        }
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, Hash);
     ByteBufUtils.WriteUTF8(byteBuf, UserID);
     return(byteBuf);
 }
        public IByteBuffer Encode(IByteBuffer byteBuf)
        {
            ByteBufUtils.WriteUTF8(byteBuf, ConversationID);

            return(byteBuf);
        }
Exemple #30
0
 public IByteBuffer Encode(IByteBuffer byteBuf)
 {
     ByteBufUtils.WriteUTF8(byteBuf, HashUtils.MD5(OldPassword));
     ByteBufUtils.WriteUTF8(byteBuf, HashUtils.MD5(NewPassword));
     return(byteBuf);
 }