1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/Pbk2ContactNameFormatterFactory.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,116 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Phonebook 2 contact name formatter factory.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef PBK2CONTACTNAMEFORMATTERFACTORY_H
1.23 +#define PBK2CONTACTNAMEFORMATTERFACTORY_H
1.24 +
1.25 +// INCLUDES
1.26 +#include <e32base.h>
1.27 +
1.28 +// FORWARD DECLARATIONS
1.29 +class MVPbkFieldTypeList;
1.30 +class MPbk2ContactNameFormatter;
1.31 +class CPbk2SortOrderManager;
1.32 +class TResourceReader;
1.33 +class RFs;
1.34 +
1.35 +// CLASS DECLARATION
1.36 +
1.37 +/**
1.38 + * Phonebook 2 contact name formatter factory.
1.39 + * Pbk2ContactNameFormatterFactory is responsible for creating
1.40 + * name formatter objects.
1.41 + *
1.42 + * @see MPbk2ContactNameFormatter
1.43 + */
1.44 +class Pbk2ContactNameFormatterFactory
1.45 + {
1.46 + public: // Interface
1.47 +
1.48 + /**
1.49 + * Creates and returns an MPbk2ContactNameFormatter instance.
1.50 + * Uses Phonebook default unnamed text.
1.51 + *
1.52 + * @param aMasterFieldTypeList Master field type list of
1.53 + * Virtual Phonebook. Should be the
1.54 + * FieldTypes() from CVPbkContactManager.
1.55 + * @param aSortOrderManager Sort order manager for fetching
1.56 + * current sort order.
1.57 + * @param aFs A file system session reference for
1.58 + * resource file handling. If NULL then
1.59 + * an own session is created.
1.60 + * @return A new MPbk2ContactNameFormatter instance.
1.61 + */
1.62 + IMPORT_C static MPbk2ContactNameFormatter* CreateL(
1.63 + const MVPbkFieldTypeList& aMasterFieldTypeList,
1.64 + const CPbk2SortOrderManager& aSortOrderManager,
1.65 + RFs* aFs = NULL );
1.66 +
1.67 + /**
1.68 + * Creates and returns an MPbk2ContactNameFormatter instance.
1.69 + *
1.70 + * @param aUnnamedText Text to use for unnamed contacts.
1.71 + * @param aMasterFieldTypeList Master field type list of
1.72 + * Virtual Phonebook. Should be the
1.73 + * FieldTypes() from CVPbkContactManager.
1.74 + * @param aSortOrderManager Sort order manager for fetching
1.75 + * current sort order.
1.76 + * @param aFs A file system session reference for
1.77 + * resource file handling. If NULL then
1.78 + * an own session is created.
1.79 + * @return A new MPbk2ContactNameFormatter instance.
1.80 + */
1.81 + IMPORT_C static MPbk2ContactNameFormatter* CreateL(
1.82 + const TDesC& aUnnamedText,
1.83 + const MVPbkFieldTypeList& aMasterFieldTypeList,
1.84 + const CPbk2SortOrderManager& aSortOrderManager,
1.85 + RFs* aFs = NULL );
1.86 +
1.87 + /**
1.88 + * Creates and returns an MPbk2ContactNameFormatter instance.
1.89 + *
1.90 + * @param aMasterFieldTypeList Master field type list of
1.91 + * Virtual Phonebook. Should be the
1.92 + * FieldTypes() from CVPbkContactManager.
1.93 + * @param aSortOrderManager Sort order manager for fetching
1.94 + * current sort order.
1.95 + * @param aTitleFieldSelectorReader VPBK_FIELD_TYPE_SELECTOR
1.96 + * from VPbkFieldType.rh
1.97 + * Defines field types that can be
1.98 + * used for name formatting
1.99 + * @param aUnnamedText Text to use for unnamed contacts.
1.100 + * If NULL then default text is used
1.101 + * @param aFs A file system session reference for
1.102 + * resource file handling. If NULL then
1.103 + * an own session is created.
1.104 + * @return A new MPbk2ContactNameFormatter instance.
1.105 + */
1.106 + IMPORT_C static MPbk2ContactNameFormatter* CreateL(
1.107 + const MVPbkFieldTypeList& aMasterFieldTypeList,
1.108 + const CPbk2SortOrderManager& aSortOrderManager,
1.109 + TResourceReader& aTitleFieldSelectorReader,
1.110 + const TDesC* aUnnamedText,
1.111 + RFs* aFs = NULL );
1.112 +
1.113 + private: // Disabled functions
1.114 + Pbk2ContactNameFormatterFactory();
1.115 + };
1.116 +
1.117 +#endif // PBK2CONTACTNAMEFORMATTERFACTORY_H
1.118 +
1.119 +// End of File