CBaNamedPlugins::CParameters Class Reference

#include <banamedplugins.h>

class CBaNamedPlugins::CParameters : public CBase

Inherits from

  • CBaNamedPlugins::CParameters

    Detailed Description

    The parameters for a localised list of plug-in names.

    An object of this class is passed to CBaNamedPlugins::NewL() and NewLC(). The parameters are as follows - minimally, the first two must be provided:

    An array of TResourceFile objects. Each object contains information about a single plug-in, or multiple plug-ins, including the filename of the corresponding resource file. Versions of these resource files with the correct filename extensions for the required languages provide the name of one or more plug-in, translated appropriately.

    A connected session with the file server. This is required to search the file sytem for the localised resource files, then to open them for reading.

    An optional object that generates a fallback name for plug-ins, if no resource file could be found. If no such function is provided, then the fallback name used for plug-ins is simply the filename of the resource file without the drive, directory path or extension.

    An optional function that compares two plug-in names for sorting. The list is sorted after it has been fully populated, using this algorithm. If not specified, sorting is done by using the system-wide (locale-dependent) collation rules.

    An optional descriptor which, if provided, adds an additional item whose meaning is "none" (i.e. "no plug-in") to the MDesCArray, and the array position (either the start or the end of the array) at which to insert it.

    Constructor & Destructor Documentation

    ~CParameters ( )

    IMPORT_C~CParameters()[virtual]

    Destructor. Deletes all resources owned by the object.

    Member Function Documentation

    NewL ( RFs &, const TArray< TResourceFile > & )

    IMPORT_C CParameters *NewL(RFs &aFileServerSession,
    const TArray< TResourceFile > &aArrayOfResourceFiles
    )[static]

    Allocates and constructs a new parameters object.

    ParameterDescription
    aFileServerSessionA connected session with the file server. This is required to search the file sytem for the localised resource files, and to open them for reading.
    aArrayOfResourceFilesArray of TResourceFile objects. Each object contains information about a single plug-in, if its iFormat attribute is set to EFormatTbuf or potentially multiple plug-ins if its iFormat attribute is set to EFormatArrayOfUidNamePairs. This information includes the filename of its resource file. The CParameters object takes a copy of this array.

    Returns: The new parameters object.

    NewLC ( RFs &, const TArray< TResourceFile > & )

    IMPORT_C CParameters *NewLC(RFs &aFileServerSession,
    const TArray< TResourceFile > &aArrayOfResourceFiles
    )[static]

    Allocates and constructs a new parameters object. The object is left on the cleanup stack.

    ParameterDescription
    aFileServerSessionA connected session with the file server. This is required to search the file sytem for the localised resource files and to open them for reading.
    aArrayOfResourceFilesArray of TResourceFile objects. Each object contains information about a single plug-in, if its iFormat attribute is set to EFormatTbuf or potentially multiple plug-ins if its iFormat attribute is set to EFormatArrayOfUidNamePairs. This information includes the filename of its resource file. The CParameters object takes a copy of this array.

    Returns: The new parameters object.

    SetCompareNames ( TCompareNames )

    IMPORT_C voidSetCompareNames(TCompareNamesaCompareNames)

    Sets a function that compares two plug-in names for sorting. The plug-in names list is sorted after it has been fully populated, using this algorithm. If SetCompareNames() is not called, collation takes place by default using TDesC::CompareC().

    ParameterDescription
    aCompareNamesA function that compares two plug-in names for sorting.

    SetFallBackName ( const MFallBackName & )

    IMPORT_C voidSetFallBackName(const MFallBackName &aFallBackName)

    Sets a function that generates a fallback name for plug-ins for which no resource file could be found. If SetFallBackName() is not called, then by default the fallback name used for plug-ins is simply the filename of the resource file without the drive, directory path or extension.

    ParameterDescription
    aFallBackNameAn instance of an MFallBackName-derived class. This should implement a function which creates a name for plug-ins for which there is no resource available (the "fallback" name).

    SetTextForNone ( HBufC *, TArrayPosition )

    IMPORT_C voidSetTextForNone(HBufC *aTextForNone,
    TArrayPositionaArrayPositionOfTextForNone
    )

    Sets a text string, representing the choice of no plug-in and the array position at which to insert it. This function increases the length of the plug-in names list by one because it creates and adds an item to the array which is empty except for the text string specified. The function cannot leave because nothing is allocated ownership of aTextForNone is passed to the CParameters object.

    ParameterDescription
    aTextForNoneThe string whose meaning is "none", i.e. no plug-in. It is assumed that this descriptor has already been localised.
    aArrayPositionOfTextForNoneWhether the string should be inserted at the start or appended to the end of the array.

    SetTextForNoneL ( const TDesC &, TArrayPosition )

    IMPORT_C voidSetTextForNoneL(const TDesC &aTextForNone,
    TArrayPositionaArrayPositionOfTextForNone
    )

    Sets a text string, representing the choice of no plug-in and the array position at which to insert it. This function increases the length of the plug-in names list by one because it creates and adds an item to the array which is empty except for the text string specified.

    ParameterDescription
    aTextForNoneThe string whose meaning is "none", i.e. no plug-in. It is assumed that this descriptor has already been localised.
    aArrayPositionOfTextForNoneWhether the string should be inserted at the start or appended to the end of the array.