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
|
yield pp
|
||||||
|
|
||||||
# Determine next possible ppn
|
# Determine next possible ppn
|
||||||
next_ppn = int(pp["ppn"]) + 1
|
next_ppn = int(pp.ppn) + 1
|
||||||
|
|
||||||
def get_user(self, uid):
|
def get_user(self, uid):
|
||||||
"""
|
"""
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from . import Request, Response, request_type, response_type
|
from . import Request, Response, request_type, response_type
|
||||||
|
from ..types import AccountType
|
||||||
|
|
||||||
|
|
||||||
@request_type
|
@request_type
|
||||||
@ -14,5 +15,5 @@ class GetAccount(Request):
|
|||||||
@response_type
|
@response_type
|
||||||
class GetAccountResp(Response):
|
class GetAccountResp(Response):
|
||||||
CHILDS = {
|
CHILDS = {
|
||||||
"account": None,
|
"account": AccountType,
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from . import Request, Response, request_type, response_type
|
from . import Request, Response, request_type, response_type
|
||||||
|
from ..types import PPDevType
|
||||||
|
|
||||||
|
|
||||||
@request_type
|
@request_type
|
||||||
@ -14,5 +15,5 @@ class GetPPDev(Request):
|
|||||||
@response_type
|
@response_type
|
||||||
class GetPPDevResp(Response):
|
class GetPPDevResp(Response):
|
||||||
CHILDS = {
|
CHILDS = {
|
||||||
"pp": None,
|
"pp": PPDevType,
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,10 @@ class CallForwardStateType(EnumType):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class DECTSubscriptionStateType(EnumType):
|
||||||
|
VALUES = None
|
||||||
|
|
||||||
|
|
||||||
class LanguageType(EnumType):
|
class LanguageType(EnumType):
|
||||||
VALUES = None
|
VALUES = None
|
||||||
|
|
||||||
@ -91,6 +95,45 @@ class PPRelTypeType(EnumType):
|
|||||||
VALUES = None
|
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):
|
class PPUserType(ChildType):
|
||||||
FIELDS = {
|
FIELDS = {
|
||||||
"uid": int,
|
"uid": int,
|
||||||
|
Loading…
Reference in New Issue
Block a user