diff options
author | James Prestwood <james.prestwood@linux.intel.com> | 2017-10-03 09:35:16 -0700 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2017-10-03 21:23:32 -0500 |
commit | 75f00e7805e09faf7f57f8055c517e2d03fef553 (patch) | |
tree | 3507f66af0f0a28302b90a29c86064f4913e13fd | |
parent | 5da7a20f85fc0be17ec6df866c6707f922fe5028 (diff) | |
download | phonesim-75f00e7805e09faf7f57f8055c517e2d03fef553.tar.gz |
phonesim: Added SimAuth to phonesim core
Adds the SimAuth command handler to the phonesim command loop.
-rw-r--r-- | src/default.xml | 6 | ||||
-rw-r--r-- | src/phonesim.cpp | 15 | ||||
-rw-r--r-- | src/phonesim.h | 2 |
3 files changed, 23 insertions, 0 deletions
diff --git a/src/default.xml b/src/default.xml index e0cafbb..c70b907 100644 --- a/src/default.xml +++ b/src/default.xml @@ -314,6 +314,12 @@ <!-- SIM insertion state --> <set name="SIMSTATE" value="1" /> +<!-- SIM Auth --> +<simauth ki="90dca4eda45b53cf0f12d7c9c3bc6a89" opc="cb9cccc4b9258e6dca4760379fb82581"> + <aid>61184F10A0000000871004FFFFFFFF890619000050044953494DFFFFFFFFFFFFFF</aid> + <aid>61184F10A0000000871002FFFFFFFF890619000050045553494DFFFFFFFFFFFFFF</aid> +</simauth> + <!-- Time --> <!-- Enable for testing <unsolicited delay="3000" once="true">*TTZ: 2, "11/25/2007, 12:12:12+40", 0</unsolicited> diff --git a/src/phonesim.cpp b/src/phonesim.cpp index 276ae47..cf7d5a1 100644 --- a/src/phonesim.cpp +++ b/src/phonesim.cpp @@ -23,6 +23,7 @@ #include "simfilesystem.h" #include "simapplication.h" #include "callmanager.h" +#include "simauth.h" #include <qatutils.h> #include <qstring.h> @@ -628,6 +629,12 @@ SimRules::SimRules( int fd, QObject *p, const QString& filename, HardwareManipu // Load a phonebook definition. loadPhoneBook( *n ); + } else if ( n->tag == "simauth" ) { + printf("\n\nPARSING SIMAUTH\n\n"); + + _simAuth = new SimAuth( this, *n ); + connect( _simAuth, SIGNAL(send(QString)), + this, SLOT(respond(QString)) ); } n = n->next; } @@ -886,6 +893,10 @@ void SimRules::destruct() delete defState; defState = NULL; + if ( _simAuth ) + delete _simAuth; + _simAuth = NULL; + if ( _callManager ) delete _callManager; _callManager = NULL; @@ -1128,6 +1139,10 @@ void SimRules::command( const QString& cmd ) if ( _callManager->command( cmd ) ) return; + // Proccess SIM auth commands + if ( _simAuth && _simAuth->command( cmd ) ) + return; + // Process SIM toolkit related commands with the current SIM application. if ( simCommand( cmd ) ) return; diff --git a/src/phonesim.h b/src/phonesim.h index ce69155..452dc12 100644 --- a/src/phonesim.h +++ b/src/phonesim.h @@ -53,6 +53,7 @@ class SimRules; class SimFileSystem; class CallManager; class SimApplication; +class SimAuth; class SimXmlNode @@ -358,6 +359,7 @@ private: QMap< QString, SimPhoneBook * > phoneBooks; CallManager *_callManager; + SimAuth *_simAuth; bool simCsimOk( const QByteArray& payload ); }; |