phoneapp/phoneuivoipextension/src/cphoneresourceresolvervoip.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
    17 
    17 
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 #include <bautils.h>
    20 #include <bautils.h>
    21 #include <AknUtils.h>
    21 #include <AknUtils.h>
    22 #include "phoneresourceids.h"
    22 #include <phoneuivoip.rsg>
    23 #include <data_caging_path_literals.hrh>
    23 #include <data_caging_path_literals.hrh>
    24 #include "cphoneresourceresolvervoip.h"
    24 #include "cphoneresourceresolvervoip.h"
    25 #include "cphonemainresourceresolver.h"
    25 #include "cphonemainresourceresolver.h"
    26 #include "phonerssvoip.h"
    26 #include "phonerssvoip.h"
    27 
    27 
    42 // Symbian 2nd phase constructor can leave.
    42 // Symbian 2nd phase constructor can leave.
    43 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    44 //
    44 //
    45 void CPhoneResourceResolverVoIP::ConstructL()
    45 void CPhoneResourceResolverVoIP::ConstructL()
    46     {
    46     {
       
    47     // Add resource file
       
    48     // Create path to default resource file name
       
    49     TFileName path( KDriveZ );
       
    50     path.Append( KDC_APP_RESOURCE_DIR );
       
    51     path.Append( KPhoneResourceFileVoIP );
       
    52 
       
    53     RFs &fsSession= iEnv.FsSession();
       
    54     BaflUtils::NearestLanguageFile( fsSession, path );
       
    55     iVoIPResourceOffset = iEnv.AddResourceFileL( path );
       
    56 
       
    57     BaseConstructL();
       
    58     
    47     // Register resolver
    59     // Register resolver
    48     CPhoneMainResourceResolver::Instance()->RegisterResolver( this );
    60     CPhoneMainResourceResolver::Instance()->RegisterResolver( this );
    49     }
    61     }
    50 
    62 
    51 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
    64     }
    76     }
    65 
    77 
    66 // Destructor
    78 // Destructor
    67 CPhoneResourceResolverVoIP::~CPhoneResourceResolverVoIP()
    79 CPhoneResourceResolverVoIP::~CPhoneResourceResolverVoIP()
    68     {
    80     {
       
    81     iEnv.DeleteResourceFile( iVoIPResourceOffset );
    69     }
    82     }
    70 
    83 
    71 // -----------------------------------------------------------------------------
    84 // -----------------------------------------------------------------------------
    72 // CPhoneResourceResolverVoIP::ResolveResourceID
    85 // CPhoneResourceResolverVoIP::ResolveResourceID
    73 // Resolve resource id of given resource.
    86 // Resolve resource id of given resource.
   152         case EPhoneVoIPNetworkError:
   165         case EPhoneVoIPNetworkError:
   153             retVal = R_VOIP_NETWORK_ERROR_NOTE;
   166             retVal = R_VOIP_NETWORK_ERROR_NOTE;
   154             break;
   167             break;
   155             
   168             
   156         case EPhoneVoIPHoldFail:
   169         case EPhoneVoIPHoldFail:
   157             retVal = R_VOIP_HOLD_FAILED;
   170         	retVal = R_VOIP_HOLD_FAILED;
   158             break;
   171             break;
   159             
   172             
   160         case EPhoneVoIPHoldNumberFail:
   173         case EPhoneVoIPHoldNumberFail:
   161             retVal = R_VOIP_HOLD_NUMBER_FAILED;
   174         	retVal = R_VOIP_HOLD_NUMBER_FAILED;
   162             break;
   175             break;
   163             
   176             
   164         case EPhoneVoIPResumeFail:
   177         case EPhoneVoIPResumeFail:
   165             retVal = R_VOIP_RESUME_FAILED;
   178     		retVal = R_VOIP_RESUME_FAILED;
   166             break;
   179             break;
   167             
   180             
   168         case EPhoneVoIPResumeNumberFail:
   181         case EPhoneVoIPResumeNumberFail:
   169             retVal = R_VOIP_RESUME_NUMBER_FAILED;
   182     		retVal = R_VOIP_RESUME_NUMBER_FAILED;
   170             break;
   183             break;
   171             
   184             
   172         case EPhoneVoIPSwapFail:
   185        	case EPhoneVoIPSwapFail:
   173             retVal = R_VOIP_SWAP_FAILED;
   186     		retVal = R_VOIP_SWAP_FAILED;
   174             break;
   187             break;
   175         
   188         
   176         case EPhoneVoIPConferenceHoldFail:
   189         case EPhoneVoIPConferenceHoldFail:
   177             retVal = R_VOIP_CONFERENCE_HOLD_FAILED;
   190     		retVal = R_VOIP_CONFERENCE_HOLD_FAILED;
   178             break;
   191             break;
   179         
   192         
   180         case EPhoneVoIPConferenceResumeFail:
   193         case EPhoneVoIPConferenceResumeFail:
   181             retVal = R_VOIP_CONFERENCE_RESUME_FAILED;
   194     		retVal = R_VOIP_CONFERENCE_RESUME_FAILED;
   182             break;
   195             break;
   183 
   196 
   184         case EPhoneVoIPTransferFail:
   197         case EPhoneVoIPTransferFail:
   185             retVal = R_VOIP_TRANSFER_FAILED_NOTE;
   198             retVal = R_VOIP_TRANSFER_FAILED_NOTE;
   186             break;
   199             break;
   189             break;
   202             break;
   190         case EPhoneVoIPCallTypeInternet:
   203         case EPhoneVoIPCallTypeInternet:
   191             retVal = R_VOIP_CALL_TYPE_INTERNET;
   204             retVal = R_VOIP_CALL_TYPE_INTERNET;
   192             break;
   205             break;
   193         case EPhoneVoIPNumberAcqXSPCall:
   206         case EPhoneVoIPNumberAcqXSPCall:
       
   207             retVal = R_PHONEUI_NUMBERACQ_OPTIONS_CALL_MENU_ITEM_XSP;
   194             break;
   208             break;
   195         case EPhoneVoIPUnattendedTransferOption:  
   209         case EPhoneVoIPUnattendedTransferOption:  
   196             retVal = R_VOIP_UNATTENDED_TRANSFER_OPTION;       
   210             retVal = R_VOIP_UNATTENDED_TRANSFER_OPTION;       
   197             break;
   211             break;
   198         case EPhoneVoIPUnattendedTransferAcceptanceQueryIdentified:
   212         case EPhoneVoIPUnattendedTransferAcceptanceQueryIdentified:
   203             break;
   217             break;
   204         case EPhoneVoIPUnattendedTransferAcceptanceQueryHeader:
   218         case EPhoneVoIPUnattendedTransferAcceptanceQueryHeader:
   205             retVal = R_PHONE_VOIP_QUERY_ACC_ID_HEADER;
   219             retVal = R_PHONE_VOIP_QUERY_ACC_ID_HEADER;
   206             break;
   220             break;
   207         case EPhoneVoIPTransferAddress:
   221         case EPhoneVoIPTransferAddress:
   208             retVal = R_VOIP_TRANSFER_ADDRESS;
   222             retVal = R_VOIP_DIALER_UNATT_TRANSFER_INPUT_FIELD_TEXT;           
   209             break;
   223             break;
   210         case EPhoneVoIPTransferDialerNumberEntryEmptyMenubar:
   224         case EPhoneVoIPTransferDialerNumberEntryEmptyMenubar:
   211             retVal = R_PHONEUIDIALER_NUMBERENTRY_EMPTY_TRANSFER_MENUBAR;
   225             retVal = R_PHONEUIDIALER_NUMBERENTRY_EMPTY_TRANSFER_MENUBAR;
   212             break;
   226             break;
   213         case EPhoneVoIPTransferDialerNumberEntryNotEmptyMenubar:
   227         case EPhoneVoIPTransferDialerNumberEntryNotEmptyMenubar:
   263             break;
   277             break;
   264         case EPhoneVoIPMovedPermanentlyQueryHeader:
   278         case EPhoneVoIPMovedPermanentlyQueryHeader:
   265             retVal = R_PHONEUI_VOIP_QUERY_HEADER_MOVED_PERMANENTLY;
   279             retVal = R_PHONEUI_VOIP_QUERY_HEADER_MOVED_PERMANENTLY;
   266             break;
   280             break;
   267         case EPhoneVoIPMovedPermanentlySoftkeys:
   281         case EPhoneVoIPMovedPermanentlySoftkeys:
   268             //retVal = R_PHONE_VOIP_SOFTKEYS_OK_END_CALL;
   282             retVal = R_AVKON_SOFTKEYS_OK_ENDCALL;
   269             retVal = R_AVKON_SOFTKEYS_OK_CANCEL;
       
   270             break;
   283             break;
   271         case EPhoneVoIPMultipleChoicesListQuery:
   284         case EPhoneVoIPMultipleChoicesListQuery:
   272             retVal = R_PHONE_VOIP_MULTIPLE_CHOICES_LIST_QUERY;
   285             retVal = R_PHONE_VOIP_MULTIPLE_CHOICES_LIST_QUERY;
   273             break;
   286             break;
   274         case EPhoneVoIPNoConnectionsDefined:
   287         case EPhoneVoIPNoConnectionsDefined:
   283         case EPhoneVoIPNotAvailableWhenConnecting:
   296         case EPhoneVoIPNotAvailableWhenConnecting:
   284             retVal = R_PHONE_VOIP_CONNECTION_NOT_AVAILABLE_DURING_ALR;
   297             retVal = R_PHONE_VOIP_CONNECTION_NOT_AVAILABLE_DURING_ALR;
   285             break;
   298             break;
   286         case EPhoneVoIPDefectiveSettings:
   299         case EPhoneVoIPDefectiveSettings:
   287             retVal = R_PHONE_VOIP_CREATING_CONN_FAILED_PERMANENTLY;
   300             retVal = R_PHONE_VOIP_CREATING_CONN_FAILED_PERMANENTLY;
   288             break;
   301 			break;
   289         default:
   302         case EPhoneVoIPTransferCallBackHeader:
       
   303             retVal = R_VOIP_TRANSFER_CALL_BACK_HEADER;
       
   304             break;
       
   305         case EPhoneVoIPTransferCallBackText:
       
   306             retVal = R_VOIP_TRANSFER_CALL_BACK;
       
   307             break;
       
   308 		default:
   290             retVal = CPhoneResourceResolverGSM::ResolveResourceID( aResource );
   309             retVal = CPhoneResourceResolverGSM::ResolveResourceID( aResource );
   291             break;
   310             break;
   292         }
   311         }
   293 
   312 
   294     return retVal;
   313     return retVal;