From ccb1a93aa5b547e87f855f9bd9a0452db7193e57 Mon Sep 17 00:00:00 2001 From: Marcel Otte Date: Thu, 24 Nov 2022 22:51:02 +0100 Subject: [PATCH] More skeleton methods It's too late in the evening to get more done... --- controller.go | 26 ++++++++++++++++++++++++++ packageeditor.go | 7 +++++++ structure.go | 7 ++++--- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 packageeditor.go diff --git a/controller.go b/controller.go index 548fb8c..2d8362d 100644 --- a/controller.go +++ b/controller.go @@ -25,3 +25,29 @@ func (dm *DataModel) NewProtocol(name string) { func (dm *DataModel) SaveNewProtocol(editorContent ProtocolEditor) { } + +func (dm *DataModel) GetPackageEditor() *PackageEditor { + + return nil +} + +func (dm *DataModel) SwitchToProtocolEditor() { + +} + +func (dm *DataModel) SyncPackageEditor(pkgedt *PackageEditor) { + +} + +func (dm *DataModel) GetPackageBytes() []byte { + + return []byte{} +} + +func (dm *DataModel) FromSaved(path string) { + +} + +func (dm *DataModel) SaveAsPcap(path string) { + +} diff --git a/packageeditor.go b/packageeditor.go new file mode 100644 index 0000000..83b5e6e --- /dev/null +++ b/packageeditor.go @@ -0,0 +1,7 @@ +package npc + +import "fyne.io/fyne/v2" + +type PackageEditor struct { + Representation *fyne.Container +} diff --git a/structure.go b/structure.go index bec90eb..88b2803 100644 --- a/structure.go +++ b/structure.go @@ -39,7 +39,8 @@ type DOPMetadata struct { } type DataModel struct { - Name string // User defined name of his current work (filename later) - Protocols []ProtocolStructure // List of protocols in order of the stack - Data []FieldValue // Data of the fields of all protocols + Name string // User defined name of his current work (filename later) + Protocols []ProtocolStructure // List of protocols in order of the stack + Data []FieldValue // Data of the fields of all protocols + ProtocolCreation bool }