javaextensions/pim/framework/inc.s60/cpimstringarrayvalue.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Specialized string array value class
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPIMSTRINGARRAYVALUE_H
       
    20 #define CPIMSTRINGARRAYVALUE_H
       
    21 
       
    22 // INTERNAL INCLUDES
       
    23 #include "cpimvaluebase.h"
       
    24 
       
    25 // EXTERNAL INCLUDES
       
    26 #include <e32std.h>
       
    27 
       
    28 /**
       
    29  * Specialized string array value class
       
    30  * @since S60 v3.1
       
    31  */
       
    32 NONSHARABLE_CLASS(CPIMStringArrayValue) : public CPIMValueBase
       
    33 {
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      *
       
    39      * @return New instance of this class.
       
    40      */
       
    41     static CPIMStringArrayValue* NewL(TPIMAttribute aAttributes,
       
    42     CDesCArray* aStringArrayValue);
       
    43 
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      *
       
    47      * @return New instance of this class. The instance
       
    48      *         is pushed to the cleanup stack
       
    49      */
       
    50     static CPIMStringArrayValue* NewLC(TPIMAttribute aAttributes,
       
    51                                        CDesCArray* aStringArrayValue);
       
    52 
       
    53     /**
       
    54      * Destructor
       
    55      */
       
    56     virtual ~CPIMStringArrayValue();
       
    57 
       
    58 public: // Functions from CPIMValueBase
       
    59 
       
    60     /**
       
    61      * SetValue
       
    62      * Sets new string array value for this field
       
    63      * value holder. The old value will be overwritten
       
    64      *
       
    65      * @param aStringArrayValue New value
       
    66      */
       
    67     virtual void SetStringArrayValue(
       
    68         const CDesCArray* aStringArrayValue);
       
    69 
       
    70     /**
       
    71      * Value
       
    72      * Returns a reference to the value of this field
       
    73      * value holder. The value cannot be modified
       
    74      *
       
    75      * @return String array value
       
    76      */
       
    77     virtual const CDesCArray* StringArrayValue() const;
       
    78 
       
    79     /**
       
    80      * Returns the number of elements in this value
       
    81      * @return Number of elements in this value
       
    82      */
       
    83     virtual TInt NumElements() const;
       
    84 
       
    85 private:
       
    86 
       
    87     /**
       
    88      * Default C++ constructor
       
    89      */
       
    90     inline CPIMStringArrayValue(TPIMAttribute aAttributes,
       
    91                                 CDesCArray* aStringArrayValue);
       
    92 
       
    93 private: // Data
       
    94 
       
    95     // String array value. Owned
       
    96     const CDesCArray* iStringArrayValue;
       
    97 };
       
    98 
       
    99 #endif // CPIMSTRINGARRAYVALUE_H
       
   100 // End of file