contentstorage/caclient/s60/inc/caobjectadapter.h
changeset 87 9d806967057c
parent 86 e492551a0d54
child 88 7f0462e8c3da
equal deleted inserted replaced
86:e492551a0d54 87:9d806967057c
    52      * Converts entry to inner entry.
    52      * Converts entry to inner entry.
    53      * @param fromEntry entry to be converted
    53      * @param fromEntry entry to be converted
    54      * @param toEntry inner entry resulting from conversion
    54      * @param toEntry inner entry resulting from conversion
    55      */
    55      */
    56     static void convertL(
    56     static void convertL(
    57         const CaEntry& fromEntry,
    57         const CaEntry &fromEntry,
    58         CCaInnerEntry& toEntry);
    58         CCaInnerEntry &toEntry);
    59 
    59 
    60     /**
    60     /**
    61      * Converts inner entry to entry.
    61      * Converts inner entry to entry.
    62      * @param fromEntry inner entry to be converted
    62      * @param fromEntry inner entry to be converted
    63      * @param toEntry entry resulting from conversino
    63      * @param toEntry entry resulting from conversino
    64      */
    64      */
    65     static void convert(const CCaInnerEntry& fromEntry,
    65     static void convert(const CCaInnerEntry &fromEntry,
    66         CaEntry& toEntry);
    66                         CaEntry &toEntry);
    67 
    67 
    68     /**
    68     /**
    69      * Converts query to inner query.
    69      * Converts query to inner query.
    70      * @param fromQuery query to be converted
    70      * @param fromQuery query to be converted
    71      * @param toQuery inner query resutling from conversion
    71      * @param toQuery inner query resutling from conversion
    72      */
    72      */
    73     static void convertL(
    73     static void convertL(
    74         const CaQuery& fromQuery,
    74         const CaQuery &fromQuery,
    75         CCaInnerQuery& toQuery);
    75         CCaInnerQuery &toQuery);
    76 
    76 
    77     /**
    77     /**
    78      * Wraps a QString internal buffer into TPtrC object.
    78      * Wraps a QString internal buffer into TPtrC object.
    79      * The returned object is valid until QString internal buffer changes
    79      * The returned object is valid until QString internal buffer changes
    80      * or the object is destroyed.
    80      * or the object is destroyed.
    81      * @param string QString.
    81      * @param string QString.
    82      * @return descriptor.
    82      * @return descriptor.
    83      */
    83      */
    84     static const TPtrC convertToDescriptor(const QString& string);
    84     static const TPtrC convertToDescriptor(const QString &string);
    85 
    85 
    86     /**
    86     /**
    87      * Converts descriptor to QString.
    87      * Converts descriptor to QString.
    88      * @param des descriptor.
    88      * @param des descriptor.
    89      * @return QString.
    89      * @return QString.
    90      */
    90      */
    91     static QString convertToString(const TDesC& des);
    91     static QString convertToString(const TDesC &des);
    92 
    92 
    93     /**
    93     /**
    94      * Converts inner entry table to QList of pointers to entries.
    94      * Converts inner entry table to QList of pointers to entries.
    95      * @param fromEntriesArray an array containing inner entries
    95      * @param fromEntriesArray an array containing inner entries
    96      * for conversion.
    96      * for conversion.
    97      * @param toEntriesArray list of converted entries.
    97      * @param toEntriesArray list of converted entries.
    98      */
    98      */
    99     static void convertL(
    99     static void convertL(
   100         const RPointerArray<CCaInnerEntry>& fromEntriesArray,
   100         const RPointerArray<CCaInnerEntry>& fromEntriesArray,
   101         QList<CaEntry*>& toEntriesArray);
   101         QList<CaEntry *>& toEntriesArray);
   102 
   102 
   103     /**
   103     /**
   104      * Converts QList of ids to RArray of TInts.
   104      * Converts QList of ids to RArray of TInts.
   105      * @param fromEntryIdList list of entry id
   105      * @param fromEntryIdList list of entry id
   106      * @param toEntryIdArray array of entry ids
   106      * @param toEntryIdArray array of entry ids
   107      */
   107      */
   108     static void convertL(const QList<int> &fromEntryIdList,
   108     static void convertL(const QList<int> &fromEntryIdList,
   109         RArray<TInt>& toEntryIdArray);
   109                          RArray<TInt>& toEntryIdArray);
   110 
   110 
   111     /**
   111     /**
   112      * Converts RArray of TInts to QList of ids.
   112      * Converts RArray of TInts to QList of ids.
   113      * @param fromEntryIdList an array of entry ids.
   113      * @param fromEntryIdList an array of entry ids.
   114      * @param toEntryIdList resulgin list of entry ids.
   114      * @param toEntryIdList resulgin list of entry ids.
   115      */
   115      */
   116     static void convertL(const RArray<TInt>& fromEntryIdList,
   116     static void convertL(const RArray<TInt>& fromEntryIdList,
   117         QList<int>& toEntryIdList);
   117                          QList<int>& toEntryIdList);
   118 
   118 
   119     /**
   119     /**
   120      * Converts symbian error code to error code (used in QT code).
   120      * Converts symbian error code to error code (used in QT code).
   121      */
   121      */
   122     static ErrorCode convertErrorCode(
   122     static ErrorCode convertErrorCode(
   125     /**
   125     /**
   126      * Creates icon.
   126      * Creates icon.
   127      * @param entry entry.
   127      * @param entry entry.
   128      * @return HbIcon.
   128      * @return HbIcon.
   129      */
   129      */
   130     static HbIcon makeIcon(const CaEntry& entry, const QSize &size);
   130     static HbIcon makeIcon(const CaEntry &entry, const QSize &size);
   131 
   131 
   132     /**
   132     /**
   133      * Converts notifier type to inner notifier type.
   133      * Converts notifier type to inner notifier type.
   134      * @param from notifier type.
   134      * @param from notifier type.
   135      * @param to resulting inner notifier type.
   135      * @param to resulting inner notifier type.
   136      */
   136      */
   137     static void convert(
   137     static void convert(
   138         CaNotifierPrivate::NotifierType from,
   138         CaNotifierPrivate::NotifierType from,
   139         CCaInnerNotifierFilter::TNotifierType& to);
   139         CCaInnerNotifierFilter::TNotifierType &to);
   140 
   140 
   141     /**
   141     /**
   142      * Converts inner change type to change type.
   142      * Converts inner change type to change type.
   143      * @param from inner change type.
   143      * @param from inner change type.
   144      * @param to resulting change type.
   144      * @param to resulting change type.
   145      */
   145      */
   146     static void convert(
   146     static void convert(
   147             TChangeType src, ChangeType& dest);
   147         TChangeType src, ChangeType &dest);
   148 
   148 
   149     /**
   149     /**
   150      * Converts filter to inner filter.
   150      * Converts filter to inner filter.
   151      * @param from notifier filter.
   151      * @param from notifier filter.
   152      * @param to resulting notifier filter.
   152      * @param to resulting notifier filter.
   156         CCaInnerNotifierFilter &to);
   156         CCaInnerNotifierFilter &to);
   157 
   157 
   158     /**
   158     /**
   159      * @return  uid attribute name
   159      * @return  uid attribute name
   160      */
   160      */
   161     static const QString& applicationUidAttributeName();
   161     static const QString &applicationUidAttributeName();
   162 
   162 
   163     /**
   163     /**
   164      * @return  attribute type name
   164      * @return  attribute type name
   165      */
   165      */
   166     static const QString& applicationEntryName();
   166     static const QString &applicationEntryName();
   167     
   167 
   168     /**
   168     /**
   169      * @return  widget type name
   169      * @return  widget type name
   170      */
   170      */
   171     static const QString& widgetEntryName();
   171     static const QString &widgetEntryName();
   172 
   172 
   173     /**
   173     /**
   174      * Set entry id.
   174      * Set entry id.
   175      * @param entry entry.
   175      * @param entry entry.
   176      * @param id entry id.
   176      * @param id entry id.
   177      */
   177      */
   178     static void setId(CaEntry &entry,
   178     static void setId(CaEntry &entry,
   179         int id);
   179                       int id);
   180 
   180 
   181 private:
   181 private:
   182     /**
   182     /**
   183      * Creates icon. Leaving version.
   183      * Creates icon. Leaving version.
   184      * @param entry entry.
   184      * @param entry entry.
   185      * @return HbIcon.
   185      * @return HbIcon.
   186      */
   186      */
   187     static HbIcon makeIconL(const CaEntry& entry, const QSize &size);
   187     static HbIcon makeIconL(const CaEntry &entry, const QSize &size);
   188 
   188 
   189     /**
   189     /**
   190      * Make bitmap copy, used to get rid of compression for extended bitmap
   190      * Make bitmap copy, used to get rid of compression for extended bitmap
   191      * @param input input bitmap.
   191      * @param input input bitmap.
   192      * @return copied bitmap.
   192      * @return copied bitmap.
   193      */
   193      */
   194     static CFbsBitmap* copyBitmapLC(CFbsBitmap* input);
   194     static CFbsBitmap *copyBitmapLC(CFbsBitmap *input);
   195 
   195 
   196     /**
   196     /**
   197      * Maps a given sort subject and the order to be applied
   197      * Maps a given sort subject and the order to be applied
   198      * into a sort code used
   198      * into a sort code used
   199      * @param sortAttribute - what is to be sorted
   199      * @param sortAttribute - what is to be sorted