Fix various mistakes around the CardADF <-> CardApplication dualism

When the CardFile hierarchy talks about 'application' it means CardADF.

When the RuntimeState and CardProfile talk about 'application' they mean
a CardApplication.

Let's clarify this in the file names, and make CardADF have an optional
reference to the CardApplication, so that application specific status
word interpretation really works.

Change-Id: Ibc80a41d79dca547f14d5d84f447742e6b46d7ca
This commit is contained in:
Harald Welte
2021-04-02 20:27:05 +02:00
parent 1e45657e0f
commit 5ce3524f5f
2 changed files with 26 additions and 17 deletions

View File

@@ -45,8 +45,8 @@ from pySim.card_handler import card_handler
from pySim.filesystem import CardMF, RuntimeState, CardDF, CardADF
from pySim.ts_51_011 import CardProfileSIM, DF_TELECOM, DF_GSM
from pySim.ts_102_221 import CardProfileUICC
from pySim.ts_31_102 import ADF_USIM
from pySim.ts_31_103 import ADF_ISIM
from pySim.ts_31_102 import CardApplicationUSIM
from pySim.ts_31_103 import CardApplicationISIM
from pySim.card_data import CardDataCsv, card_data_register, card_data_get_field
@@ -441,8 +441,8 @@ if __name__ == '__main__':
sys.exit(2)
profile = CardProfileUICC()
profile.add_application(ADF_USIM())
profile.add_application(ADF_ISIM())
profile.add_application(CardApplicationUSIM)
profile.add_application(CardApplicationISIM)
rs = RuntimeState(card, profile)