コード例 #1
0
 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());
     }
 }
コード例 #3
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();
        }
コード例 #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();
        }
コード例 #5
0
 public void write(DeviceContact contact)// throws IOException
 {
     writeContactDetails(contact);
     writeAvatarImage(contact);
 }
コード例 #6
0
 public void write(DeviceContact contact)// throws IOException
 {
     writeContactDetails(contact);
     writeAvatarImage(contact);
 }