epoc32/include/app/cpbkdatasaveappui.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h) This is the epoc32/include tree with the "platform" subtrees removed, and all but a selected few mbg and rsg files removed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     1
/*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     3
* All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     4
* This component and the accompanying materials are made available
4
837f303aceeb Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents: 2
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     6
* which accompanies this distribution, and is available
4
837f303aceeb Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents: 2
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     8
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     9
* Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    10
* Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    11
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    12
* Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    13
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    14
* Description: 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    15
*    Phonebook Data Save service helper. Implements "Save to phonebook" 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    16
*    menu functionality for external applications.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    17
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    18
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    19
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    20
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    21
#ifndef __CPbkDataSaveAppUi_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    22
#define __CPbkDataSaveAppUi_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    23
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    24
//  INCLUDES
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    25
#include <e32base.h>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    26
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    27
// FORWARD DECLARATIONS
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    28
class CEikMenuPane;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    29
class CPbkContactEngine;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    30
class CPbkContactItem;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    31
class CPbkFieldInfo;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    32
class MPbkDataSaveCallback;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    33
class CPbkFFSCheck;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    34
class CPbkExtGlobals;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    35
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    36
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    37
// CLASS DECLARATION
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    38
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    39
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    40
 * Phonebook Data Save service helper. Implements "Save to phonebook" 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    41
 * menu functionality for external applications.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    42
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    43
 * Note that in most cases current status pane layout is replaced with the
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    44
 * Phonebook one. Restoring the original pane is left to be
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    45
 * the responsibility of the client.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    46
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    47
class CPbkDataSaveAppUi : public CBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    48
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    49
    public:  // Interface
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    50
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    51
         * Creates an instance of this class.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    52
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    53
         * @param aEngine   Phonebook engine instance.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    54
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    55
        IMPORT_C static CPbkDataSaveAppUi* NewL(CPbkContactEngine& aEngine);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    56
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    57
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    58
         * Destructor. Destroys this object and cancels any open dialogs.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    59
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    60
        ~CPbkDataSaveAppUi();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    61
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    62
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    63
         * Adds Phonebook data save menu items to a menu pane. Called from 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    64
         * applications DynInitMenuPaneL. This call is not mandatory: 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    65
         * if the application provides its own menus it may call
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    66
         * HandleCommandL directly from menu's command handler.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    67
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    68
         * @param aMenuPane     Menu pane where to add the menu items.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    69
         * @param aCommandId    Id of command which to replace with Phonebook
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    70
         *                      data save menu items. This command id is stored
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    71
         *                      into this object as the base id after which are
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    72
         *                      app-specific command Ids reserved for Phonebook
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    73
         *                      data save API usage.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    74
         * @see DynInitMenuPaneL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    75
         * @see HandleCommandL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    76
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    77
        IMPORT_C void AddMenuItemsL(CEikMenuPane* aMenuPane, TInt aCommandId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    78
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    79
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    80
         * Updates Phonebook data save menu items. Called from applications 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    81
         * DynInitMenuPaneL. This call is not mandatory: if the application 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    82
         * provides its own menus it may call HandleCommandL directly 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    83
         * from menu's command handler.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    84
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    85
         * @param aResourceId   Resource id of the menu pane as passed to 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    86
         *                      MEikMenuObserver::DynInitMenuPaneL. If this 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    87
         *                      resource id does not match with Phonebook data
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    88
         *                      save submenu this function does nothing.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    89
         * @param aMenuPane     Menu pane as passed to 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    90
         *                      MEikMenuObserver::DynInitMenuPaneL.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    91
         * @see AddMenuItemsL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    92
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    93
        IMPORT_C void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    94
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    95
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    96
         * Handles a menu command inserted by AddMenuItemsL.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    97
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    98
         * @param aCommandId        Command to execute. iBaseCommandId+1 is
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    99
         *                          Create New Entry and iBaseCommandId+2 is
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   100
         *                          Add to Existing Entry. Use directly 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   101
         *                          EPbkCmdDataSaveCreateNew or EPbkCmdDataSaveAddToExisting
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   102
         *                          if AddMenuItemsL is not called.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   103
         * @param aFieldTypes       Field types where the user can select from.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   104
         *                          If there is only one field type selection
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   105
         *                          list is not displayed.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   106
         * @param aText             Text to put to the selected field.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   107
         * @param aCallback         Calls back to this object if there are 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   108
         *                          problems in adding the field. See 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   109
         *                          MPbkDataSaveCallback class for details.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   110
         * @return  ETrue if the command was executed and the data added, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   111
         *          EFalse if the operation was canceled in any stage.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   112
         * @see AddMenuItemsL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   113
         * @see MPbkDataSaveCallback
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   114
         * @see TPbkDataSaveCommandId in PbkDataSaveAppUi.hrh
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   115
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   116
        IMPORT_C TBool HandleCommandL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   117
            (TInt aCommandId, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   118
            CArrayPtr<CPbkFieldInfo>& aFieldTypes,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   119
            const TDesC& aText,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   120
            MPbkDataSaveCallback* aCallback=NULL);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   121
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   122
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   123
         * Handles a menu command inserted by AddMenuItemsL.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   124
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   125
         * @param aCommandId        Command to execute. iBaseCommandId+1 is
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   126
         *                          Create New Entry and iBaseCommandId+2 is
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   127
         *                          Add to Existing Entry. Use directly 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   128
         *                          EPbkCmdDataSaveCreateNew or EPbkCmdDataSaveAddToExisting
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   129
         *                          if AddMenuItemsL is not called.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   130
         * @param aFieldTypes       Field types where the user can select from.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   131
         *                          If there is only one field type selection
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   132
         *                          list is not displayed.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   133
         * @param aDate             Date to put to the selected field.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   134
         * @param aCallback         Calls back to this object if there are 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   135
         *                          problems in adding the field. See 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   136
         *                          MPbkDataSaveCallback class for details.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   137
         * @return  ETrue if the command was executed and the data added, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   138
         *          EFalse if the operation was canceled in any stage.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   139
         * @see AddMenuItemsL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   140
         * @see MPbkDataSaveCallback
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   141
         * @see TPbkDataSaveCommandId in PbkDataSaveAppUi.hrh
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   142
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   143
        IMPORT_C TBool HandleCommandL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   144
            (TInt aCommandId, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   145
            CArrayPtr<CPbkFieldInfo>& aFieldTypes,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   146
            const TTime& aDate,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   147
            MPbkDataSaveCallback* aCallback=NULL);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   148
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   149
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   150
         * Hides the "Exit" command from contact editor's options menu.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   151
         * Call this function after creating this object.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   152
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   153
        IMPORT_C void HideEditorExitCommand();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   154
        
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   155
    private:  // Implementation
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   156
        class MFieldData;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   157
        class CTextFieldData;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   158
        class CDateFieldData;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   159
        class CCommandBase;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   160
        class CCreateNewCommand;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   161
        class CAddToExistingCommand;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   162
        CPbkDataSaveAppUi(CPbkContactEngine& aEngine);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   163
        void ConstructL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   164
        TBool DoHandleCommandL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   165
            (TInt aCommandId, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   166
            CArrayPtr<CPbkFieldInfo>& aFieldTypes,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   167
            MFieldData& aFieldData,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   168
            MPbkDataSaveCallback* aCallback);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   169
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   170
    private:  // Data
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   171
        /// Ref: Phonebook engine instance
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   172
        CPbkContactEngine* iEngine;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   173
        /// Own: FFS space checker
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   174
        CPbkFFSCheck* iFFSCheck;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   175
        /// Own: base command id
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   176
        TInt iBaseCommandId;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   177
        /// Own: the currently executing command
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   178
        CCommandBase* iExecutingCommand;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   179
        /// Own: flags
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   180
        TUint iFlags;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   181
        /// Own: handle to UI extension factory
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   182
        CPbkExtGlobals* iExtGlobals;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   183
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   184
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   185
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   186
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   187
 * Callback interface for CPbkDataSaveAppUi::HandleCommandL.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   188
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   189
class MPbkDataSaveCallback
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   190
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   191
    public:  // Interface
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   192
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   193
         * Called by CPbkDataSaveAppUi::HandleCommandL if there is no field
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   194
         * available where to save the data and no new field could be added.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   195
         * Default implementation does nothing.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   196
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   197
         * @param aContact  Contact where the field cannot be added.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   198
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   199
        IMPORT_C virtual void PbkDataSaveNoFieldL(CPbkContactItem& aContact);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   200
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   201
        /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   202
         * Called from CPbkDataSaveAppUi::HandleCommandL if the aText is too 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   203
         * long to fit into field.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   204
         * Default implementation clips aText from the end. If an empty 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   205
         * string is returned the field addition is canceled.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   206
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   207
         * @param aText         The original text.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   208
         * @param aFieldInfo    The type of field where the text should be 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   209
         *                      inserted.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   210
         * @return  A substring of aText so that the substring's length is 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   211
         *          <=aFieldInfo.MaxLength().
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   212
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   213
        IMPORT_C virtual TPtrC PbkDataSaveClipTextL
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   214
            (const TDesC& aText, CPbkFieldInfo& aFieldInfo);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   215
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   216
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   217
#endif // __CPbkDataSaveAppUi_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   218
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   219
// End of File