private void writeAvatarImage(DeviceContact contact)// throws IOException
 {
     if (contact.getAvatar().HasValue)
     {
         //writeStream(contact.getAvatar().get().getInputStream());
     }
 }
示例#2
0
 private void writeAvatarImage(DeviceContact contact)// throws IOException
 {
     if (contact.getAvatar().HasValue)
     {
         //writeStream(contact.getAvatar().get().getInputStream());
     }
 }
        private void writeContactDetails(DeviceContact contact)// throws IOException
        {
            TextSecureProtos.ContactDetails.Builder contactDetails = TextSecureProtos.ContactDetails.CreateBuilder();
            contactDetails.SetNumber(contact.getNumber());

            /*if (contact.getName().HasValue)
            {
                contactDetails.SetName(contact.getName().ForceGetValue());
            }

            if (contact.getAvatar().HasValue)
            {
                TextSecureProtos.ContactDetails.Avatar.Builder avatarBuilder = ContactDetails.Avatar.CreateBuilder();
                avatarBuilder.setContentType(contact.getAvatar().ForceGetValue().getContentType());
                avatarBuilder.setLength((int)contact.getAvatar().ForceGetValue().getLength());
                contactDetails.SetAvatar(avatarBuilder);
            }

            byte[] serializedContactDetails = contactDetails.Build().ToByteArray();

            writeVarint32(serializedContactDetails.Length);
            output.write(serializedContactDetails);*/
            throw new NotImplementedException();
        }
示例#4
0
        private void writeContactDetails(DeviceContact contact)// throws IOException
        {
            TextSecureProtos.ContactDetails.Builder contactDetails = TextSecureProtos.ContactDetails.CreateBuilder();
            contactDetails.SetNumber(contact.getNumber());

            /*if (contact.getName().HasValue)
             * {
             *  contactDetails.SetName(contact.getName().ForceGetValue());
             * }
             *
             * if (contact.getAvatar().HasValue)
             * {
             *  TextSecureProtos.ContactDetails.Avatar.Builder avatarBuilder = ContactDetails.Avatar.CreateBuilder();
             *  avatarBuilder.setContentType(contact.getAvatar().ForceGetValue().getContentType());
             *  avatarBuilder.setLength((int)contact.getAvatar().ForceGetValue().getLength());
             *  contactDetails.SetAvatar(avatarBuilder);
             * }
             *
             * byte[] serializedContactDetails = contactDetails.Build().ToByteArray();
             *
             * writeVarint32(serializedContactDetails.Length);
             * output.write(serializedContactDetails);*/
            throw new NotImplementedException();
        }
 public void write(DeviceContact contact)// throws IOException
 {
     writeContactDetails(contact);
     writeAvatarImage(contact);
 }
示例#6
0
 public void write(DeviceContact contact)// throws IOException
 {
     writeContactDetails(contact);
     writeAvatarImage(contact);
 }