camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakesettingsstore.cpp
changeset 43 0e652f8f1fbd
parent 19 d9aefe59d544
child 46 c826656d6714
equal deleted inserted replaced
28:3075d9b614e6 43:0e652f8f1fbd
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    28     mSettingKeyHash.clear();
    28     mSettingKeyHash.clear();
    29     mSettingKeyHash.insert(CxeSettingIds::FNAME_FOLDER_SUFFIX, QVariant("_Nokia"));
    29     mSettingKeyHash.insert(CxeSettingIds::FNAME_FOLDER_SUFFIX, QVariant("_Nokia"));
    30     mSettingKeyHash.insert(CxeSettingIds::FNAME_MONTH_FOLDER,  QVariant("08042009"));
    30     mSettingKeyHash.insert(CxeSettingIds::FNAME_MONTH_FOLDER,  QVariant("08042009"));
    31     mSettingKeyHash.insert(CxeSettingIds::FNAME_IMAGE_COUNTER, QVariant(0));
    31     mSettingKeyHash.insert(CxeSettingIds::FNAME_IMAGE_COUNTER, QVariant(0));
    32     mSettingKeyHash.insert(CxeSettingIds::FNAME_VIDEO_COUNTER, QVariant(0));
    32     mSettingKeyHash.insert(CxeSettingIds::FNAME_VIDEO_COUNTER, QVariant(0));
       
    33     
       
    34     mSettingKeyHash.insert(CxeSettingIds::CAMERA_MODE, QVariant(0));
       
    35     mSettingKeyHash.insert(CxeSettingIds::FLASH_MODE, QVariant(0));
       
    36     mSettingKeyHash.insert(CxeSettingIds::IMAGE_SCENE,  QVariant("image_scene_auto"));
       
    37     mSettingKeyHash.insert(CxeSettingIds::VIDEO_SCENE, QVariant("video_scene_auto"));
       
    38     mSettingKeyHash.insert(CxeSettingIds::STILL_SHOWCAPTURED, QVariant(0));
       
    39     mSettingKeyHash.insert(CxeSettingIds::VIDEO_SHOWCAPTURED, QVariant(0));
       
    40     mSettingKeyHash.insert(CxeSettingIds::VIDEO_MUTE_SETTING,  QVariant(0));
       
    41     
       
    42     mSettingKeyHash.insert(CxeSettingIds::GEOTAGGING, QVariant(0));
       
    43     mSettingKeyHash.insert(CxeSettingIds::GEOTAGGING_DISCLAIMER, QVariant(1));
       
    44     mSettingKeyHash.insert(CxeSettingIds::FACE_TRACKING, QVariant(1));
       
    45     mSettingKeyHash.insert(CxeSettingIds::IMAGE_QUALITY,  QVariant(0));
       
    46     mSettingKeyHash.insert(CxeSettingIds::VIDEO_QUALITY, QVariant(0));
       
    47 
    33 }
    48 }
    34 
    49 
    35 CxeFakeSettingsStore::~CxeFakeSettingsStore()
    50 CxeFakeSettingsStore::~CxeFakeSettingsStore()
    36 {
    51 {
    37 }
    52 }
    38 
    53 
    39 /*
    54 /*!
    40 * Reads a value from cenrep
    55 * Reads a value from cenrep
    41 * @param "key"   - setting key
    56 * @param "key"   - setting key
    42 * @param "value" - setting value read from cenrep
    57 * @param "value" - setting value read from cenrep
    43 */
    58 */
    44 CxeError::Id CxeFakeSettingsStore::get(const QString& key, QVariant &value)
    59 CxeError::Id CxeFakeSettingsStore::get(const QString& key, QVariant &value)
    53     }
    68     }
    54 
    69 
    55     return error;
    70     return error;
    56 }
    71 }
    57 
    72 
    58 /*
    73 /*!
    59 * Reads a value from cenrep
    74 * Reads a value from cenrep
    60 * @param "uid"   - UID of the component that own setting key
    75 * @param "uid"   - UID of the component that own setting key
    61 * @param "key"   - setting key id
    76 * @param "key"   - setting key id
    62 * @param "type"  - type of setting key
    77 * @param "type"  - type of setting key
    63 * @param "value" - setting value read from cenrep
    78 * @param "value" - setting value read from cenrep
    64 */
    79 */
    65 void CxeFakeSettingsStore::get(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value)
    80 void CxeFakeSettingsStore::startMonitoring(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value)
    66 {
    81 {
    67     Q_UNUSED(uid);
    82     Q_UNUSED(uid);
    68     Q_UNUSED(key);
    83     Q_UNUSED(key);
    69     Q_UNUSED(type);
    84     Q_UNUSED(type);
    70     Q_UNUSED(value);
    85     Q_UNUSED(value);
    71 
    86 
    72     // no support yet
    87     // no support yet
    73 }
    88 }
    74 
    89 
    75 /*
    90 /*!
    76 * Reads/loads all run-time settings values from cenrep
    91 * Reads/loads all run-time settings values from cenrep
    77 * @param QList<QString> contains list of all runtime key ids which we use to load values from cenrep.
    92 * @param QList<QString> contains list of all runtime key ids which we use to load values from cenrep.
    78 * returns: QHash container, "contains" values associated with each key that are read from cenrep
    93 * returns: QHash container, "contains" values associated with each key that are read from cenrep
    79 * NOTE: loading runtime settings should be done only ONCE at start-up.
    94 * NOTE: loading runtime settings should be done only ONCE at start-up.
    80 */
    95 */
   104 
   119 
   105     return settings;
   120     return settings;
   106 }
   121 }
   107 
   122 
   108 
   123 
   109 /*
   124 /*!
   110 * Sets a new value to cenrep
   125 * Sets a new value to cenrep
   111 * @param "key"   - setting key
   126 * @param "key"   - setting key
   112 * @param "newValue" - new value set to the key in cenrep
   127 * @param "newValue" - new value set to the key in cenrep
   113 */
   128 */
   114 CxeError::Id CxeFakeSettingsStore::set(const QString& key, const QVariant newValue)
   129 CxeError::Id CxeFakeSettingsStore::set(const QString& key, const QVariant newValue)
   119        error =  CxeError::None;
   134        error =  CxeError::None;
   120     }
   135     }
   121     return error;
   136     return error;
   122 }
   137 }
   123 
   138 
   124 /*
   139 /*!
   125 * resets the cenrep store
   140 * resets the cenrep store
   126 */
   141 */
   127 void CxeFakeSettingsStore::reset()
   142 void CxeFakeSettingsStore::reset()
   128 {
   143 {
   129 }
   144 }