Changed the ProtobufMessages file

now using only the basic registry messages
vote-registry
Vladimir Eliezer Tokarev 2016-01-15 01:32:12 -08:00
parent 51b9f9decd
commit 717c2e6e65
4 changed files with 7 additions and 1118 deletions

View File

@ -1,3 +1,3 @@
/bin/
/protoc.exe
/bin/
/comment-info.txt

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,14 @@
package meerkat;
import com.google.protobuf.*;
import com.google.protobuf.ByteString;
import meerkat.ProtobufsMessages.BasicMessage;
import meerkat.ProtobufsMessages.BulletinBoardMessage;
import meerkat.ProtobufsMessages.Tag;
import meerkat.bulletinboard.BulletinBoardClient;
import meerkat.comm.CommunicationException;
import meerkat.crypto.DigitalSignature;
import meerkat.protobuf.BulletinBoardAPI;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
/**
* Created by Vladimir Eliezer Tokarev on 1/8/2016.
@ -132,119 +128,9 @@ public class SimpleRegistry {
* @return BulletinBoardAPI.BulletinBoardMessage
*/
private BulletinBoardAPI.BulletinBoardMessage CreateBulletinBoardMessage(BasicMessage.Builder basicMessage) {
BulletinBoardMessage.Builder bulletinBoardmessage = BulletinBoardMessage.newBuilder();
Message encodableMessage = new Message() {
@Override
public Parser<? extends Message> getParserForType() {
return null;
}
@Override
public Builder newBuilderForType() {
return null;
}
@Override
public Builder toBuilder() {
return null;
}
@Override
public void writeTo(CodedOutputStream output) throws IOException {
}
@Override
public int getSerializedSize() {
return 0;
}
@Override
public ByteString toByteString() {
return null;
}
@Override
public byte[] toByteArray() {
return new byte[0];
}
@Override
public void writeTo(OutputStream output) throws IOException {
}
@Override
public void writeDelimitedTo(OutputStream output) throws IOException {
}
@Override
public Message getDefaultInstanceForType() {
return null;
}
@Override
public List<String> findInitializationErrors() {
return null;
}
@Override
public String getInitializationErrorString() {
return null;
}
@Override
public Descriptors.Descriptor getDescriptorForType() {
return null;
}
@Override
public Map<Descriptors.FieldDescriptor, Object> getAllFields() {
return null;
}
@Override
public boolean hasOneof(Descriptors.OneofDescriptor oneof) {
return false;
}
@Override
public Descriptors.FieldDescriptor getOneofFieldDescriptor(Descriptors.OneofDescriptor oneof) {
return null;
}
@Override
public boolean hasField(Descriptors.FieldDescriptor field) {
return false;
}
@Override
public Object getField(Descriptors.FieldDescriptor field) {
return null;
}
@Override
public int getRepeatedFieldCount(Descriptors.FieldDescriptor field) {
return 0;
}
@Override
public Object getRepeatedField(Descriptors.FieldDescriptor field, int index) {
return null;
}
@Override
public UnknownFieldSet getUnknownFields() {
return null;
}
@Override
public boolean isInitialized() {
return false;
}
}
BulletinBoardAPI.BulletinBoardMessage.Builder bulletinBoardmessage =
BulletinBoardAPI.BulletinBoardMessage.newBuilder();
signatory.updateContent((ProtobufsMessages)basicMessage);
/**
* encode the basic message
* create bulletin board message

View File

@ -10,9 +10,3 @@ message BasicMessage {
repeated Tag tag = 1;
optional bytes data = 2;
}
message BulletinBoardMessage {
repeated Tag tag = 1;
required BasicMessage basicMessage = 2;
optional bytes signatures = 3;
}