minimalistic support for DF.MULTIMEDIA

No decode of the payload of the files yet, but let's at least
name them.

Change-Id: I2d9c56bdea08fe6629978b6a1f7c139f487d075a
This commit is contained in:
Harald Welte 2022-07-17 21:23:21 +02:00
parent a6c0f880da
commit a0452216a4
2 changed files with 25 additions and 2 deletions

View File

@ -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)

View File

@ -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)