adaptationlayer/tsy/nokiatsy_dll/inc/cmmphonebookoperationread3g_adn.h
changeset 8 6295dc2169f3
parent 5 8ccc39f9d787
equal deleted inserted replaced
7:fa67e03b87df 8:6295dc2169f3
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 #include <ctsy/pluginapi/cmmdatapackage.h>
    22 #include <ctsy/pluginapi/cmmdatapackage.h>
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include "cmmphonebookoperationread.h"
    24 #include "cmmphonebookoperationread.h"
       
    25 #include "muiccoperationbase.h"
    25 
    26 
    26 // CONSTANTS
    27 // CONSTANTS
    27     // None
    28     // None
    28 
    29 
    29 // MACROS
    30 // MACROS
    31 
    32 
    32 // DATA TYPES
    33 // DATA TYPES
    33     // None
    34     // None
    34 
    35 
    35 // EXTERNAL DATA STRUCTURES
    36 // EXTERNAL DATA STRUCTURES
    36     // None
    37 
       
    38 enum TPBAdn3GReadPhases
       
    39     {
       
    40     EPBReadPhase_PBR_Read_Entry = 0,
       
    41     EPBReadPhase_Read_Type1_Entry,
       
    42     EPBReadPhase_Read_Type2_Entry,
       
    43     EPBReadPhase_Read_type3_Entry,
       
    44     EPB_3G_ADN_Read_Phase_complete
       
    45     };
    37 
    46 
    38 // FUNCTION PROTOTYPES
    47 // FUNCTION PROTOTYPES
    39     // None
    48     // None
    40 
    49 
    41 // CLASS DECLARATION
    50 // CLASS DECLARATION
    53         */
    62         */
    54         static CMmPhoneBookOperationRead3g_adn* NewL
    63         static CMmPhoneBookOperationRead3g_adn* NewL
    55                (
    64                (
    56                 CMmPhoneBookStoreMessHandler* aMmPhoneBookStoreMessHandler,
    65                 CMmPhoneBookStoreMessHandler* aMmPhoneBookStoreMessHandler,
    57                 CMmUiccMessHandler* aUiccMessHandler,
    66                 CMmUiccMessHandler* aUiccMessHandler,
    58                 const CMmDataPackage* aDataPackage // Data
    67                 const CMmDataPackage* aDataPackage, // Data
       
    68                 TInt aIpc
    59                );
    69                );
    60 
    70 
    61         /**
    71         /**
    62         * Destructor.
    72         * Destructor.
    63         */
    73         */
    76         * Class attributes are created in ConstructL.
    86         * Class attributes are created in ConstructL.
    77         */
    87         */
    78         void ConstructL();
    88         void ConstructL();
    79         
    89         
    80         // Transmit 
    90         // Transmit 
       
    91 
       
    92         /**
       
    93         * Check for valid ipc and PhoneBook
       
    94         * @param aIpc : Ipc
       
    95         * @param aDataPackage: Data received from Commontsy
       
    96         * @param aTransId : Transaction id
       
    97         * @return TInt: KErrNone or error value.
       
    98         */
       
    99         TInt UICCCreateReq
       
   100             (
       
   101             TInt aIpc,
       
   102             const CMmDataPackage* aDataPackage,
       
   103             TUint8 aTransId
       
   104             );
    81 
   105 
    82         /**
   106         /**
    83         * Constructs Data to read entry from USIM ADN Phonebook
   107         * Constructs Data to read entry from USIM ADN Phonebook
    84         * @param
   108         * @param
    85         * @return TInt: KErrNone or error value.
   109         * @return TInt: KErrNone or error value.
    86         */
   110         */
    87         TInt UICCHandleData3gADNReadReq(TInt aFileId, TInt aFileSFI);
   111         TInt UICCHandleData3gADNReadReq
    88         
   112              (            
       
   113              const CMmDataPackage* aDataPackage,
       
   114              TUint8 aTransId
       
   115              );
       
   116         
       
   117         
       
   118         /**
       
   119         * Creates request to read record
       
   120         * @param aTraId : Transaction Id
       
   121         * @param aFileId : FielId
       
   122         * @param aFileidSfi : aFileIdSfi
       
   123         * @param aRecordNo : record number to be read
       
   124         * @return TInt: KErrNone or error value.
       
   125         */
       
   126         TInt UiccReadEfRecordReq( 
       
   127             const TInt aTraId, 
       
   128             const TUint16 aFileId, 
       
   129             const TUint8 aFileIdSfi,
       
   130             const TUint8 aRecordNo );
       
   131 
    89         
   132         
    90         // Receive
   133         // Receive
    91 
   134 
    92         
   135         
       
   136         TBool HandleUICCPbRespL
       
   137             (
       
   138             TInt aStatus,
       
   139             TUint8 aDetails,
       
   140             const TDesC8 &aFileData,
       
   141             TInt aTransId
       
   142             );
       
   143 
    93         /**
   144         /**
    94         * Handles SimPbResp ISI -message
   145         * Handles SimPbResp ISI -message
    95         * @param  TInt aTagValue
   146         * @param  TInt aTagValue
    96         * @param  TDes8& aFileData
   147         * @param  TDes8& aFileData
    97         * @return TInt: KErrNone or error value.
   148         * @return TInt: KErrNone or error value.
    98         */
   149         */
    99         TInt HandleUICC3gADNRespL(const TInt aStatus, const TDes8& aFileData, const TInt aTransId);
   150         TBool HandleUICC3gADNRespL(const TInt aStatus, 
   100         
   151                                   const TDesC8& aFileData,
       
   152                                   const TInt aTransId);
       
   153         
       
   154         /**
       
   155         * Handles response for PBR record read
       
   156         * @param  TInt aStatus : UICC Server status
       
   157         * @param  TDesC8& aFileData : Response Data
       
   158         * @param TInt aTraId : transaction id
       
   159         * @return TInt: KErrNone or error value.
       
   160         */
       
   161         TInt UiccReadEfPbrRecordResp( 
       
   162             TInt aStatus, 
       
   163             const TDesC8 &aFileData, 
       
   164             TInt aTraId );
       
   165 
       
   166         /**
       
   167         * Handles response for Type1 files record read response
       
   168         * @param  TInt aStatus : UICC Server status
       
   169         * @param TInt aTraId : transaction id
       
   170         * @param  TDesC8& aFileData : Response Data
       
   171         * @return TInt: KErrNone or error value.
       
   172         */
       
   173         TInt UiccReadEfType1RespL(
       
   174                 TInt aStatus, 
       
   175                 TInt aTraId,
       
   176                 const TDesC8 &aFileData );
       
   177 
       
   178         /**
       
   179         * Handles response for Type2 files record read response
       
   180         * @param  TInt aStatus : UICC Server status
       
   181         * @param TInt aTraId : transaction id
       
   182         * @param  TDesC8& aFileData : Response Data
       
   183         * @return TInt: KErrNone or error value.
       
   184         */
       
   185         TInt UiccReadEfType2RespL(
       
   186                 TInt aStatus, 
       
   187                 TInt aTraId,
       
   188                 const TDesC8 &aFileData );
       
   189 
       
   190         /**
       
   191         * Handles response for Type3 files record read response
       
   192         * @param  TInt aStatus : UICC Server status
       
   193         * @param TInt aTraId : transaction id
       
   194         * @param  TDesC8& aFileData : Response Data
       
   195         * @return TInt: KErrNone or error value.
       
   196         */
       
   197         TInt UiccReadEfType3RespL(
       
   198                 TInt aStatus, 
       
   199                 TInt aTraId,
       
   200                 TUint8 aFileTag,
       
   201                 const TDesC8 &aFileData );
       
   202 
       
   203         /**
       
   204         * Send request to continue reading Entry after reading Ext record
       
   205         * @param TUint8 aIndex : record index to be read
       
   206         * @const TDesC8 &aFileData : response data for Ext record read
       
   207         * @param TInt aTraId : Transaction id
       
   208         * @TInt &aExtFileTagIndex : Index offset for Ext record identifier 
       
   209         * in filedata
       
   210         * @return TInt : KErrNone or Error value
       
   211         */
       
   212         TInt CheckForExtToContinueNextRead( 
       
   213                 TUint8 aIndex, 
       
   214                 const TDesC8 &aFileData, 
       
   215                 TInt aTraId,
       
   216                 TInt &aExtFileTagIndex );
       
   217 
       
   218         /**
       
   219         * Send request to continue reading Entry
       
   220         * @param TUint8 aTraId : transaction id
       
   221         * @return TInt : error value
       
   222         */
       
   223         TInt ContinueWithNextReading( TUint8 aTraId );
       
   224 
       
   225         /**
       
   226         * Send Request to start reading Entry
       
   227         * @param TUitn8 aTransId : TransactionId
       
   228         * @return TInt : errorValue
       
   229         */
       
   230         TInt StartReadingEntry( TUint8 aTransId );
       
   231 
       
   232         /**
       
   233         * Creates Entry to append in the internal List
       
   234         * @param TInt aLocation : Entry Index
       
   235         */
       
   236         void CreateInternalPbEntryL(
       
   237             const TInt aLocation );
       
   238 
       
   239         /**
       
   240         * Creates Entry to append in the Sharing Buffer
       
   241         * @param TInt aLocation : Entry Index
       
   242         * @TBool &aAllocatedNow . If the Entry is Allocated now 
       
   243         * or returned earlier allocated entry
       
   244         * @return CPhoneBookStoreEntry* : Entry pointer
       
   245         */
       
   246         CPhoneBookStoreEntry* CreateReadPbEntryL(
       
   247             const TInt aLocation, TBool& aAllocatedNow );
       
   248 
       
   249         /**
       
   250         * Search for Index for respective FileId in respective FileList
       
   251         * @param TUint8 aFileTag : FileTag needs to be searched
       
   252         * @param RArray <TPrimitiveTag>& aFileList : FileList in 
       
   253         * which search needs to be done
       
   254         * @param TUinr8 aOffset : offset for start index
       
   255         * @return TInt : KErrNone or KErrNotFound
       
   256         */
       
   257         TInt SearchForFileTagIndex(
       
   258                     TUint8 aFileTag,
       
   259                     RArray <TPrimitiveTag>& aFileList,
       
   260                     TUint8 aOffset );
       
   261 
       
   262         /**
       
   263         * Send request to read next Type 2 file
       
   264         * @param TInt aTraId : Transaction id
       
   265         * @return TInt : KErrNone or KErrNotFound
       
   266         */
       
   267         TInt CheckForNextType2Read( TInt aTraId );
       
   268         
       
   269         /**
       
   270         * Get next used Type 2 File index
       
   271         * @param TInt aOffset : offset to start location
       
   272         * @return TInt : KErrNone or KErrNotFound
       
   273         */
       
   274         TInt GetNextUsedType2FileRecord( TInt &aOffset );
       
   275 
       
   276         /**
       
   277         * GetNext valid Type1 FileId 
       
   278         * @return TInt : KErrNotFound ot KErrNone
       
   279         */
       
   280         TInt GetNextType1File();
       
   281 
       
   282         /**
       
   283         * Check Entry is Empty or not
       
   284         * @param TUint8 aFileType : Type1 Type1 or Type3
       
   285         * @param TDesC8 &aFileData 
       
   286         * @return TBool : ETrue or EFalse
       
   287         */
       
   288         TBool CheckForEmptyEntry(
       
   289             const TUint8 aFileType,
       
   290             const TDesC8 &aFileData );
       
   291 
       
   292         /**
       
   293         * Get the empty record pattern for 
       
   294         * all ADN 3G Files
       
   295         * @param  TUint8 aFileType : Type1 Type2 or Type3
       
   296         * @param  TDes8& aEmptyPattern : Empty pattern for file
       
   297         */
       
   298         void GetEmptyRecordPattern(
       
   299             const TUint8 aFileType,
       
   300             TDes8& aEmptyPattern );
       
   301 
   101     public: // Data
   302     public: // Data
   102         // None
   303         // None
   103 
   304 
   104     protected: // Data
   305     protected: // Data
   105         // None
   306         // None
   106 
   307 
   107     private: // Data
   308     private: // Data
   108         // None
   309         // None
   109 
   310 
   110 
   311         // Attribute to store the Current PBR rrecord number
   111         // List of Pbr Files records
   312         TUint8 iCurrentPBRRecordNo;
   112         RArray <TPrimitiveTag> iPBRFileRecordArray;
   313         
       
   314         // Attribute to store the current EF record number
       
   315         TUint8 iCurrentEfEntryIndex;
       
   316         
       
   317         // Attribute to store the Current Phase ongoing
       
   318         TPBAdn3GReadPhases iCurrentReadPhase;
       
   319 
       
   320         // stores type 1 file list from EFpbr
       
   321         RArray <TPrimitiveTag> iType1FileArray;
       
   322         
       
   323         // stores type 2 file list from EFpbr
       
   324         RArray <TPrimitiveTag> iType2FileArray;
       
   325         
       
   326         // stores type 3 file list from EFpbr
       
   327         RArray <TPrimitiveTag> iType3FileArray;
       
   328         
       
   329         // Attribute Store the current type 1 file reading
       
   330         TInt iCurrentType1Ef;
       
   331         
       
   332         // Attribute to Current Type2 File
       
   333         TInt iCurrentType2Ef;
       
   334         
       
   335         // Attribute to store information about typeFileoperation ongoing
       
   336         TBool iType2OperationOngoing;
   113 
   337 
   114 
   338 
   115 };
   339 };
   116 
   340 
   117 #endif // _CMMPHONEBOOK_OPERATION_READ_H
   341 #endif // _CMMPHONEBOOK_OPERATION_READ_H