/*
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Definitions of the copy to sim rules
*
*/

#include <VPbkEng.rsg>

// -----------------------------------------------------------------------------
//   
// R_PSU2_FIELDITEM_LIST_QUERY
// Copy field selection dialog
//
// -----------------------------------------------------------------------------
//
RESOURCE AVKON_LIST_QUERY r_psu2_fielditem_list_query
    {
    flags = EGeneralQueryFlags;
    softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
    items = 
        {
        AVKON_LIST_QUERY_DLG_LINE 
            {
            control = AVKON_LIST_QUERY_CONTROL
                {
                listtype = EAknCtSingleGraphicPopupMenuListBox;
                listbox = AVKON_LIST_QUERY_LIST
                    {
                    };
                heading = " ";
                };
            }
        };
    }

/**
 * A general copy progress note
 */
RESOURCE DIALOG r_psu2_copy_progress_note
	{
	flags = EAknProgressNoteFlags;
    buttons = R_AVKON_SOFTKEYS_CANCEL;
    items =
		{
		DLG_LINE
			{
			type = EAknCtNote;
			id = EGeneralQuery;
			control = AVKON_NOTE 
				{ 
				layout = EProgressLayout;
				singular_label = qtn_gen_note_copying;
                imagefile = AVKON_ICON_FILE;
                imageid = EMbmAvkonQgn_note_copy;
                imagemask = EMbmAvkonQgn_note_copy_mask;
				};
			}
		};
	}

// ---------------------------------------------------------
// general text query
// ---------------------------------------------------------
//
RESOURCE DIALOG r_psu2_general_text_query
	{
	flags = EGeneralQueryFlags;
	buttons =R_AVKON_SOFTKEYS_OK_CANCEL__OK;
    items =
		{
		DLG_LINE
			{
			type = EAknCtQuery;
			id = EGeneralQuery;
			control = AVKON_DATA_QUERY 
				{ 
				layout = EDataLayout;
				control = EDWIN 
                    {
					max_view_height_in_lines = 1;
                    default_case = EAknEditorTextCase;
					allowed_case_modes = EAknEditorAllCaseModes;
                    };
				};
			}
		};
	}

// ---------------------------------------------------------
// general number query
// ---------------------------------------------------------
//
RESOURCE DIALOG r_psu2_general_number_query
	{
	flags = EGeneralQueryFlags;
	buttons =R_AVKON_SOFTKEYS_OK_CANCEL__OK;
    items =
		{
		DLG_LINE
			{
			type = EAknCtQuery;
			id = EGeneralQuery;
			control = AVKON_DATA_QUERY 
				{ 
				layout = EPhoneLayout;
				control = EDWIN 
                    {
					max_view_height_in_lines = 1;
					allowed_input_modes = EAknEditorNumericInputMode;
					default_input_mode =  EAknEditorNumericInputMode;
                    };
				};
			}
		};
	}


// -----------------------------------------------------------------------------
//   
// R_PSU2_NOTE_COPY_NOT_WORK
// Error Note for Copy To Sim, with no success.
//
// -----------------------------------------------------------------------------
//
RESOURCE AKN_NOTE_WRAPPER r_psu2_note_copy_not_work
    {
    resId = R_AKN_ERROR_NOTE_DIALOG_WAIT;
    timeout = EAknErrorNoteTimeout;
    tone = EAknNoteDialogErrorTone;
    text = qtn_pbcop_note_copy_not_work;
    }
	
// -----------------------------------------------------------------------------
//   
// R_PSU2_COPY_TO_SIM_FIELDTYPE_MAPPINGS
// A array that defines the rules for copying fields to the sim
//
// -----------------------------------------------------------------------------
//
RESOURCE PSU2_COPY_TO_SIM_FIELDTYPE_MAPPINGS r_psu2_copy_to_sim_fieldtype_mappings
    {
    items =
        {
        PSU2_COPY_TO_SIM_FIELDTYPE_MAPPING
            {
            // Source: all email types
            sourceTypeSelector = VPBK_FIELD_TYPE_SELECTOR
                {
                versitProperties = 
                    {
                    VBK_FIELD_VERSIT_PROPERTY
                        {
                        name = EVPbkVersitNameEMAIL;
                        }
                    };
                };
            // Target: USIM supports only general email
            targetSimType = R_VPBK_FIELD_TYPE_EMAILGEN;
            iBlockingError = KPsu2EMailFullError;
            },
        PSU2_COPY_TO_SIM_FIELDTYPE_MAPPING
            {
            // Source: all number types
            sourceTypeSelector = VPBK_FIELD_TYPE_SELECTOR
                {
                versitProperties = 
                    {
                    VBK_FIELD_VERSIT_PROPERTY
                        {
                        name = EVPbkVersitNameTEL;
                        },
                    VBK_FIELD_VERSIT_PROPERTY
                        {            
                        name = EVPbkVersitNameX;
                        extensionName = "X-ASSISTANT-TEL";            
                        }
                    };
                nonVersitType =
                    {
                    EVPbkNonVersitTypeDTMF
                    };
                };
            // Target: SIM supports only mobile general
            targetSimType = R_VPBK_FIELD_TYPE_MOBILEPHONEGEN;
            flags = 0;
            },
        PSU2_COPY_TO_SIM_FIELDTYPE_MAPPING
            {
            // Source: nick name
            sourceTypeSelector = VPBK_FIELD_TYPE_SELECTOR
                {
                versitProperties =
                    {
                    VBK_FIELD_VERSIT_PROPERTY
                        {
                        name = EVPbkVersitNameX;
                        extensionName = "X-NICKNAME";
                        }
                    };
                };
            // Target: nick name
            targetSimType = R_VPBK_FIELD_TYPE_SECONDNAME;
            // Nick name can be truncated.
            flags = KPsu2AllowedToTruncate;
            iBlockingError = KPsu2SecondNameFullError;
            }
        };
    }

// End of File


