File: base_provider.py

package info (click to toggle)
secrets 12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,616 kB
  • sloc: python: 6,838; xml: 7; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# SPDX-License-Identifier: GPL-3.0-only
from gi.repository import GObject


class BaseProvider(GObject.Object):
    __gtype_name__ = "BaseProvider"

    show_message = GObject.Signal(arg_types=(str,))
    hide_message = GObject.Signal(arg_types=())

    def __init__(self):
        super().__init__()

        self.raw_key = None

    @property
    def available(self) -> bool:
        return False

    @property
    def key(self) -> bytes:
        return self.raw_key

    def config(self) -> dict:
        return {}

    def clear_input_fields(self) -> None:
        pass