Add child typing to all other existing message types
This commit is contained in:
parent
bb8dd03299
commit
0a442e4ab5
@ -102,7 +102,7 @@ class OMMClient2:
|
||||
yield pp
|
||||
|
||||
# Determine next possible ppn
|
||||
next_ppn = int(pp["ppn"]) + 1
|
||||
next_ppn = int(pp.ppn) + 1
|
||||
|
||||
def get_user(self, uid):
|
||||
"""
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from . import Request, Response, request_type, response_type
|
||||
from ..types import AccountType
|
||||
|
||||
|
||||
@request_type
|
||||
@ -14,5 +15,5 @@ class GetAccount(Request):
|
||||
@response_type
|
||||
class GetAccountResp(Response):
|
||||
CHILDS = {
|
||||
"account": None,
|
||||
"account": AccountType,
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from . import Request, Response, request_type, response_type
|
||||
from ..types import PPDevType
|
||||
|
||||
|
||||
@request_type
|
||||
@ -14,5 +15,5 @@ class GetPPDev(Request):
|
||||
@response_type
|
||||
class GetPPDevResp(Response):
|
||||
CHILDS = {
|
||||
"pp": None,
|
||||
"pp": PPDevType,
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ class CallForwardStateType(EnumType):
|
||||
]
|
||||
|
||||
|
||||
class DECTSubscriptionStateType(EnumType):
|
||||
VALUES = None
|
||||
|
||||
|
||||
class LanguageType(EnumType):
|
||||
VALUES = None
|
||||
|
||||
@ -91,6 +95,45 @@ class PPRelTypeType(EnumType):
|
||||
VALUES = None
|
||||
|
||||
|
||||
class AccountType(ChildType):
|
||||
FIELDS = {
|
||||
"id": int,
|
||||
"username": str,
|
||||
"password": str,
|
||||
"oldPassword": str,
|
||||
"permission": None,
|
||||
"active": bool,
|
||||
"aging": None,
|
||||
"expire": int,
|
||||
"state": str,
|
||||
}
|
||||
|
||||
|
||||
class PPDevType(ChildType):
|
||||
FIELDS = {
|
||||
"ppn": int,
|
||||
"timeStamp": int,
|
||||
"relType": PPRelTypeType,
|
||||
"uid": int,
|
||||
"ipei": str,
|
||||
"ac": str,
|
||||
"s": DECTSubscriptionStateType,
|
||||
"uak": str,
|
||||
"encrypt": bool,
|
||||
"capMessaging": bool,
|
||||
"capMessagingForInternalUse": bool,
|
||||
"capEnhLocating": bool,
|
||||
"capBluetooth": bool,
|
||||
"ethAddr": str,
|
||||
"hwType": str,
|
||||
"ppProfileCapability": bool,
|
||||
"ppDefaultProfileLoaded": bool,
|
||||
"subscribeToPARIOnly": bool,
|
||||
# undocumented
|
||||
"ppnSec": int,
|
||||
}
|
||||
|
||||
|
||||
class PPUserType(ChildType):
|
||||
FIELDS = {
|
||||
"uid": int,
|
||||
|
Loading…
Reference in New Issue
Block a user