]> www.average.org Git - loctrkd.git/blobdiff - loctrkd/protomodule.py
Implement sending commands from the web interface
[loctrkd.git] / loctrkd / protomodule.py
index 1d61759c19239b9e774e2bdc811eb6d53dd4fc19..a1698f2fde7ae52389a62b16dccf265122bacc93 100644 (file)
@@ -122,6 +122,8 @@ class ProtoClass(Protocol, metaclass=_MetaProto):
 
 
 class ProtoModule:
+    __name__: str
+
     class Stream:
         def recv(self, segment: bytes) -> List[Union[bytes, str]]:
             ...
@@ -171,3 +173,9 @@ class ProtoModule:
     @staticmethod
     def class_by_prefix(prefix: str) -> Union[Type[ProtoClass], List[str]]:
         ...
+
+    @staticmethod
+    def make_response(
+        cmd: str, imei: str, **kwargs: Any
+    ) -> Optional[ProtoClass.Out]:
+        ...