src/lib/BasicASN1Reader.h
branchv_0
changeset 9 7a6abdd00ab5
parent 8 d37c1a5d09ce
child 11 8fbe93f78e2b
--- a/src/lib/BasicASN1Reader.h	Sat Jun 12 21:29:18 2021 +0200
+++ b/src/lib/BasicASN1Reader.h	Sat Jun 12 22:37:44 2021 +0200
@@ -40,11 +40,23 @@
 
 	State state = State::A;
 
+	bool started = false;
+
 protected:
 
 	void update() override {
-		
+
+		if (!started) {
+			handlers.writeStreamStart();
+			started = true;
+		}
+
+		handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Sequence);
 		handlers.writeNull();
+		handlers.writeBoolean(true);
+		handlers.writeInteger(123);
+		handlers.writeString(ASN1ContentHandler::StringType::UTF8String, "relational pipes");
+		handlers.writeCollectionEnd();
 
 		if (state == State::A) {
 
@@ -53,9 +65,12 @@
 		} else if (state == State::C) {
 
 		}
-
+	}
 
+public:
 
+	void close() override {
+		if (started) handlers.writeStreamEnd();
 	}
 
 };