summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/backend.go37
1 files changed, 3 insertions, 34 deletions
diff --git a/gui/backend.go b/gui/backend.go
index ecff8dc..43f7b67 100644
--- a/gui/backend.go
+++ b/gui/backend.go
@@ -123,45 +123,14 @@ func (s status) fromString(st string) status {
}
}
-// FIXME -----------------------------------------------------------------------
-// at some moment I thought this was a good idea, but probably is overkill -
-// and not used right now. Discuss with meskio in code review, and very likely
-// remove it - there are probably better ways of dealing with tracking of user
-// actions more towards the ui layer.
-
-// An action is originated in the UI. These represent requests coming from the
-// frontend via the C code. VPN code needs to watch them and fullfill their
-// requests as soon as possible.
-type actions int
-
-const (
- switchOn actions = iota
- switchOff
- unblock
-)
-
-func (a actions) String() string {
- return [...]string{"switchOn", "switchOff", "unblock"}[a]
-}
-
-func (a actions) MarshalJSON() ([]byte, error) {
- b := bytes.NewBufferString(`"`)
- b.WriteString(a.String())
- b.WriteString(`"`)
- return b.Bytes(), nil
-}
-
-// -----------------------------------------------------------------------------
-
// The connectionCtx keeps the global state that is passed around to C-land. It
// also serves as the primary way of passing requests from the frontend to the
// Go-core, by letting the UI write some of these variables and processing
// them.
type connectionCtx struct {
- AppName string `json:"appName"`
- Provider string `json:"provider"`
- Status status `json:"status"`
- Actions []actions `json:"actions,omitempty"`
+ AppName string `json:"appName"`
+ Provider string `json:"provider"`
+ Status status `json:"status"`
bm bitmask.Bitmask
}