forked from public/pysim
filesystem: add export method for ADF files
This patch adds an export method to CardADF, which calls the application specific export method in CardApplication class Related: OS#6092 Change-Id: I8129656096ecaf41b36e5f2afbbfbebcd0587886
This commit is contained in:
@@ -541,6 +541,15 @@ class CardADF(CardDF):
|
|||||||
else:
|
else:
|
||||||
return self.aid
|
return self.aid
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def export(as_json: bool, lchan):
|
||||||
|
"""
|
||||||
|
Export application specific parameters that are not part of the UICC filesystem.
|
||||||
|
"""
|
||||||
|
if not isinstance(lchan.selected_file, CardADF):
|
||||||
|
raise TypeError('currently selected file is not of type CardADF')
|
||||||
|
return lchan.selected_file.application.export(as_json, lchan)
|
||||||
|
|
||||||
|
|
||||||
class CardEF(CardFile):
|
class CardEF(CardFile):
|
||||||
"""EF (Entry File) in the smart card filesystem"""
|
"""EF (Entry File) in the smart card filesystem"""
|
||||||
@@ -1428,6 +1437,15 @@ class CardApplication:
|
|||||||
"""
|
"""
|
||||||
return interpret_sw(self.sw, sw)
|
return interpret_sw(self.sw, sw)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def export(as_json: bool, lchan):
|
||||||
|
"""
|
||||||
|
Export application specific parameters, in the form of commandline script. (see also comment in the export
|
||||||
|
method of class "CardFile")
|
||||||
|
"""
|
||||||
|
return "# %s has no exportable features" % str(lchan.selected_file)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CardModel(abc.ABC):
|
class CardModel(abc.ABC):
|
||||||
"""A specific card model, typically having some additional vendor-specific files. All
|
"""A specific card model, typically having some additional vendor-specific files. All
|
||||||
|
|||||||
Reference in New Issue
Block a user