diff options
author | Harald Welte <laforge@osmocom.org> | 2022-07-17 21:23:21 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-07-17 21:55:15 +0200 |
commit | a0452216a4ebb5b3735899adfae8e4d1c1fb4233 (patch) | |
tree | 347e98764aa473a92ca2e341a6f39af2dc1dc7be | |
parent | a6c0f880da635985fe62e1c875756dfdd9ee80e0 (diff) |
minimalistic support for DF.MULTIMEDIA
No decode of the payload of the files yet, but let's at least
name them.
Change-Id: I2d9c56bdea08fe6629978b6a1f7c139f487d075a
-rw-r--r-- | pySim/ts_31_102_telecom.py | 23 | ||||
-rw-r--r-- | pySim/ts_51_011.py | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/pySim/ts_31_102_telecom.py b/pySim/ts_31_102_telecom.py index 49f6868..5f695ed 100644 --- a/pySim/ts_31_102_telecom.py +++ b/pySim/ts_31_102_telecom.py @@ -5,7 +5,7 @@ # pylint: disable=undefined-variable """ -DF_PHONEBOOK as specified in 3GPP TS 31.102 V16.6.0 +DF_PHONEBOOK, DF_MULTIMEDIA as specified in 3GPP TS 31.102 V16.6.0 Needs to be a separate python module to avoid cyclic imports """ @@ -69,3 +69,24 @@ class DF_PHONEBOOK(CardDF): # FIXME: Those 4Fxx entries with unspecified FID... ] self.add_files(files) + + + +# TS 31.102 Section 4.6.3.1 +class EF_MML(BerTlvEF): + def __init__(self, fid='4F47', name='EF.MML', desc='Multimedia Messages List', **kwargs): + super().__init__(fid, name=name, desc=desc, **kwargs) + +# TS 31.102 Section 4.6.3.2 +class EF_MMDF(BerTlvEF): + def __init__(self, fid='4F48', name='EF.MMDF', desc='Multimedia Messages Data File', **kwargs): + super().__init__(fid, name=name, desc=desc, **kwargs) + +class DF_MULTIMEDIA(CardDF): + def __init__(self, fid='5F3B', name='DF.MULTIMEDIA', desc='Multimedia', **kwargs): + super().__init__(fid=fid, name=name, desc=desc, **kwargs) + files = [ + EF_MML(), + EF_MMDF(), + ] + self.add_files(files) diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 21fd54b..b2a9ca4 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -32,7 +32,7 @@ order to describe the files specified in the relevant ETSI + 3GPP specifications from pySim.profile import match_sim from pySim.profile import CardProfile from pySim.filesystem import * -from pySim.ts_31_102_telecom import DF_PHONEBOOK +from pySim.ts_31_102_telecom import DF_PHONEBOOK, DF_MULTIMEDIA import enum from pySim.construct import * from construct import Optional as COptional @@ -500,6 +500,8 @@ class DF_TELECOM(CardDF): EF_CMI(), # not really part of 51.011 but something that TS 31.102 specifies may exist here. DF_PHONEBOOK(), + # not really part of 51.011 but something that TS 31.102 specifies may exist here. + DF_MULTIMEDIA(), ] self.add_files(files) |