# HG changeset patch # User hgs # Date 1279869419 -10800 # Node ID f8c3d4e6102c732f0c9deca1738804678b93cc1f # Parent ba22309243a18ea4d82f89970c1dfbb078bb17a9 201029 diff -r ba22309243a1 -r f8c3d4e6102c common/radio_global.h --- a/common/radio_global.h Thu Jul 08 12:44:18 2010 +0300 +++ b/common/radio_global.h Fri Jul 23 10:16:59 2010 +0300 @@ -42,6 +42,14 @@ const int DEFAULT_VOLUME_LEVEL = 4; /** + * UIDs for checking the offline mode + * Values copied from CoreApplicationUIsSDKCRKeys.h + */ +const long int CENREP_CORE_APPLICATION_UIS = 0x101F876C; +const unsigned long int ID_NETWORK_CONNECTION_ALLOWED = 0x00000001; +enum NetworkConnectionAllowed { NetworkNotAllowed = 0, NetworkAllowed }; + +/** * Roles used when interacting with the radio station model */ namespace RadioRole diff -r ba22309243a1 -r f8c3d4e6102c radioapp/buildflags.pri --- a/radioapp/buildflags.pri Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/buildflags.pri Fri Jul 23 10:16:59 2010 +0300 @@ -26,6 +26,9 @@ # Flag to use dummy radio data read from XML file # RADIOFLAGS += USE_DUMMY_RADIO_DATA +# Flag to initialize radio stations with dummy rt +# RADIOFLAGS += INIT_STATIONS_WITH_DUMMY_RT + # Functional testing # RADIOFLAGS += SHOW_CALLSIGN_IN_ANY_REGION @@ -114,11 +117,9 @@ DESTDIR = ../bin LIBS += -L../bin INCLUDEPATH += ../radioenginewrapper/inc - INCLUDEPATH += ../../internal/win32_stubs - HEADERS += ../../internal/win32_stubs/qsysteminfo.h - HEADERS += ../../internal/win32_stubs/xqserviceutil.h - HEADERS += ../../internal/win32_stubs/xqserviceprovider.h - SOURCES += ../../internal/win32_stubs/win32_stubs.cpp + INCLUDEPATH += ../radioapplication/win32_stubs + HEADERS += ../radioapplication/win32_stubs/*.h + SOURCES += ../radioapplication/win32_stubs/*.cpp } USE_UNFROZEN_EXPORTS { diff -r ba22309243a1 -r f8c3d4e6102c radioapp/bwins/fmradiowidgetsu.def --- a/radioapp/bwins/fmradiowidgetsu.def Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/bwins/fmradiowidgetsu.def Fri Jul 23 10:16:59 2010 +0300 @@ -28,27 +28,27 @@ ?init@RadioStationCarousel@@QAEXAAVRadioUiLoader@@PAVRadioUiEngine@@@Z @ 27 NONAME ; void RadioStationCarousel::init(class RadioUiLoader &, class RadioUiEngine *) ?manualSeekChanged@RadioFrequencyStrip@@IAEX_N@Z @ 28 NONAME ; void RadioFrequencyStrip::manualSeekChanged(bool) ?scrollPosChanged@RadioStationCarousel@@AAEXABVQPointF@@@Z @ 29 NONAME ; void RadioStationCarousel::scrollPosChanged(class QPointF const &) - ?frequencyChanged@RadioFrequencyStrip@@IAEXIHH@Z @ 30 NONAME ; void RadioFrequencyStrip::frequencyChanged(unsigned int, int, int) - ?setAutoScrollTime@RadioStationCarousel@@QAEXH@Z @ 31 NONAME ; void RadioStationCarousel::setAutoScrollTime(int) - ?prevIndex@RadioStationCarousel@@AAEHH@Z @ 32 NONAME ; int RadioStationCarousel::prevIndex(int) - ?trUtf8@RadioStationCarousel@@SA?AVQString@@PBD0@Z @ 33 NONAME ; class QString RadioStationCarousel::trUtf8(char const *, char const *) - ?tr@RadioStationCarousel@@SA?AVQString@@PBD0@Z @ 34 NONAME ; class QString RadioStationCarousel::tr(char const *, char const *) - ?skip@RadioStationCarousel@@AAEXW4Mode@StationSkip@@@Z @ 35 NONAME ; void RadioStationCarousel::skip(enum StationSkip::Mode) - ?selectorPos@RadioFrequencyStrip@@ABEHXZ @ 36 NONAME ; int RadioFrequencyStrip::selectorPos(void) const - ??1RadioWindow@@UAE@XZ @ 37 NONAME ; RadioWindow::~RadioWindow(void) - ?skipRequested@RadioFrequencyStrip@@IAEXH@Z @ 38 NONAME ; void RadioFrequencyStrip::skipRequested(int) - ?setText@RadioFadingLabel@@QAEXABVQString@@@Z @ 39 NONAME ; void RadioFadingLabel::setText(class QString const &) - ?showEvent@RadioStationCarousel@@EAEXPAVQShowEvent@@@Z @ 40 NONAME ; void RadioStationCarousel::showEvent(class QShowEvent *) - ?mousePressEvent@RadioStationCarousel@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 41 NONAME ; void RadioStationCarousel::mousePressEvent(class QGraphicsSceneMouseEvent *) - ?trUtf8@RadioFrequencyStrip@@SA?AVQString@@PBD0@Z @ 42 NONAME ; class QString RadioFrequencyStrip::trUtf8(char const *, char const *) - ?handleScrollingEnd@RadioFrequencyStrip@@AAEXXZ @ 43 NONAME ; void RadioFrequencyStrip::handleScrollingEnd(void) - ?activateView@RadioWindow@@AAEXPAVRadioViewBase@@ABVQString@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 44 NONAME ; void RadioWindow::activateView(class RadioViewBase *, class QString const &, class QFlags) - ?calculateDifference@RadioStationCarousel@@AAEHHAAW4Direction@Scroll@@@Z @ 45 NONAME ; int RadioStationCarousel::calculateDifference(int, enum Scroll::Direction &) - ?orientationSection@RadioWindow@@QAE?AVQString@@XZ @ 46 NONAME ; class QString RadioWindow::orientationSection(void) - ?updateStation@RadioFrequencyStrip@@AAEXABVQModelIndex@@HH@Z @ 47 NONAME ; void RadioFrequencyStrip::updateStation(class QModelIndex const &, int, int) - ??1RadioFrequencyStrip@@UAE@XZ @ 48 NONAME ; RadioFrequencyStrip::~RadioFrequencyStrip(void) - ?setItemHeight@RadioFrequencyStrip@@QAEXH@Z @ 49 NONAME ; void RadioFrequencyStrip::setItemHeight(int) - ?queryOfflineUsage@RadioWindow@@AAEXW4Profile@QSystemDeviceInfo@QtMobility@@@Z @ 50 NONAME ; void RadioWindow::queryOfflineUsage(enum QtMobility::QSystemDeviceInfo::Profile) + ?makeTab@RadioFrequencyStrip@@AAE?AVQLineF@@MH@Z @ 30 NONAME ; class QLineF RadioFrequencyStrip::makeTab(float, int) + ?frequencyChanged@RadioFrequencyStrip@@IAEXIHH@Z @ 31 NONAME ; void RadioFrequencyStrip::frequencyChanged(unsigned int, int, int) + ?setAutoScrollTime@RadioStationCarousel@@QAEXH@Z @ 32 NONAME ; void RadioStationCarousel::setAutoScrollTime(int) + ?prevIndex@RadioStationCarousel@@AAEHH@Z @ 33 NONAME ; int RadioStationCarousel::prevIndex(int) + ?trUtf8@RadioStationCarousel@@SA?AVQString@@PBD0@Z @ 34 NONAME ; class QString RadioStationCarousel::trUtf8(char const *, char const *) + ?tr@RadioStationCarousel@@SA?AVQString@@PBD0@Z @ 35 NONAME ; class QString RadioStationCarousel::tr(char const *, char const *) + ?skip@RadioStationCarousel@@AAEXW4Mode@StationSkip@@@Z @ 36 NONAME ; void RadioStationCarousel::skip(enum StationSkip::Mode) + ?selectorPos@RadioFrequencyStrip@@ABEHXZ @ 37 NONAME ; int RadioFrequencyStrip::selectorPos(void) const + ??1RadioWindow@@UAE@XZ @ 38 NONAME ; RadioWindow::~RadioWindow(void) + ?skipRequested@RadioFrequencyStrip@@IAEXH@Z @ 39 NONAME ; void RadioFrequencyStrip::skipRequested(int) + ?setText@RadioFadingLabel@@QAEXABVQString@@@Z @ 40 NONAME ; void RadioFadingLabel::setText(class QString const &) + ?showEvent@RadioStationCarousel@@EAEXPAVQShowEvent@@@Z @ 41 NONAME ; void RadioStationCarousel::showEvent(class QShowEvent *) + ?mousePressEvent@RadioStationCarousel@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 42 NONAME ; void RadioStationCarousel::mousePressEvent(class QGraphicsSceneMouseEvent *) + ?trUtf8@RadioFrequencyStrip@@SA?AVQString@@PBD0@Z @ 43 NONAME ; class QString RadioFrequencyStrip::trUtf8(char const *, char const *) + ?handleScrollingEnd@RadioFrequencyStrip@@AAEXXZ @ 44 NONAME ; void RadioFrequencyStrip::handleScrollingEnd(void) + ?activateView@RadioWindow@@AAEXPAVRadioViewBase@@ABVQString@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 45 NONAME ; void RadioWindow::activateView(class RadioViewBase *, class QString const &, class QFlags) + ?calculateDifference@RadioStationCarousel@@AAEHHAAW4Direction@Scroll@@@Z @ 46 NONAME ; int RadioStationCarousel::calculateDifference(int, enum Scroll::Direction &) + ?orientationSection@RadioWindow@@QAE?AVQString@@XZ @ 47 NONAME ; class QString RadioWindow::orientationSection(void) + ?updateStation@RadioFrequencyStrip@@AAEXABVQModelIndex@@HH@Z @ 48 NONAME ; void RadioFrequencyStrip::updateStation(class QModelIndex const &, int, int) + ??1RadioFrequencyStrip@@UAE@XZ @ 49 NONAME ; RadioFrequencyStrip::~RadioFrequencyStrip(void) + ?setItemHeight@RadioFrequencyStrip@@QAEXH@Z @ 50 NONAME ; void RadioFrequencyStrip::setItemHeight(int) ?cancelAnimation@RadioStationCarousel@@QAEXXZ @ 51 NONAME ; void RadioStationCarousel::cancelAnimation(void) ?changeEvent@RadioFrequencyStrip@@EAEXPAVQEvent@@@Z @ 52 NONAME ; void RadioFrequencyStrip::changeEvent(class QEvent *) ?staticMetaObject@RadioStationCarousel@@2UQMetaObject@@B @ 53 NONAME ; struct QMetaObject const RadioStationCarousel::staticMetaObject @@ -128,31 +128,31 @@ ?metaObject@RadioStationCarousel@@UBEPBUQMetaObject@@XZ @ 127 NONAME ; struct QMetaObject const * RadioStationCarousel::metaObject(void) const ?effectFinished@RadioFadingLabel@@AAEXUEffectStatus@HbEffect@@@Z @ 128 NONAME ; void RadioFadingLabel::effectFinished(struct HbEffect::EffectStatus) ?updateOrientation@RadioWindow@@AAEXW4Orientation@Qt@@@Z @ 129 NONAME ; void RadioWindow::updateOrientation(enum Qt::Orientation) - ?init@RadioWindow@@QAEXPAVQSystemDeviceInfo@QtMobility@@@Z @ 130 NONAME ; void RadioWindow::init(class QtMobility::QSystemDeviceInfo *) - ?showButtons@RadioFrequencyStrip@@AAEXXZ @ 131 NONAME ; void RadioFrequencyStrip::showButtons(void) - ?uiEngine@RadioStationCarousel@@QAEPAVRadioUiEngine@@XZ @ 132 NONAME ; class RadioUiEngine * RadioStationCarousel::uiEngine(void) - ?trUtf8@RadioFadingLabel@@SA?AVQString@@PBD0H@Z @ 133 NONAME ; class QString RadioFadingLabel::trUtf8(char const *, char const *, int) - ?activateMainView@RadioWindow@@QAEXXZ @ 134 NONAME ; void RadioWindow::activateMainView(void) - ?setScanningMode@RadioStationCarousel@@QAEX_N@Z @ 135 NONAME ; void RadioStationCarousel::setScanningMode(bool) - ??1RadioFadingLabel@@UAE@XZ @ 136 NONAME ; RadioFadingLabel::~RadioFadingLabel(void) - ?setNonFavoriteIcon@RadioStationCarousel@@QAEXABVHbIcon@@@Z @ 137 NONAME ; void RadioStationCarousel::setNonFavoriteIcon(class HbIcon const &) - ?isInScanningMode@RadioStationCarousel@@QBE_NXZ @ 138 NONAME ; bool RadioStationCarousel::isInScanningMode(void) const - ?isAntennaAttached@RadioStationCarousel@@QBE_NXZ @ 139 NONAME ; bool RadioStationCarousel::isAntennaAttached(void) const - ?activateStationsView@RadioWindow@@QAEXXZ @ 140 NONAME ; void RadioWindow::activateStationsView(void) - ?removeStation@RadioFrequencyStrip@@AAEXABVQModelIndex@@HH@Z @ 141 NONAME ; void RadioFrequencyStrip::removeStation(class QModelIndex const &, int, int) - ?tr@RadioStationCarousel@@SA?AVQString@@PBD0H@Z @ 142 NONAME ; class QString RadioStationCarousel::tr(char const *, char const *, int) - ?trimIndex@RadioStationCarousel@@AAEHH@Z @ 143 NONAME ; int RadioStationCarousel::trimIndex(int) - ?frequencyChanged@RadioStationCarousel@@IAEXIHH@Z @ 144 NONAME ; void RadioStationCarousel::frequencyChanged(unsigned int, int, int) - ?setAlternateSkippingMode@RadioStationCarousel@@QAEX_N@Z @ 145 NONAME ; void RadioStationCarousel::setAlternateSkippingMode(bool) - ?initView@RadioWindow@@AAEXXZ @ 146 NONAME ; void RadioWindow::initView(void) - ?gestureEvent@RadioFrequencyStrip@@EAEXPAVQGestureEvent@@@Z @ 147 NONAME ; void RadioFrequencyStrip::gestureEvent(class QGestureEvent *) - ?trUtf8@RadioStationCarousel@@SA?AVQString@@PBD0H@Z @ 148 NONAME ; class QString RadioStationCarousel::trUtf8(char const *, char const *, int) - ?handleLongLeftButton@RadioFrequencyStrip@@AAEXXZ @ 149 NONAME ; void RadioFrequencyStrip::handleLongLeftButton(void) - ?hideButtons@RadioFrequencyStrip@@AAEXXZ @ 150 NONAME ; void RadioFrequencyStrip::hideButtons(void) - ?emitFrequencyChanged@RadioFrequencyStrip@@AAEXI@Z @ 151 NONAME ; void RadioFrequencyStrip::emitFrequencyChanged(unsigned int) - ?handleLeftButton@RadioFrequencyStrip@@AAEXXZ @ 152 NONAME ; void RadioFrequencyStrip::handleLeftButton(void) - ??_ERadioFadingLabel@@UAE@I@Z @ 153 NONAME ; RadioFadingLabel::~RadioFadingLabel(unsigned int) - ?cancelManualSeek@RadioFrequencyStrip@@QAEXXZ @ 154 NONAME ; void RadioFrequencyStrip::cancelManualSeek(void) + ?showButtons@RadioFrequencyStrip@@AAEXXZ @ 130 NONAME ; void RadioFrequencyStrip::showButtons(void) + ?uiEngine@RadioStationCarousel@@QAEPAVRadioUiEngine@@XZ @ 131 NONAME ; class RadioUiEngine * RadioStationCarousel::uiEngine(void) + ?trUtf8@RadioFadingLabel@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString RadioFadingLabel::trUtf8(char const *, char const *, int) + ?activateMainView@RadioWindow@@QAEXXZ @ 133 NONAME ; void RadioWindow::activateMainView(void) + ?setScanningMode@RadioStationCarousel@@QAEX_N@Z @ 134 NONAME ; void RadioStationCarousel::setScanningMode(bool) + ??1RadioFadingLabel@@UAE@XZ @ 135 NONAME ; RadioFadingLabel::~RadioFadingLabel(void) + ?setNonFavoriteIcon@RadioStationCarousel@@QAEXABVHbIcon@@@Z @ 136 NONAME ; void RadioStationCarousel::setNonFavoriteIcon(class HbIcon const &) + ?isInScanningMode@RadioStationCarousel@@QBE_NXZ @ 137 NONAME ; bool RadioStationCarousel::isInScanningMode(void) const + ?isAntennaAttached@RadioStationCarousel@@QBE_NXZ @ 138 NONAME ; bool RadioStationCarousel::isAntennaAttached(void) const + ?activateStationsView@RadioWindow@@QAEXXZ @ 139 NONAME ; void RadioWindow::activateStationsView(void) + ?removeStation@RadioFrequencyStrip@@AAEXABVQModelIndex@@HH@Z @ 140 NONAME ; void RadioFrequencyStrip::removeStation(class QModelIndex const &, int, int) + ?tr@RadioStationCarousel@@SA?AVQString@@PBD0H@Z @ 141 NONAME ; class QString RadioStationCarousel::tr(char const *, char const *, int) + ?trimIndex@RadioStationCarousel@@AAEHH@Z @ 142 NONAME ; int RadioStationCarousel::trimIndex(int) + ?frequencyChanged@RadioStationCarousel@@IAEXIHH@Z @ 143 NONAME ; void RadioStationCarousel::frequencyChanged(unsigned int, int, int) + ?setAlternateSkippingMode@RadioStationCarousel@@QAEX_N@Z @ 144 NONAME ; void RadioStationCarousel::setAlternateSkippingMode(bool) + ?initView@RadioWindow@@AAEXXZ @ 145 NONAME ; void RadioWindow::initView(void) + ?gestureEvent@RadioFrequencyStrip@@EAEXPAVQGestureEvent@@@Z @ 146 NONAME ; void RadioFrequencyStrip::gestureEvent(class QGestureEvent *) + ?trUtf8@RadioStationCarousel@@SA?AVQString@@PBD0H@Z @ 147 NONAME ; class QString RadioStationCarousel::trUtf8(char const *, char const *, int) + ?handleLongLeftButton@RadioFrequencyStrip@@AAEXXZ @ 148 NONAME ; void RadioFrequencyStrip::handleLongLeftButton(void) + ?hideButtons@RadioFrequencyStrip@@AAEXXZ @ 149 NONAME ; void RadioFrequencyStrip::hideButtons(void) + ?emitFrequencyChanged@RadioFrequencyStrip@@AAEXI@Z @ 150 NONAME ; void RadioFrequencyStrip::emitFrequencyChanged(unsigned int) + ?handleLeftButton@RadioFrequencyStrip@@AAEXXZ @ 151 NONAME ; void RadioFrequencyStrip::handleLeftButton(void) + ??_ERadioFadingLabel@@UAE@I@Z @ 152 NONAME ; RadioFadingLabel::~RadioFadingLabel(unsigned int) + ?cancelManualSeek@RadioFrequencyStrip@@QAEXXZ @ 153 NONAME ; void RadioFrequencyStrip::cancelManualSeek(void) + ?init@RadioWindow@@QAEXXZ @ 154 NONAME ; void RadioWindow::init(void) ?isScrollingAllowed@RadioStationCarousel@@ABE_NXZ @ 155 NONAME ; bool RadioStationCarousel::isScrollingAllowed(void) const ?qt_metacast@RadioFrequencyStrip@@UAEPAXPBD@Z @ 156 NONAME ; void * RadioFrequencyStrip::qt_metacast(char const *) ?staticMetaObject@RadioWindow@@2UQMetaObject@@B @ 157 NONAME ; struct QMetaObject const RadioWindow::staticMetaObject @@ -161,5 +161,5 @@ ?updateAllItems@RadioFrequencyStrip@@AAEXXZ @ 160 NONAME ; void RadioFrequencyStrip::updateAllItems(void) ?adjustPos@RadioStationCarousel@@AAEXH@Z @ 161 NONAME ; void RadioStationCarousel::adjustPos(int) ?scanAnimationFinished@RadioStationCarousel@@IAEXXZ @ 162 NONAME ; void RadioStationCarousel::scanAnimationFinished(void) - ?makeTab@RadioFrequencyStrip@@AAE?AVQLineF@@MH@Z @ 163 NONAME ; class QLineF RadioFrequencyStrip::makeTab(float, int) + ?setLandscape@RadioStationCarousel@@QAEX_N@Z @ 163 NONAME ; void RadioStationCarousel::setLandscape(bool) diff -r ba22309243a1 -r f8c3d4e6102c radioapp/eabi/fmradiowidgetsu.def --- a/radioapp/eabi/fmradiowidgetsu.def Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/eabi/fmradiowidgetsu.def Fri Jul 23 10:16:59 2010 +0300 @@ -6,77 +6,77 @@ _ZN11RadioWindow16activateMainViewEv @ 5 NONAME _ZN11RadioWindow16showErrorMessageERK7QString @ 6 NONAME _ZN11RadioWindow16staticMetaObjectE @ 7 NONAME DATA 16 - _ZN11RadioWindow17queryOfflineUsageEN10QtMobility17QSystemDeviceInfo7ProfileE @ 8 NONAME - _ZN11RadioWindow17updateOrientationEN2Qt11OrientationE @ 9 NONAME - _ZN11RadioWindow18orientationSectionEv @ 10 NONAME - _ZN11RadioWindow19activateHistoryViewEv @ 11 NONAME - _ZN11RadioWindow19getStaticMetaObjectEv @ 12 NONAME - _ZN11RadioWindow19updateAntennaStatusEb @ 13 NONAME - _ZN11RadioWindow20activateStationsViewEv @ 14 NONAME - _ZN11RadioWindow4initEPN10QtMobility17QSystemDeviceInfoE @ 15 NONAME - _ZN11RadioWindow8initViewEv @ 16 NONAME - _ZN11RadioWindowC1EP7QWidget @ 17 NONAME - _ZN11RadioWindowC2EP7QWidget @ 18 NONAME - _ZN11RadioWindowD0Ev @ 19 NONAME - _ZN11RadioWindowD1Ev @ 20 NONAME - _ZN11RadioWindowD2Ev @ 21 NONAME - _ZN16RadioFadingLabel11qt_metacallEN11QMetaObject4CallEiPPv @ 22 NONAME - _ZN16RadioFadingLabel11qt_metacastEPKc @ 23 NONAME - _ZN16RadioFadingLabel11startEffectERK7QStringPKc @ 24 NONAME - _ZN16RadioFadingLabel14effectFinishedEN8HbEffect12EffectStatusE @ 25 NONAME - _ZN16RadioFadingLabel16setFadingEnabledEb @ 26 NONAME - _ZN16RadioFadingLabel16staticMetaObjectE @ 27 NONAME DATA 16 - _ZN16RadioFadingLabel19getStaticMetaObjectEv @ 28 NONAME - _ZN16RadioFadingLabel20setTextWithoutFadingERK7QString @ 29 NONAME - _ZN16RadioFadingLabel7setTextERK7QString @ 30 NONAME - _ZN16RadioFadingLabel8trimHtmlERK7QString @ 31 NONAME - _ZN16RadioFadingLabelC1EP13QGraphicsItem @ 32 NONAME - _ZN16RadioFadingLabelC2EP13QGraphicsItem @ 33 NONAME - _ZN19RadioFrequencyStrip10drawPixmapEj5QListI12RadioStationEP18RadioFrequencyItem @ 34 NONAME - _ZN19RadioFrequencyStrip10timerEventEP11QTimerEvent @ 35 NONAME - _ZN19RadioFrequencyStrip10updateItemEP18RadioFrequencyItemjj @ 36 NONAME - _ZN19RadioFrequencyStrip11changeEventEP6QEvent @ 37 NONAME - _ZN19RadioFrequencyStrip11hideButtonsEv @ 38 NONAME - _ZN19RadioFrequencyStrip11initButtonsEv @ 39 NONAME - _ZN19RadioFrequencyStrip11qt_metacallEN11QMetaObject4CallEiPPv @ 40 NONAME - _ZN19RadioFrequencyStrip11qt_metacastEPKc @ 41 NONAME - _ZN19RadioFrequencyStrip11resizeEventEP25QGraphicsSceneResizeEvent @ 42 NONAME - _ZN19RadioFrequencyStrip11showButtonsEv @ 43 NONAME - _ZN19RadioFrequencyStrip12gestureEventEP13QGestureEvent @ 44 NONAME - _ZN19RadioFrequencyStrip12initSelectorEv @ 45 NONAME - _ZN19RadioFrequencyStrip12setFrequencyEjiN6Scroll9DirectionE @ 46 NONAME - _ZN19RadioFrequencyStrip13initPositionsEv @ 47 NONAME - _ZN19RadioFrequencyStrip13removeStationERK11QModelIndexii @ 48 NONAME - _ZN19RadioFrequencyStrip13seekRequestedEi @ 49 NONAME - _ZN19RadioFrequencyStrip13setItemHeightEi @ 50 NONAME - _ZN19RadioFrequencyStrip13skipRequestedEi @ 51 NONAME - _ZN19RadioFrequencyStrip13updateStationERK11QModelIndexii @ 52 NONAME - _ZN19RadioFrequencyStrip14initEmptyItemsEv @ 53 NONAME - _ZN19RadioFrequencyStrip14updateAllItemsEv @ 54 NONAME - _ZN19RadioFrequencyStrip14updateFavoriteERK12RadioStation @ 55 NONAME - _ZN19RadioFrequencyStrip15addFrequencyPosEijP18RadioFrequencyItem @ 56 NONAME - _ZN19RadioFrequencyStrip15mousePressEventEP24QGraphicsSceneMouseEvent @ 57 NONAME - _ZN19RadioFrequencyStrip15setScanningModeEb @ 58 NONAME - _ZN19RadioFrequencyStrip16cancelManualSeekEv @ 59 NONAME - _ZN19RadioFrequencyStrip16frequencyChangedEjii @ 60 NONAME - _ZN19RadioFrequencyStrip16handleLeftButtonEv @ 61 NONAME - _ZN19RadioFrequencyStrip16scrollPosChangedEv @ 62 NONAME - _ZN19RadioFrequencyStrip16staticMetaObjectE @ 63 NONAME DATA 16 - _ZN19RadioFrequencyStrip16toggleManualSeekEv @ 64 NONAME - _ZN19RadioFrequencyStrip17addScannedStationERK12RadioStation @ 65 NONAME - _ZN19RadioFrequencyStrip17handleRightButtonEv @ 66 NONAME - _ZN19RadioFrequencyStrip17manualSeekChangedEb @ 67 NONAME - _ZN19RadioFrequencyStrip17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 68 NONAME - _ZN19RadioFrequencyStrip17scrollToFrequencyEjN6Scroll9DirectionEiN10TuneReason6ReasonE @ 69 NONAME - _ZN19RadioFrequencyStrip18handleScrollingEndEv @ 70 NONAME - _ZN19RadioFrequencyStrip19createItemPrimitiveEP13QGraphicsItem @ 71 NONAME - _ZN19RadioFrequencyStrip19getStaticMetaObjectEv @ 72 NONAME - _ZN19RadioFrequencyStrip19updateItemPrimitiveEP13QGraphicsItemi @ 73 NONAME - _ZN19RadioFrequencyStrip20emitFrequencyChangedEj @ 74 NONAME - _ZN19RadioFrequencyStrip20handleLongLeftButtonEv @ 75 NONAME - _ZN19RadioFrequencyStrip21handleLongRightButtonEv @ 76 NONAME - _ZN19RadioFrequencyStrip21updateStationsInRangeEiib @ 77 NONAME - _ZN19RadioFrequencyStrip4initEP13RadioUiEngineR13RadioUiLoader @ 78 NONAME + _ZN11RadioWindow17updateOrientationEN2Qt11OrientationE @ 8 NONAME + _ZN11RadioWindow18orientationSectionEv @ 9 NONAME + _ZN11RadioWindow19activateHistoryViewEv @ 10 NONAME + _ZN11RadioWindow19getStaticMetaObjectEv @ 11 NONAME + _ZN11RadioWindow19updateAntennaStatusEb @ 12 NONAME + _ZN11RadioWindow20activateStationsViewEv @ 13 NONAME + _ZN11RadioWindow4initEv @ 14 NONAME + _ZN11RadioWindow8initViewEv @ 15 NONAME + _ZN11RadioWindowC1EP7QWidget @ 16 NONAME + _ZN11RadioWindowC2EP7QWidget @ 17 NONAME + _ZN11RadioWindowD0Ev @ 18 NONAME + _ZN11RadioWindowD1Ev @ 19 NONAME + _ZN11RadioWindowD2Ev @ 20 NONAME + _ZN16RadioFadingLabel11qt_metacallEN11QMetaObject4CallEiPPv @ 21 NONAME + _ZN16RadioFadingLabel11qt_metacastEPKc @ 22 NONAME + _ZN16RadioFadingLabel11startEffectERK7QStringPKc @ 23 NONAME + _ZN16RadioFadingLabel14effectFinishedEN8HbEffect12EffectStatusE @ 24 NONAME + _ZN16RadioFadingLabel16setFadingEnabledEb @ 25 NONAME + _ZN16RadioFadingLabel16staticMetaObjectE @ 26 NONAME DATA 16 + _ZN16RadioFadingLabel19getStaticMetaObjectEv @ 27 NONAME + _ZN16RadioFadingLabel20setTextWithoutFadingERK7QString @ 28 NONAME + _ZN16RadioFadingLabel7setTextERK7QString @ 29 NONAME + _ZN16RadioFadingLabel8trimHtmlERK7QString @ 30 NONAME + _ZN16RadioFadingLabelC1EP13QGraphicsItem @ 31 NONAME + _ZN16RadioFadingLabelC2EP13QGraphicsItem @ 32 NONAME + _ZN19RadioFrequencyStrip10drawPixmapEj5QListI12RadioStationEP18RadioFrequencyItem @ 33 NONAME + _ZN19RadioFrequencyStrip10timerEventEP11QTimerEvent @ 34 NONAME + _ZN19RadioFrequencyStrip10updateItemEP18RadioFrequencyItemjj @ 35 NONAME + _ZN19RadioFrequencyStrip11changeEventEP6QEvent @ 36 NONAME + _ZN19RadioFrequencyStrip11hideButtonsEv @ 37 NONAME + _ZN19RadioFrequencyStrip11initButtonsEv @ 38 NONAME + _ZN19RadioFrequencyStrip11qt_metacallEN11QMetaObject4CallEiPPv @ 39 NONAME + _ZN19RadioFrequencyStrip11qt_metacastEPKc @ 40 NONAME + _ZN19RadioFrequencyStrip11resizeEventEP25QGraphicsSceneResizeEvent @ 41 NONAME + _ZN19RadioFrequencyStrip11showButtonsEv @ 42 NONAME + _ZN19RadioFrequencyStrip12gestureEventEP13QGestureEvent @ 43 NONAME + _ZN19RadioFrequencyStrip12initSelectorEv @ 44 NONAME + _ZN19RadioFrequencyStrip12setFrequencyEjiN6Scroll9DirectionE @ 45 NONAME + _ZN19RadioFrequencyStrip13initPositionsEv @ 46 NONAME + _ZN19RadioFrequencyStrip13removeStationERK11QModelIndexii @ 47 NONAME + _ZN19RadioFrequencyStrip13seekRequestedEi @ 48 NONAME + _ZN19RadioFrequencyStrip13setItemHeightEi @ 49 NONAME + _ZN19RadioFrequencyStrip13skipRequestedEi @ 50 NONAME + _ZN19RadioFrequencyStrip13updateStationERK11QModelIndexii @ 51 NONAME + _ZN19RadioFrequencyStrip14initEmptyItemsEv @ 52 NONAME + _ZN19RadioFrequencyStrip14updateAllItemsEv @ 53 NONAME + _ZN19RadioFrequencyStrip14updateFavoriteERK12RadioStation @ 54 NONAME + _ZN19RadioFrequencyStrip15addFrequencyPosEijP18RadioFrequencyItem @ 55 NONAME + _ZN19RadioFrequencyStrip15mousePressEventEP24QGraphicsSceneMouseEvent @ 56 NONAME + _ZN19RadioFrequencyStrip15setScanningModeEb @ 57 NONAME + _ZN19RadioFrequencyStrip16cancelManualSeekEv @ 58 NONAME + _ZN19RadioFrequencyStrip16frequencyChangedEjii @ 59 NONAME + _ZN19RadioFrequencyStrip16handleLeftButtonEv @ 60 NONAME + _ZN19RadioFrequencyStrip16scrollPosChangedEv @ 61 NONAME + _ZN19RadioFrequencyStrip16staticMetaObjectE @ 62 NONAME DATA 16 + _ZN19RadioFrequencyStrip16toggleManualSeekEv @ 63 NONAME + _ZN19RadioFrequencyStrip17addScannedStationERK12RadioStation @ 64 NONAME + _ZN19RadioFrequencyStrip17handleRightButtonEv @ 65 NONAME + _ZN19RadioFrequencyStrip17manualSeekChangedEb @ 66 NONAME + _ZN19RadioFrequencyStrip17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 67 NONAME + _ZN19RadioFrequencyStrip17scrollToFrequencyEjN6Scroll9DirectionEiN10TuneReason6ReasonE @ 68 NONAME + _ZN19RadioFrequencyStrip18handleScrollingEndEv @ 69 NONAME + _ZN19RadioFrequencyStrip19createItemPrimitiveEP13QGraphicsItem @ 70 NONAME + _ZN19RadioFrequencyStrip19getStaticMetaObjectEv @ 71 NONAME + _ZN19RadioFrequencyStrip19updateItemPrimitiveEP13QGraphicsItemi @ 72 NONAME + _ZN19RadioFrequencyStrip20emitFrequencyChangedEj @ 73 NONAME + _ZN19RadioFrequencyStrip20handleLongLeftButtonEv @ 74 NONAME + _ZN19RadioFrequencyStrip21handleLongRightButtonEv @ 75 NONAME + _ZN19RadioFrequencyStrip21updateStationsInRangeEiib @ 76 NONAME + _ZN19RadioFrequencyStrip4initEP13RadioUiEngineR13RadioUiLoader @ 77 NONAME + _ZN19RadioFrequencyStrip7makeTabEfi @ 78 NONAME _ZN19RadioFrequencyStrip9initModelEv @ 79 NONAME _ZN19RadioFrequencyStripC1Ev @ 80 NONAME _ZN19RadioFrequencyStripC2Ev @ 81 NONAME @@ -165,5 +165,5 @@ _ZThn8_N19RadioFrequencyStrip15mousePressEventEP24QGraphicsSceneMouseEvent @ 164 NONAME _ZThn8_N19RadioFrequencyStrip17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 165 NONAME _ZThn8_N20RadioStationCarousel15mousePressEventEP24QGraphicsSceneMouseEvent @ 166 NONAME - _ZN19RadioFrequencyStrip7makeTabEfi @ 167 NONAME + _ZN20RadioStationCarousel12setLandscapeEb @ 167 NONAME diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/inc/radioapplication.h --- a/radioapp/radioapplication/inc/radioapplication.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radioapplication/inc/radioapplication.h Fri Jul 23 10:16:59 2010 +0300 @@ -27,6 +27,7 @@ // Forward declarations class RadioWindow; class RadioStationModel; +class XQSettingsManager; #ifdef BUILD_WIN32 class Win32Window; @@ -46,19 +47,32 @@ private slots: + void checkOfflineMode(); + void handleOfflineQueryAnswer(); + +private: + void init(); + bool isInOfflineMode() const; + void askOfflineModePermission( const QString& question ); private: // data #ifdef BUILD_WIN32 - QScopedPointer mWin32Window; + QScopedPointer mWin32Window; #endif // BUILD_WIN32 /** * Application main window * Own */ - QScopedPointer mMainWindow; + QScopedPointer mMainWindow; + + /** + * Pointer to settings manager + * Own. + */ + XQSettingsManager* mSettingsManager; }; diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/radioapplication.pro --- a/radioapp/radioapplication/radioapplication.pro Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radioapplication/radioapplication.pro Fri Jul 23 10:16:59 2010 +0300 @@ -30,6 +30,7 @@ ICON = resources/qtg_large_radio.svg # Fallback icon in case theme doesn't have one LIBS += -lxqserviceutil + LIBS += -lxqsettingsmanager BLD_INF_RULES.prj_exports += "resources/fmradio.docml /epoc32/release/winscw/udeb/z/resource/hb/splashml/fmradio.docml" \ "resources/fmradio.splashml /epoc32/release/winscw/udeb/z/resource/hb/splashml/fmradio.splashml" \ @@ -38,8 +39,6 @@ } CONFIG += hb service -CONFIG += mobility -MOBILITY = systeminfo # Service provider specific configuration. SERVICE.FILE = resources/service_conf.xml diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/src/radioapplication.cpp --- a/radioapp/radioapplication/src/radioapplication.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radioapplication/src/radioapplication.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -17,8 +17,9 @@ // System includes #include -#include #include +#include +#include #include #include @@ -43,11 +44,15 @@ # define INIT_WIN32_TEST_WINDOW #endif // BUILD_WIN32 + +static XQSettingsKey gConnectionKey( XQSettingsKey::TargetCentralRepository, CENREP_CORE_APPLICATION_UIS, ID_NETWORK_CONNECTION_ALLOWED ); + /*! * Constructor */ RadioApplication::RadioApplication( int &argc, char *argv[] ) : - HbApplication( argc, argv, Hb::NoSplash ) + HbApplication( argc, argv, Hb::NoSplash ), + mSettingsManager( new XQSettingsManager( this ) ) { // Initializes the radio engine utils if UI logs are entered into the engine log INIT_COMBINED_LOGGER @@ -55,11 +60,21 @@ LOG_TIMESTAMP( "Start radio" ); setApplicationName( hbTrId( "txt_rad_title_fm_radio" ) ); - if ( !XQServiceUtil::isService() ) { - HbSplashScreen::start(); + if ( XQServiceUtil::isService() ) { + + // Radio was started as a highway service from homescreen widget. + // Widget has already done the offline mode check so we can start without checking + init(); + + } else { + + if ( isInOfflineMode() ) { + askOfflineModePermission( hbTrId( "txt_rad_info_activate_radio_in_offline_mode" ) ); + } else { + init(); + } + } - - QTimer::singleShot( 0, this, SLOT(init()) ); } /*! @@ -76,41 +91,93 @@ * Private slot * */ -void RadioApplication::init() +void RadioApplication::checkOfflineMode() { - // If started as a service, there is no need for offline-check - bool okToStart = XQServiceUtil::isService(); - QScopedPointer deviceInfo( new QtMobility::QSystemDeviceInfo() ); - - if ( !okToStart ) { - if ( deviceInfo->currentProfile() != QtMobility::QSystemDeviceInfo::OfflineProfile ) { - okToStart = true; - } else { - // Device is in offline profile, ask the user for permission to start - HbDeviceMessageBox box( hbTrId( "txt_rad_info_activate_radio_in_offline_mode" ), HbMessageBox::MessageTypeQuestion ); - box.setTimeout( HbPopup::NoTimeout ); - box.exec(); - okToStart = box.isAcceptAction( box.triggeredAction() ); - } + if ( isInOfflineMode() ) { + askOfflineModePermission( hbTrId( "txt_rad_info_continue_using_the_radio_in_offline" ) ); } - - if ( okToStart ) { - - // Try to optimize startup time by launching the radio server process as soon as possible. - // This way the server and UI are being initialized at the same time and the startup is faster. -// RadioUiEngine::launchRadioServer(); - - mMainWindow.reset( new RadioWindow() ); +} - CREATE_WIN32_TEST_WINDOW - - INIT_WIN32_TEST_WINDOW +/*! + * Private slot + * + */ +void RadioApplication::handleOfflineQueryAnswer() +{ + HbDeviceMessageBox* box = static_cast( sender() ); + box->deleteLater(); + if ( box->isAcceptAction( box->triggeredAction() ) ) { - // Construct the real views - mMainWindow->init( deviceInfo.take() ); + // If main window has not been created yet it means the offline question was asked during startup + // so we must continue with the startup sequence. If the main window was already created it means + // the question was asked when the radio was already running and the offline mode was activated. + // In that case there is no need to do anything since the user wants to continue listening to radio. + if ( !mMainWindow ) { + init(); + } - mMainWindow->show(); } else { quit(); } } + +/*! + * + */ +void RadioApplication::init() +{ + // Try to optimize startup time by launching the radio server process as soon as possible. + // This way the server and UI are being initialized at the same time and the startup is faster. +// RadioUiEngine::launchRadioServer(); + + // Splash screen needs to be shown when not started by homescreen widget + if ( !XQServiceUtil::isService() ) { + HbSplashScreen::setAppId( "fmradio" ); + HbSplashScreen::start(); + } + + Radio::connect( mSettingsManager, SIGNAL(valueChanged(XQSettingsKey,QVariant)), + this, SLOT(checkOfflineMode()) ); + + bool monitoringStarted = mSettingsManager->startMonitoring( gConnectionKey ); + LOG_ASSERT( monitoringStarted, LOG( "Failed to start monitoring Offline mode!" ) ); + Q_UNUSED( monitoringStarted ); + + mMainWindow.reset( new RadioWindow() ); + + CREATE_WIN32_TEST_WINDOW + + INIT_WIN32_TEST_WINDOW + + // Construct the real views + mMainWindow->init(); + + mMainWindow->show(); +} + +/*! + * + */ +bool RadioApplication::isInOfflineMode() const +{ + const QVariant connectionAllowed = mSettingsManager->readItemValue( gConnectionKey ); + if ( connectionAllowed.canConvert( QVariant::Int ) && connectionAllowed.toInt() == NetworkNotAllowed ) { + return true; + } + + return false; +} + +/*! + * + */ +void RadioApplication::askOfflineModePermission( const QString& question ) +{ + HbDeviceMessageBox* box = new HbDeviceMessageBox( question, HbMessageBox::MessageTypeQuestion, this ); + box->setStandardButtons( HbMessageBox::Yes | HbMessageBox::No ); + box->setTimeout( HbPopup::NoTimeout ); + box->setDismissPolicy( HbPopup::NoDismiss ); + Radio::connect( box, SIGNAL(aboutToClose()), + this, SLOT(handleOfflineQueryAnswer()) ); + box->show(); +} diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/win32_stubs/qsysteminfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioapp/radioapplication/win32_stubs/qsysteminfo.h Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,48 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +// THIS IS A STUB CLASS FOR WIN32 ENVIRONMENT! +// It is only meant to compile, not to actually do anything + +#ifndef Q_SYSTEMINFO_H +#define Q_SYSTEMINFO_H + +#include + +namespace QtMobility { + +class QSystemDeviceInfo : public QObject +{ + Q_OBJECT +public: + + QSystemDeviceInfo( QObject* parent = 0 ); + virtual ~QSystemDeviceInfo(); + + enum Profile { GeneralProfile, OfflineProfile }; + Profile currentProfile() { return GeneralProfile; } + +signals: + + void currentProfileChanged(QSystemDeviceInfo::Profile); + +}; + + +} + +#endif // Q_SYSTEMINFO_H diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/win32_stubs/win32_stubs.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioapp/radioapplication/win32_stubs/win32_stubs.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,151 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "qsysteminfo.h" +#include "xqserviceprovider.h" +#include "xqsettingskey.h" +#include "xqsettingsmanager.h" +#include "radio_global.h" + +/*! + * + */ +QtMobility::QSystemDeviceInfo::QSystemDeviceInfo( QObject* parent ) : + QObject( parent ) +{ +} + +/*! + * + */ +QtMobility::QSystemDeviceInfo::~QSystemDeviceInfo() +{ +} + +/*! + * + */ +XQServiceProvider::XQServiceProvider( const QString&, QObject* parent ) : + QObject( parent ) +{ +} + +/*! + * + */ +XQServiceProvider::~XQServiceProvider() +{ +} + + +/*! + * + */ +XQSettingsKey::XQSettingsKey( XQSettingsKey::Target, long int uid, unsigned long int key ) : + mUid( uid ), + mKey( key ) +{ +} + +/*! + * + */ +XQSettingsKey::~XQSettingsKey() +{ +} + +/*! + * + */ +XQSettingsKey::Target XQSettingsKey::target() const +{ + return TargetCentralRepository; +} + +/*! + * + */ +long int XQSettingsKey::uid() const +{ + return mUid; +} + +/*! + * + */ +unsigned long int XQSettingsKey::key() const +{ + return mKey; +} + +/*! + * + */ +XQSettingsManager::XQSettingsManager( QObject* parent ) : + QObject( parent ) +{ +} + +/*! + * + */ +XQSettingsManager::~XQSettingsManager() +{ +} + +/*! + * + */ +QVariant XQSettingsManager::readItemValue( const XQSettingsKey& key, XQSettingsManager::Type ) +{ + if ( key.uid() == CENREP_CORE_APPLICATION_UIS && key.key() == ID_NETWORK_CONNECTION_ALLOWED ) { + return NetworkAllowed; + } + return QVariant(); +} + +/*! + * + */ +bool XQSettingsManager::writeItemValue( const XQSettingsKey&, const QVariant& ) +{ + return true; +} + +/*! + * + */ +bool XQSettingsManager::startMonitoring( const XQSettingsKey&, XQSettingsManager::Type ) +{ + return true; +} + +/*! + * + */ +bool XQSettingsManager::stopMonitoring( const XQSettingsKey& ) +{ + return true; +} + +/*! + * + */ +XQSettingsManager::Error XQSettingsManager::error() const +{ + return NoError; +} diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/win32_stubs/xqserviceprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioapp/radioapplication/win32_stubs/xqserviceprovider.h Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,88 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, version 2.1 of the License. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with this program. If not, +* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". +* +* Description: +* +*/ + +#ifndef XQSERVICEABSTRACTSERVICE_H +#define XQSERVICEABSTRACTSERVICE_H + +// THIS IS A STUB CLASS FOR WIN32 ENVIRONMENT! +// It is only meant to compile, not to actually do anything + +#include +#include +#include +#include +#include + +class XQRequestInfo +{ +public: + + bool isValid() const { return true; } + + void setEmbedded(bool) {} + bool isEmbedded() const { return false; } + void setBackground(bool) {} + bool isBackground() const { return false; } + bool isSynchronous() const { return false; } + void setForeground(bool) {} + bool isForeground() const { return true; } + + quint32 clientSecureId() const { return VID_DEFAULT; } + quint32 clientVendorId() const { return VID_DEFAULT; } + QSet clientCapabilities() const { return QSet(); } + int id() const { return -1; } + + void setInfo(const QString&, const QVariant&) {} + QVariant info(const QString&) const { return QVariant(); } + QStringList infoKeys() const { return QStringList(); } + +}; + +class XQServiceProvider : public QObject +{ + Q_OBJECT +public: + explicit XQServiceProvider( const QString& service, QObject* parent = 0 ); + ~XQServiceProvider(); + + void SetPlugin(QObject*) {} + +Q_SIGNALS: + void returnValueDelivered(); + void clientDisconnected(); + +protected: + void publishAll() {} + int setCurrentRequestAsync() { return -1; } + bool completeRequest(int, const QVariant&) { return true; } + XQRequestInfo requestInfo() const { return XQRequestInfo(); } + + template + inline bool completeRequest(int index, const T& retValue) + { + QVariant retValueVariant; + retValueVariant.setValue(retValue); + return completeRequest(index, retValueVariant); + } + +}; + +#endif diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/win32_stubs/xqserviceutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioapp/radioapplication/win32_stubs/xqserviceutil.h Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef XQSERVICEUTIL_H +#define XQSERVICEUTIL_H + +#include + +// THIS IS A STUB CLASS FOR WIN32 ENVIRONMENT! +// It is only meant to compile, not to actually do anything + +namespace XQServiceUtil +{ + void toBackground(bool) {} + bool isEmbedded() { return false; } + bool isService() { return false; } + QString interfaceName() { return ""; } + QString operationName() { return ""; } +} + +#endif diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/win32_stubs/xqsettingskey.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioapp/radioapplication/win32_stubs/xqsettingskey.h Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef XQSETTINGSITEM_STUB_H +#define XQSETTINGSITEM_STUB_H + +class XQSettingsKey +{ +public: + enum Target + { + TargetCentralRepository = 0, + TargetPublishAndSubscribe + }; + + XQSettingsKey(XQSettingsKey::Target target, long int uid, unsigned long int key); + ~XQSettingsKey(); + + XQSettingsKey::Target target() const; + long int uid() const; + unsigned long int key() const; + +private: // data + + long int mUid; + unsigned long int mKey; + +}; + +#endif //XQSETTINGSITEM_STUB_H diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioapplication/win32_stubs/xqsettingsmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioapp/radioapplication/win32_stubs/xqsettingsmanager.h Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,73 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef XQSETTINGSMANAGER_STUB_H +#define XQSETTINGSMANAGER_STUB_H + +#include +#include + +//#include "xqsettingskey.h" +class XQSettingsKey; + +class XQSettingsManager : public QObject +{ + Q_OBJECT +// Q_ENUMS(Error) +// Q_ENUMS(Type) + +public: + + enum Type + { + TypeVariant = 0, + TypeInt, + TypeDouble, + TypeString, + TypeByteArray + }; + + enum Error + { + NoError = 0, + OutOfMemoryError, + NotFoundError, + AlreadyExistsError, + PermissionDeniedError, + BadTypeError, + NotSupportedError, + UnknownError = -1 + }; + + XQSettingsManager(QObject* parent = 0); + virtual ~XQSettingsManager(); + + QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant); + bool writeItemValue(const XQSettingsKey& key, const QVariant& value); + bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant); + bool stopMonitoring(const XQSettingsKey& key); + + XQSettingsManager::Error error() const; + +Q_SIGNALS: + void valueChanged(const XQSettingsKey& key, const QVariant& value); + void itemDeleted(const XQSettingsKey& key); + +private: +}; + +#endif // XQSETTINGSMANAGER_STUB_H diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radioenginewrapper/src/radioenginehandler.cpp --- a/radioapp/radioenginewrapper/src/radioenginehandler.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radioenginewrapper/src/radioenginehandler.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -21,7 +21,6 @@ #include "cradiosystemeventcollector.h" #include "cradiosettings.h" #include "mradioenginesettings.h" -#include "cradiorepositorymanager.h" #include "mradiordsreceiver.h" #include "radioenginehandler.h" #include "mradioenginehandlerobserver.h" diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiouiengine/src/radiostationmodel.cpp --- a/radioapp/radiouiengine/src/radiostationmodel.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiouiengine/src/radiostationmodel.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -180,6 +180,18 @@ if ( d->mPresetStorage->readPreset( index, *stationInterface ) ) { if ( station.isValid() && d->mWrapper->isFrequencyValid( station.frequency() ) ) { +#ifdef INIT_STATIONS_WITH_DUMMY_RT + station.setGenre( GenreEurope::RdsChildrensProgrammes ); + if ( index % 3 == 0 ) { + station.setName( "Radio Rock" ); + station.setRadioText( "Now playing: The Presidents of the United States of America - Dune Buggy and diipa daapa jhkjhui erjlkej rewjtl" ); + } else if ( index % 2 == 0 ) { + station.setName( "Radio Rock" ); + } else { + station.setDynamicPsText( "DYN PS" ); + } +#endif // INIT_STATIONS_WITH_DUMMY_RT + // Check if the station seems to send RDS or not. // Note that radiotext is not checked because it is not saved to cenrep // TODO: Consider saving this state flag to cenrep diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/inc/radiocarouselitem.h --- a/radioapp/radiowidgets/inc/radiocarouselitem.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/inc/radiocarouselitem.h Fri Jul 23 10:16:59 2010 +0300 @@ -37,6 +37,7 @@ { Q_OBJECT Q_PROPERTY(Appearance appearance READ appearance WRITE setAppearance) + Q_PROPERTY(bool landscape READ landscape WRITE setLandscape) Q_ENUMS(Appearance) friend class RadioStationCarousel; @@ -71,6 +72,9 @@ void setAppearance( Appearance appearance ); Appearance appearance() const; + void setLandscape( bool landscape ); + bool landscape() const; + void setSeekLayout( bool seekLayout ); void setStation( const RadioStation& station ); @@ -122,6 +126,7 @@ Appearance mAppearance; bool mOwnsCss; + bool mLandscapeMode; CarouselItemFlags mFlags; }; diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/inc/radiostationcarousel.h --- a/radioapp/radiowidgets/inc/radiostationcarousel.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/inc/radiostationcarousel.h Fri Jul 23 10:16:59 2010 +0300 @@ -113,6 +113,8 @@ void drawOffScreen( QPainter& painter ); + void setLandscape( bool landscape ); + void setAlternateSkippingMode( bool alternateSkipping ); //TODO: Remove this! This is test code signals: diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/inc/radiowindow.h --- a/radioapp/radiowidgets/inc/radiowindow.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/inc/radiowindow.h Fri Jul 23 10:16:59 2010 +0300 @@ -24,8 +24,6 @@ #include #include #include -#include -using namespace QtMobility; // has to be here to be able to connect SLOT queryOfflineUsage // User includes #include "radiowidgetsexport.h" @@ -59,7 +57,7 @@ void showErrorMessage( const QString& text ); - void init( QSystemDeviceInfo* deviceInfo ); + void init(); QString orientationSection(); @@ -77,7 +75,6 @@ void updateOrientation( Qt::Orientation orientation ); void showVolumeLevel( int volume ); void updateAntennaStatus( bool connected ); - void queryOfflineUsage( QSystemDeviceInfo::Profile profile ); private: @@ -123,12 +120,6 @@ */ QScopedPointer mMessageBox; - /** - * Pointer to qsystemdeviceinfo - * Own. - */ - QScopedPointer mDeviceInfo; - }; diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/radiowidgets.pro --- a/radioapp/radiowidgets/radiowidgets.pro Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/radiowidgets.pro Fri Jul 23 10:16:59 2010 +0300 @@ -20,8 +20,6 @@ TEMPLATE = lib TARGET = fmradiowidgets CONFIG += dll hb -CONFIG += mobility -MOBILITY = systeminfo DEFINES += BUILD_WIDGETS_DLL symbian:TARGET.UID3 = 0x2002FF4C diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/res/layout/mainview.docml --- a/radioapp/radiowidgets/res/layout/mainview.docml Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/res/layout/mainview.docml Fri Jul 23 10:16:59 2010 +0300 @@ -93,6 +93,7 @@ + @@ -130,9 +131,6 @@
- - - @@ -154,9 +152,6 @@
- - - diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/res/layout/radiocarouselitem.css --- a/radioapp/radiowidgets/res/layout/radiocarouselitem.css Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/res/layout/radiocarouselitem.css Fri Jul 23 10:16:59 2010 +0300 @@ -13,6 +13,18 @@ size-policy-vertical: fixed; } +RadioCarouselItem[landscape]::star_button +{ + pref-width: expr(var(hb-param-graphic-size-primary-medium)*0.9); + pref-height: expr(var(hb-param-graphic-size-primary-medium)*0.9); +} + +RadioCarouselItem[!landscape]::star_button +{ + pref-width: var(hb-param-graphic-size-primary-medium); + pref-height: var(hb-param-graphic-size-primary-medium); +} + RadioCarouselItem::genre_label { top: -var(hb-param-margin-gene-top); @@ -26,9 +38,18 @@ RadioCarouselItem::genre_label::text { color: lightgray; /*var(qtc_lcd_title_normal);*/ + font-variant: secondary; + text-align: center center; +} + +RadioCarouselItem[landscape]::genre_label::text +{ + text-height: expr(var(hb-param-text-height-secondary)*0.95); +} + +RadioCarouselItem[!landscape]::genre_label::text +{ text-height: var(hb-param-text-height-secondary); - font-variant: secondary; - text-align: center bottom; } RadioCarouselItem::name_label @@ -59,7 +80,12 @@ text-align: center top; } -RadioCarouselItem[appearance=Full]::name_label::text +RadioCarouselItem[appearance=Full][landscape]::name_label::text +{ + text-height: 7.6un; +} + +RadioCarouselItem[appearance=Full][!landscape]::name_label::text { text-height: 8un; } @@ -89,8 +115,17 @@ { text-line-count-max: 4; text-wrap-mode: word-wrap; /*wrap-anywhere; */ + text-align: center center; +} + +RadioCarouselItem[appearance=Full][landscape]::rt_label::text +{ + text-height: expr(var(hb-param-text-height-secondary)*0.95); +} + +RadioCarouselItem[appearance=Full][!landscape]::rt_label::text +{ text-height: var(hb-param-text-height-secondary); - text-align: center center; } RadioCarouselItem[appearance!=Full]::rt_label::text @@ -110,12 +145,21 @@ RadioCarouselItem::url_label::text { - text-height: var(hb-param-text-height-secondary); font-variant: secondary; text-align: center center; color:var(qtc_lcd_link_normal); } +RadioCarouselItem[landscape]::url_label::text +{ + text-height: expr(var(hb-param-text-height-secondary)*0.95); +} + +RadioCarouselItem[!landscape]::url_label::text +{ + text-height: var(hb-param-text-height-secondary); +} + RadioCarouselItem::favorite_touch_area { top: 0un; diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/src/radiocarouselitem.cpp --- a/radioapp/radiowidgets/src/radiocarouselitem.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/src/radiocarouselitem.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -64,6 +64,7 @@ mUrlItem( NULL ), mAppearance( Default ), mOwnsCss( registerCss ), + mLandscapeMode( false ), mFlags( DefaultFlags ) { mStation.reset( new RadioStation() ); @@ -247,6 +248,22 @@ /*! * */ +void RadioCarouselItem::setLandscape( bool landscape ) +{ + mLandscapeMode = landscape; +} + +/*! + * + */ +bool RadioCarouselItem::landscape() const +{ + return mLandscapeMode; +} + +/*! + * + */ void RadioCarouselItem::setSeekLayout( bool seekLayout ) { if ( seekLayout ) { @@ -400,4 +417,3 @@ { setAppearance( mStation->hasSentRds() ? Full : Default ); } - diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/src/radiofrequencystrip.cpp --- a/radioapp/radiowidgets/src/radiofrequencystrip.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/src/radiofrequencystrip.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -841,7 +841,9 @@ newPos -= mSelectorPos - ROUNDER; - scrollContentsTo( QPointF( newPos, 0 ), time ); +// scrollContentsTo( QPointF( newPos, 0 ), time ); +// TODO: Remove this and uncomment the above line. This is a temporary workaround to get the strip to move + scrollContentsTo( QPointF( newPos, 0 ), 0 ); } /*! diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/src/radiomainview.cpp --- a/radioapp/radiowidgets/src/radiomainview.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/src/radiomainview.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -120,6 +120,7 @@ mCarousel = mUiLoader->findObject( DOCML::MV_NAME_STATION_CAROUSEL ); mCarousel->init( *mUiLoader, mUiEngine.data() ); + mCarousel->setLandscape( mMainWindow->orientation() == Qt::Horizontal ); mFrequencyStrip = mUiLoader->findObject( DOCML::MV_NAME_FREQUENCY_STRIP ); mFrequencyStrip->init( mUiEngine.data(), *mUiLoader ); @@ -211,6 +212,7 @@ loadSection( DOCML::FILE_MAINVIEW, mMainWindow->orientationSection() ); if ( mCarousel && mFrequencyStrip ) { mCarousel->setFrequency( mFrequencyStrip->frequency(), TuneReason::Unspecified ); + mCarousel->setLandscape( mMainWindow->orientation() == Qt::Horizontal ); } } diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/src/radiostationcarousel.cpp --- a/radioapp/radiowidgets/src/radiostationcarousel.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/src/radiostationcarousel.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -441,6 +441,14 @@ } /*! + * + */ +void RadioStationCarousel::setLandscape( bool landscape ) +{ + CALL_TO_ALL_ITEMS( setLandscape( landscape ) ); +} + +/*! * TODO: Remove this! This is test code */ void RadioStationCarousel::setAlternateSkippingMode( bool alternateSkipping ) diff -r ba22309243a1 -r f8c3d4e6102c radioapp/radiowidgets/src/radiowindow.cpp --- a/radioapp/radiowidgets/src/radiowindow.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioapp/radiowidgets/src/radiowindow.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -68,14 +68,10 @@ /*! * */ -void RadioWindow::init( QSystemDeviceInfo* deviceInfo ) +void RadioWindow::init() { - mDeviceInfo.reset( deviceInfo ); - Radio::connect( this, SIGNAL(viewReady()), this, SLOT(initView()) ); - Radio::connect( mDeviceInfo.data(), SIGNAL(currentProfileChanged(QSystemDeviceInfo::Profile)), - this, SLOT(queryOfflineUsage(QSystemDeviceInfo::Profile)) ); activateMainView(); } @@ -211,28 +207,6 @@ } /*! - * Private slot - * - */ -void RadioWindow::queryOfflineUsage( QSystemDeviceInfo::Profile profile ) -{ - if ( profile == QSystemDeviceInfo::OfflineProfile ) { - bool okToContinue = false; - HbDeviceMessageBox box( hbTrId( "txt_rad_info_continue_using_the_radio_in_offline" ), HbMessageBox::MessageTypeQuestion ); - box.setTimeout( HbPopup::NoTimeout ); - box.exec(); - - okToContinue = box.isAcceptAction( box.triggeredAction() ); - - if ( okToContinue ) { - // Radio stays on - } else { - qApp->quit(); // Close radio - } - } // other profiles are not interesting -} - -/*! * */ void RadioWindow::activateView( RadioViewBase* aMember, const QString& docmlFile, Hb::ViewSwitchFlags flags ) diff -r ba22309243a1 -r f8c3d4e6102c radioengine/engine/inc/cradioengineimp.h --- a/radioengine/engine/inc/cradioengineimp.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/engine/inc/cradioengineimp.h Fri Jul 23 10:16:59 2010 +0300 @@ -30,7 +30,6 @@ #include "radioenginedef.h" // Forward declarations -class CRadioPubSub; class CRadioRdsReceiverBase; class CRadioNetworkInfoListener; class MRadioEngineSettings; @@ -111,27 +110,11 @@ ERadioEventFmTransmitter }; - /** - * Possible radio scan events. - */ - enum TRadioScanEvent - { - /** - * Scanning found a valid frequency. - */ - ERadioEventFrequencyScanned, - - /** - * Scanning is completed. - */ - ERadioEventScanCompleted - - }; - enum TRadioInitialisationState { ERadioNotInitialized, ERadioUtilitiesConstructed, + ERadioTunerControlRequested, ERadioTunerControlGranted }; @@ -172,6 +155,11 @@ void PowerOff(); /** + * Requests tuner control from tuner utility + */ + void RequestTunerControl(); + + /** * Converts region code used internally by Visual Radio * in to a frequency range by tuner ( TFmRadioFrequencyRange ) * diff -r ba22309243a1 -r f8c3d4e6102c radioengine/engine/src/cradioengineimp.cpp --- a/radioengine/engine/src/cradioengineimp.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/engine/src/cradioengineimp.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -51,7 +51,7 @@ const TInt KRadioVolumeStepsDivider = 500; /** amount of volume steps used previously */ #if defined __WINS__ -const TInt KRadioVolumeStepsOld = 10; +const TInt KRadioVolumeStepsWins = 20; #endif // defined __WINS__ /** KRadioRadioSwitchDelay value must not be too small, otherwise problems with @@ -232,6 +232,7 @@ LEVEL3( LOG_METHOD_AUTO ); TRadioRegion region = ERadioRegionNone; + //TODO: Reimplement in QT side and remove the mobile network functionality MRadioEngineSettings& engineSettings = iSettings->EngineSettings(); if ( iSystemEventCollector->IsMobileNetworkCoverage() ) { @@ -300,9 +301,7 @@ // Utilities have been created now iRadioInitializationState = ERadioUtilitiesConstructed; - // Before first RequestTunerControl() call it is ok to enable offline mode without checking capabilities - iTunerUtility->EnableTunerInOfflineMode( ETrue ); - iTunerUtility->RequestTunerControl(); + RequestTunerControl(); } // --------------------------------------------------------------------------- @@ -335,7 +334,7 @@ iRadioEnabled && OkToPlay( iSettings->EngineSettings().TunedFrequency() ) ) { - iTunerUtility->RequestTunerControl(); + RequestTunerControl(); } else { @@ -486,7 +485,7 @@ iRadioEnabled && OkToPlay( iSettings->EngineSettings().TunedFrequency() ) ) { - iTunerUtility->RequestTunerControl(); + RequestTunerControl(); } else { @@ -593,6 +592,29 @@ } // --------------------------------------------------------------------------- +// Requests tuner control from tuner utility +// --------------------------------------------------------------------------- +// +void CRadioEngineImp::RequestTunerControl() + { + LOG_METHOD_AUTO; + + if ( iRadioInitializationState < ERadioTunerControlRequested ) + { + LOG( "Requesting tuner control" ); + // Before first RequestTunerControl() say that it is ok to enable offline mode without checking capabilities + iTunerUtility->EnableTunerInOfflineMode( ETrue ); + iTunerUtility->RequestTunerControl(); + + iRadioInitializationState = ERadioTunerControlRequested; + } + else + { + LOG( "Tuner control already requested" ); + } + } + +// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // @@ -923,10 +945,8 @@ } // --------------------------------------------------------------------------- -// If CRadioPlayerUtility has 10 steps, CAknVolumeControl has also 10 steps and also -// the maximum volume level of Visual radio is 10. Otherwise CRadioPlayerUtility has -// 200 steps, and CAknVolumeControl has 20 steps, so maximum volume level of Visual radio -// is 20. +// Determine the meximum volume level by dividing the maximum volume setting +// received from player utility to get the desired 20 volume steps // --------------------------------------------------------------------------- // TInt CRadioEngineImp::MaxVolumeLevel() const @@ -935,7 +955,7 @@ TInt maxLevel = 0; #if defined __WINS__ - maxLevel = KRadioVolumeStepsOld; + maxLevel = KRadioVolumeStepsWins; #else if ( RadioInitialized() ) { @@ -1003,9 +1023,9 @@ LOG_METHOD_AUTO; TInt count = iObservers.Count(); - for ( TInt i = 0; iEngineSettings().IsPowerOn() ) + if ( !aPowerOn ) { CancelSeek(); } // If we are seeking, power event starts seeking - if ( iSeekingState != RadioEngine::ERadioNotSeeking && iSettings->EngineSettings().IsPowerOn() ) + if ( iSeekingState != RadioEngine::ERadioNotSeeking && aPowerOn ) { // Reset seeking state to enable seeking start LOG( "PowerOn event in seekingstate. Restart seeking" ); diff -r ba22309243a1 -r f8c3d4e6102c radioengine/engine/src/cradionetworkinfolistener.cpp --- a/radioengine/engine/src/cradionetworkinfolistener.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/engine/src/cradionetworkinfolistener.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -119,7 +119,7 @@ // Get phone info of first legal phone. TInt legalPhoneIndex = KErrNotFound; RTelServer::TPhoneInfo phoneInfo; - for ( TInt i=0; iRdsAfSearchStateChange( iAfEnabled ); } diff -r ba22309243a1 -r f8c3d4e6102c radioengine/settings/src/cradioenginesettings.cpp --- a/radioengine/settings/src/cradioenginesettings.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/settings/src/cradioenginesettings.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -675,6 +675,7 @@ //User::LeaveIfError( iRadioSettingsImp.FsSession().Connect() ); + //TODO: Remove the ResolveDriveL iRadioSettingsImp.ResolveDriveL( resourceFileName, KDC_RESOURCE_FILES_DIR ); BaflUtils::NearestLanguageFile( iRadioSettingsImp.FsSession(), resourceFileName); @@ -685,7 +686,7 @@ reader.SetBuffer(readBuffer); TInt regionCount = reader.ReadInt16(); - for ( TInt i = 0 ; i < regionCount; i++ ) + for ( TInt i = 0; i < regionCount; ++i ) { TInt resId = reader.ReadInt32(); // The next resource ID to read. HBufC8* regionBuffer = iResFile.AllocReadLC(resId); diff -r ba22309243a1 -r f8c3d4e6102c radioengine/settings/src/cradioregion.cpp --- a/radioengine/settings/src/cradioregion.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/settings/src/cradioregion.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -50,7 +50,7 @@ iDecimalCount = aRr.ReadInt16(); TInt countryCodeCount = aRr.ReadInt16(); - for ( TInt i = 0 ; i < countryCodeCount ; i++) + for ( TInt i = 0; i < countryCodeCount; ++i ) { TPtrC code; code.Set( aRr.ReadTPtrC()); diff -r ba22309243a1 -r f8c3d4e6102c radioengine/settings/src/cradiosettingsimp.cpp --- a/radioengine/settings/src/cradiosettingsimp.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/settings/src/cradiosettingsimp.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -81,12 +81,9 @@ delete iApplicationSettings; if ( iFsSession ) { - if ( iFsSession->Handle() ) - { - iFsSession->Close(); - } - delete iFsSession; + iFsSession->Close(); } + delete iFsSession; } // --------------------------------------------------------------------------- @@ -137,7 +134,7 @@ { LEVEL3( LOG_METHOD_AUTO ); LEVEL3( LOG_FORMAT( "aFileName = %S, aPath = %S", &aFileName, &aPath ) ); - + TFileName fileName; TFileName baseResource; TFindFile finder( *iFsSession ); @@ -235,4 +232,3 @@ LEVEL3( LOG_METHOD_AUTO ); return *iFsSession; } - diff -r ba22309243a1 -r f8c3d4e6102c radioengine/settings/tsrc/group/Bld.inf --- a/radioengine/settings/tsrc/group/Bld.inf Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include - - -PRJ_PLATFORMS -// specify the platforms your component needs to be built for here -// defaults to WINS MARM so you can ignore this if you just build these - - DEFAULT - -PRJ_TESTEXPORTS -// NOTE: If using ARS requirements all export operations should be done under this. -// 'abld test export' - -PRJ_EXPORTS -// Specify the source file followed by its destination here -// copy will be used to copy the source file to its destination -// If there's no destination then the source file will be copied -// to the same name in /epoc32/include -// Example: -/* -/agnmodel/inc/AGMCOMON.H -*/ -../rom/settingstestmodule.iby CORE_APP_LAYER_IBY_EXPORT_PATH(settingstestmodule.iby) - -PRJ_TESTMMPFILES - - SettingsTestModule.mmp - -PRJ_MMPFILES - - SettingsTestModule_nrm.mmp - -// Specify the .mmp files required for building the important component -// releasables. -// -// Specify "tidy" if the component you need to build doesn't need to be -// released. Specify "ignore" if the MMP file exists but should be -// ignored. -// Example: -/* -/agnmodel/group/agnmodel.mmp -#if defined(MARM) -/agnmodel/group/agsvexe.mmp -#endif -*/ - -// End of File diff -r ba22309243a1 -r f8c3d4e6102c radioengine/settings/tsrc/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioengine/settings/tsrc/group/bld.inf Fri Jul 23 10:16:59 2010 +0300 @@ -0,0 +1,63 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#include + + +PRJ_PLATFORMS +// specify the platforms your component needs to be built for here +// defaults to WINS MARM so you can ignore this if you just build these + + DEFAULT + +PRJ_TESTEXPORTS +// NOTE: If using ARS requirements all export operations should be done under this. +// 'abld test export' + +PRJ_EXPORTS +// Specify the source file followed by its destination here +// copy will be used to copy the source file to its destination +// If there's no destination then the source file will be copied +// to the same name in /epoc32/include +// Example: +/* +/agnmodel/inc/AGMCOMON.H +*/ +../rom/settingstestmodule.iby CORE_APP_LAYER_IBY_EXPORT_PATH(settingstestmodule.iby) + +PRJ_TESTMMPFILES + + SettingsTestModule.mmp + +PRJ_MMPFILES + + SettingsTestModule_nrm.mmp + +// Specify the .mmp files required for building the important component +// releasables. +// +// Specify "tidy" if the component you need to build doesn't need to be +// released. Specify "ignore" if the MMP file exists but should be +// ignored. +// Example: +/* +/agnmodel/group/agnmodel.mmp +#if defined(MARM) +/agnmodel/group/agsvexe.mmp +#endif +*/ + +// End of File diff -r ba22309243a1 -r f8c3d4e6102c radioengine/settings/tsrc/src/SettingsTestModuleBlocks.cpp --- a/radioengine/settings/tsrc/src/SettingsTestModuleBlocks.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/settings/tsrc/src/SettingsTestModuleBlocks.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -194,7 +194,7 @@ { TestModuleIf().Printf( i, KSettingsTestModule, KParam, i, &string ); - i++; + ++i; } return KErrNone; diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/cradioaudiorouter.h --- a/radioengine/utils/api/cradioaudiorouter.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/api/cradioaudiorouter.h Fri Jul 23 10:16:59 2010 +0300 @@ -29,8 +29,6 @@ /** * CRadioAudioRouter * - * Contains functionality for playing and routing startup sound - * */ NONSHARABLE_CLASS( CRadioAudioRouter ) : public CBase { diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/cradiorepositoryentity.h --- a/radioengine/utils/api/cradiorepositoryentity.h Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef C_RADIOREPOSITORYENTITY_H -#define C_RADIOREPOSITORYENTITY_H - -// User includes -#include "cradiorepositoryentitybase.h" -#include "mradiorepositoryentityobserver.h" -#include "cradioenginelogger.h" - -// Forward declarations -class CRepository; - -/** - * Templated class to listen to a single key within the central repository. - * - * Notifies the observer of changes in the key, and provides caching for the key's value. - */ -template -NONSHARABLE_CLASS( CRadioRepositoryEntity ) : public CRadioRepositoryEntityBase - { - -public: - - IMPORT_C static CRadioRepositoryEntity* NewL( const TUid& aUid, - TUint32 aKey, - MRadioRepositoryEntityObserver& aObserver, - CActive::TPriority aPriority = CActive::EPriorityStandard ); - - IMPORT_C ~CRadioRepositoryEntity(); - - /** - * Sets the value of the entity. - * The value is written into the central repository immediately. - * - * @param aValue The value to set. - * @param aSavingEnabled If ETrue, saving to central repository file is enabled - */ - TInt SetValue( const T& aValue, TBool aSavingEnabled ); - - /** - * Returns a cached reference to the value of the entity. - * - * @return The cached value of the entity. - */ - const T& Value() const; - - /** - * Forcibly updates the key's value from the central repository and caches it. - */ - void UpdateL(); - -// from base class CActive - - void RunL(); - void DoCancel(); - -private: - - CRadioRepositoryEntity( const TUid& aUid, - TUint32 aKey, - MRadioRepositoryEntityObserver& aObserver, - CActive::TPriority aPriority ); - - void ConstructL(); - -protected: - - /** The central repository client. */ - CRepository* iRepository; - - /** The cached value of the key. */ - T iValue; - - }; - -#include "cradiorepositoryentity.inl" - -#endif // C_RADIOREPOSITORYENTITY_H diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/cradiorepositoryentity.inl --- a/radioengine/utils/api/cradiorepositoryentity.inl Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// System includes -#include - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -template -EXPORT_C CRadioRepositoryEntity* CRadioRepositoryEntity::NewL( const TUid& aUid, - TUint32 aKey, - MRadioRepositoryEntityObserver& aObserver, - CActive::TPriority aPriority ) - { - LEVEL3( LOG_METHOD_AUTO ); - CRadioRepositoryEntity* self = new ( ELeave ) CRadioRepositoryEntity( aUid, aKey, aObserver, aPriority ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -template -CRadioRepositoryEntity::CRadioRepositoryEntity( const TUid& aUid, - TUint32 aKey, - MRadioRepositoryEntityObserver& aObserver, - CActive::TPriority aPriority ) - : CRadioRepositoryEntityBase( aUid, aKey, aObserver, aPriority ) - { - LEVEL3( LOG_METHOD_AUTO ); - } - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -template -void CRadioRepositoryEntity::ConstructL() - { - LEVEL3( LOG_METHOD_AUTO ); - iRepository = CRepository::NewL( iUid ); - - CActiveScheduler::Add( this ); - iRepository->Get( iKey, iValue ); - User::LeaveIfError( iRepository->NotifyRequest( iKey, iStatus ) ); - SetActive(); - } - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -template -EXPORT_C CRadioRepositoryEntity::~CRadioRepositoryEntity() - { - LEVEL3( LOG_METHOD_AUTO ); - Cancel(); - delete iRepository; - } - -// ----------------------------------------------------------------------------- -// Sets the value of the key. -// ----------------------------------------------------------------------------- -// -template -TInt CRadioRepositoryEntity::SetValue( const T& aValue, TBool aSavingEnabled ) - { - LEVEL3( LOG_METHOD_AUTO ); - iValue = aValue; - if ( aSavingEnabled ) - { - return iRepository->Set( iKey, aValue ); - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// Returns the cached copy of the key's value. -// ----------------------------------------------------------------------------- -// -template -const T& CRadioRepositoryEntity::Value() const - { - LEVEL3( LOG_METHOD_AUTO ); - return iValue; - } - -// ----------------------------------------------------------------------------- -// Forcibly updates the cached value from the repository. -// ----------------------------------------------------------------------------- -// -template -void CRadioRepositoryEntity::UpdateL() - { - LEVEL3( LOG_METHOD_AUTO ); - User::LeaveIfError( iRepository->Get( iKey, iValue ) ); - } - -// ----------------------------------------------------------------------------- -// Executed when the key's value is changed. -// ----------------------------------------------------------------------------- -// -template -void CRadioRepositoryEntity::RunL() - { - LEVEL3( LOG_METHOD_AUTO ); - User::LeaveIfError( iRepository->NotifyRequest( iKey, iStatus ) ); - SetActive(); - - TInt err = iRepository->Get( iKey, iValue ); - iObserver.HandleRepositoryValueChangeL( iUid, iKey, iValue, err ); - } - -// ----------------------------------------------------------------------------- -// Cancels all pending notifications. -// ----------------------------------------------------------------------------- -// -template -void CRadioRepositoryEntity::DoCancel() - { - LEVEL3( LOG_METHOD_AUTO ); - iRepository->NotifyCancel( iKey ); - } diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/cradiorepositoryentitybase.h --- a/radioengine/utils/api/cradiorepositoryentitybase.h Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef C_RADIOREPOSITORYENTITYBASE_H -#define C_RADIOREPOSITORYENTITYBASE_H - -#include - -class MRadioRepositoryEntityObserver; - -/** - * Base class for a central repository entity. - * - * All instantiable central repository entities must be derived from this class. - * The class is provided so that a heterogenous array of templated objects can be created, and to - * provide common data fields for the said purpose. - */ -class CRadioRepositoryEntityBase : public CActive - { - -public: - - IMPORT_C ~CRadioRepositoryEntityBase(); - - /** - * Returns the UID of the repository the entity is bound to. - * - * @return The UID of the repository the entity is bound to. - */ - const TUid& Uid() const; - - /** - * Returns the key the entity is bound to. - * - * @return The key the entity is bound to. - */ - TUint32 Key() const; - -protected: - - /** - * Constructor. - * - * @param aUid The UID of the repository that this entity will be bound to. - * @param aKey The key within the repository that this entity will be bound to. - * @param aObserver The observer that is notified whenever the value of the key within the repository changes. - * @param aPriority The priority of the active object. - */ - IMPORT_C CRadioRepositoryEntityBase( const TUid& aUid, TUint32 aKey, MRadioRepositoryEntityObserver& aObserver, CActive::TPriority aPriority ); - -protected: - - /** The observer that is notified of changes in the key. */ - MRadioRepositoryEntityObserver& iObserver; - - /** The UID of the repository the entity is bound to. */ - TUid iUid; - - /** The key the entity is bound to.. */ - TUint32 iKey; - - }; - -#endif // C_RADIOREPOSITORYENTITYBASE_H diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/cradiorepositorymanager.h --- a/radioengine/utils/api/cradiorepositorymanager.h Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,255 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef C_RADIOREPOSITORYMANAGER_H -#define C_RADIOREPOSITORYMANAGER_H - -// System includes -#include - -// Forward declarations -class MRadioRepositoryEntityObserver; - -/** The maximum length of a string buffer. */ -const TInt KRadioEntityBuf16Length = 256; // Maximum: NCentralRepositoryConstants::KMaxUnicodeStringLength; -/** The maximum length of a binary buffer. */ -const TInt KRadioEntityBuf8Length = KRadioEntityBuf16Length * 2; // Maximum: NCentralRepositoryConstants::KMaxBinaryLength; - -/** Maximum length binary buffer. */ -typedef TBuf8 TRadioEntityBuf8; -/** Maximum length string buffer. */ -typedef TBuf16 TRadioEntityBuf16; - -/** - * Central repository entity manager. - * - * Manages central repository entities that listen to specific repository and a key within it, notifying the observer - * whenever the key's value changes. - * - * Also a set of static methods are provided that wrap the common use case of central repository where the user - * is only interested to read or write the value of a key and then discard the repository object. - */ -NONSHARABLE_CLASS( CRadioRepositoryManager ) : public CBase - { - -public: - - /** - * Possible entity types. - */ - enum TRadioEntityType - { - ERadioEntityInt, /**< The entity is an integer. */ - ERadioEntityReal, /**< The entity is a floating point number. */ - ERadioEntityDes8, /**< The entity is a binary value. */ - ERadioEntityDes16 /**< The entity is a string. */ - }; - - IMPORT_C static CRadioRepositoryManager* NewL( TInt aGranularity ); - - IMPORT_C ~CRadioRepositoryManager(); - - /** - * Adds observer - * - * @param aObserver The observer that is notified of all the changes in the observed keys' values. - */ - virtual void AddObserverL( MRadioRepositoryEntityObserver* aObserver ) = 0; - - /** - * Removes observer - * - * @param aObserver The observer that is to be removed - */ - virtual void RemoveObserver( MRadioRepositoryEntityObserver* aObserver ) = 0; - - /** - * Enables or disables the writing of entities' values to the repository. - * - * Disabling the save functionality is important when the free disk space reaches critical level. - * - * @param aEnable ETrue if the entities are allowed to write their value to the repository, EFalse otherwise. - */ - virtual void EnableSave( TBool aEnable ) = 0; - - /** - * Adds an entity to the manager. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aType The type of the key within the repository. - */ - virtual void AddEntityL( const TUid& aUid, TUint32 aKey, TRadioEntityType aType ) = 0; - - /** - * Removes an entity from the manager. - * - * Entities should only be removed when they are no longer needed. The destructor of the repository manager - * deletes all the remaining entities. - * - * @param aUid The UID of the entity to be removed. - * @param aKey The key of the entity to be removed. - */ - virtual void RemoveEntity( const TUid& aUid, TUint32 aKey ) = 0; - - /** - * Sets the value of an integer entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The value to set. - */ - virtual TInt SetEntityValue( const TUid& aUid, TUint32 aKey, TInt aValue ) = 0; - - /** - * Sets the value of a floating point entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The value to set. - */ - virtual TInt SetEntityValue( const TUid& aUid, TUint32 aKey, const TReal& aValue ) = 0; - - /** - * Sets the value of a binary entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The value to set. - */ - virtual TInt SetEntityValue( const TUid& aUid, TUint32 aKey, const TDesC8& aValue ) = 0; - - /** - * Sets the value of a string entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The value to set. - */ - virtual TInt SetEntityValue( const TUid& aUid, TUint32 aKey, const TDesC16& aValue ) = 0; - - /** - * Returns the cached value of an integer entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @return The cached value of the entity. - */ - virtual TInt EntityValueInt( const TUid& aUid, TUint32 aKey ) const = 0; - - /** - * Returns the cached value of a floating point entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @return The cached value of the entity. - */ - virtual const TReal& EntityValueReal( const TUid& aUid, TUint32 aKey ) const = 0; - - /** - * Returns the cached value of a binary entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @return The cached value of the entity. - */ - virtual const TDesC8& EntityValueDes8( const TUid& aUid, TUint32 aKey ) const = 0; - - /** - * Returns the cached value of a string entity. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @return The cached value of the entity. - */ - virtual const TDesC16& EntityValueDes16( const TUid& aUid, TUint32 aKey ) const = 0; - - /** - * Sets the value of an integer key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue The value to set. - */ - IMPORT_C static void SetRepositoryValueL( const TUid& aUid, TUint32 aKey, TInt aValue ); - - /** - * Sets the value of a floating point key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue The value to set. - */ - IMPORT_C static void SetRepositoryValueL( const TUid& aUid, TUint32 aKey, const TReal& aValue ); - - /** - * Sets the value of a binary key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue The value to set. - */ - IMPORT_C static void SetRepositoryValueL( const TUid& aUid, TUint32 aKey, const TDesC8& aValue ); - - /** - * Sets the value of a string key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue The value to set. - */ - IMPORT_C static void SetRepositoryValueL( const TUid& aUid, TUint32 aKey, const TDesC16& aValue ); - - /** - * Gets the value of an integer key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue On return, the value of the key within the repository. - */ - IMPORT_C static void GetRepositoryValueL( const TUid& aUid, TUint32 aKey, TInt& aValue ); - - /** - * Gets the value of a floating point key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue On return, the value of the key within the repository. - */ - IMPORT_C static void GetRepositoryValueL( const TUid& aUid, TUint32 aKey, TReal& aValue ); - - /** - * Gets the value of a binary key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue On return, the value of the key within the repository. - */ - IMPORT_C static void GetRepositoryValueL( const TUid& aUid, TUint32 aKey, TDes8& aValue ); - - /** - * Gets the value of a string key in the repository. - * - * @param aUid The UID of the repository. - * @param aKey The key within the repository. - * @param aValue On return, the value of the key within the repository. - */ - IMPORT_C static void GetRepositoryValueL( const TUid& aUid, TUint32 aKey, TDes16& aValue ); - - }; - -#endif // C_RADIOREPOSITORYMANAGER_H diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/mradiorepositoryentityobserver.h --- a/radioengine/utils/api/mradiorepositoryentityobserver.h Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef M_RADIOREPOSITORYENTITYOBSERVER_H -#define M_RADIOREPOSITORYENTITYOBSERVER_H - -/** - * Entity observer interface. - */ -NONSHARABLE_CLASS( MRadioRepositoryEntityObserver ) - { - -public: - - /** - * Invoked when the observed entity's value is changed. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The new value of the entity. - * @param aError One of the standard system error codes. - */ - virtual void HandleRepositoryValueChangeL( const TUid& aUid, TUint32 aKey, TInt aValue, TInt aError ) = 0; - - /** - * Invoked when the observed entity's value is changed. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The new value of the entity. - * @param aError One of the standard system error codes. - */ - virtual void HandleRepositoryValueChangeL( const TUid& aUid, TUint32 aKey, const TReal& aValue, TInt aError ) = 0; - - /** - * Invoked when the observed entity's value is changed. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The new value of the entity. - * @param aError One of the standard system error codes. - */ - virtual void HandleRepositoryValueChangeL( const TUid& aUid, TUint32 aKey, const TDesC8& aValue, TInt aError ) = 0; - - /** - * Invoked when the observed entity's value is changed. - * - * @param aUid The UID of the entity. - * @param aKey The key of the entity. - * @param aValue The new value of the entity. - * @param aError One of the standard system error codes. - */ - virtual void HandleRepositoryValueChangeL( const TUid& aUid, TUint32 aKey, const TDesC16& aValue, TInt aError ) = 0; - - }; - -#endif // M_RADIOREPOSITORYENTITYOBSERVER_H - diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/api/radioengineutils.h --- a/radioengine/utils/api/radioengineutils.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/api/radioengineutils.h Fri Jul 23 10:16:59 2010 +0300 @@ -49,27 +49,6 @@ */ IMPORT_C static RFs& FsSession(); - /** - * Converts a frequency to a descriptor format. - * Returned descriptor is left in CleanupStack. - * - * @param aFreq Frequency, in kilohertz, to convert. - * @param aDecimalCount Decimal count to use. - * @param aResourceId Resource ID of the format string, or KErrNotFound if no such resource is to be used. - * @return The formatted descriptor. Ownership is transferred. - */ - IMPORT_C static HBufC* ReadFrequencyStringLC( TUint32 aFreq, TInt aDecimalCount, TInt aResourceId = KErrNotFound ); - - /** - * Writes formatted frequency to a give descriptor. - * - * @param aDest Destination descriptor. - * @param aFreq Frequency, in kilohertz, to convert. - * @param aDecimalCount Decimal count to use. - * @param aFormat Format read from resource. - */ - IMPORT_C static void FormatFrequencyString( TDes& aDest, TUint32 aFreq, TInt aDecimalCount, TDesC& aFormat ); - }; #endif // RADIOENGINEUTILS_H diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/bwins/fmradioengineutilsu.def --- a/radioengine/utils/bwins/fmradioengineutilsu.def Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/bwins/fmradioengineutilsu.def Fri Jul 23 10:16:59 2010 +0300 @@ -4,29 +4,25 @@ ??0CRadioRoutableAudio@@QAE@PAVCRadioAudioRouter@@@Z @ 3 NONAME ; CRadioRoutableAudio::CRadioRoutableAudio(class CRadioAudioRouter *) ?InitializeL@RadioEngineUtils@@SAXXZ @ 4 NONAME ; void RadioEngineUtils::InitializeL(void) ?NewL@CRadioRemConTarget@@SAPAV1@XZ @ 5 NONAME ; class CRadioRemConTarget * CRadioRemConTarget::NewL(void) - ??1CRadioRepositoryEntityBase@@UAE@XZ @ 6 NONAME ; CRadioRepositoryEntityBase::~CRadioRepositoryEntityBase(void) - ??1TRadioMethodLogger@@QAE@XZ @ 7 NONAME ; TRadioMethodLogger::~TRadioMethodLogger(void) - ??1CRadioRoutableAudio@@UAE@XZ @ 8 NONAME ; CRadioRoutableAudio::~CRadioRoutableAudio(void) - ?SetAudioOutput@CRadioRoutableAudio@@IAEXPAVCAudioOutput@@@Z @ 9 NONAME ; void CRadioRoutableAudio::SetAudioOutput(class CAudioOutput *) - ?RegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 10 NONAME ; void CRadioAudioRouter::RegisterRoutableAudio(class CRadioRoutableAudio *) - ?ReadFrequencyStringLC@RadioEngineUtils@@SAPAVHBufC16@@KHH@Z @ 11 NONAME ; class HBufC16 * RadioEngineUtils::ReadFrequencyStringLC(unsigned long, int, int) - ?ValueDes@CRadioPropertyObserver@@QBEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CRadioPropertyObserver::ValueDes(void) const - ??0CRadioRepositoryEntityBase@@IAE@ABVTUid@@KAAVMRadioRepositoryEntityObserver@@W4TPriority@CActive@@@Z @ 13 NONAME ; CRadioRepositoryEntityBase::CRadioRepositoryEntityBase(class TUid const &, unsigned long, class MRadioRepositoryEntityObserver &, enum CActive::TPriority) - ??1CRadioSystemEventCollector@@UAE@XZ @ 14 NONAME ; CRadioSystemEventCollector::~CRadioSystemEventCollector(void) - ??1CRadioAudioRouter@@UAE@XZ @ 15 NONAME ; CRadioAudioRouter::~CRadioAudioRouter(void) - ?ActivateL@CRadioPropertyObserver@@QAEXXZ @ 16 NONAME ; void CRadioPropertyObserver::ActivateL(void) - ?Logger@RadioEngineUtils@@SAPAVMRadioEngineLogger@@XZ @ 17 NONAME ; class MRadioEngineLogger * RadioEngineUtils::Logger(void) - ?NewL@CRadioSystemEventCollector@@SAPAV1@XZ @ 18 NONAME ; class CRadioSystemEventCollector * CRadioSystemEventCollector::NewL(void) - ?Logger@MRadioEngineLogger@@SAPAV1@XZ @ 19 NONAME ; class MRadioEngineLogger * MRadioEngineLogger::Logger(void) - ?Release@RadioEngineUtils@@SAXXZ @ 20 NONAME ; void RadioEngineUtils::Release(void) - ?DeleteAudioOutput@CRadioRoutableAudio@@IAEXXZ @ 21 NONAME ; void CRadioRoutableAudio::DeleteAudioOutput(void) - ?FormatFrequencyString@RadioEngineUtils@@SAXAAVTDes16@@KHAAVTDesC16@@@Z @ 22 NONAME ; void RadioEngineUtils::FormatFrequencyString(class TDes16 &, unsigned long, int, class TDesC16 &) - ?ValueInt@CRadioPropertyObserver@@QBEHXZ @ 23 NONAME ; int CRadioPropertyObserver::ValueInt(void) const - ?SetAudioRouteL@CRadioAudioRouter@@QAEXW4TRadioAudioRoute@RadioEngine@@@Z @ 24 NONAME ; void CRadioAudioRouter::SetAudioRouteL(enum RadioEngine::TRadioAudioRoute) - ?NewL@CRadioAudioRouter@@SAPAV1@AAVMRadioAudioRoutingObserver@@@Z @ 25 NONAME ; class CRadioAudioRouter * CRadioAudioRouter::NewL(class MRadioAudioRoutingObserver &) - ?FsSession@RadioEngineUtils@@SAAAVRFs@@XZ @ 26 NONAME ; class RFs & RadioEngineUtils::FsSession(void) - ?UnRegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 27 NONAME ; void CRadioAudioRouter::UnRegisterRoutableAudio(class CRadioRoutableAudio *) - ?AudioRoutingSupported@CRadioRoutableAudio@@QBEHXZ @ 28 NONAME ; int CRadioRoutableAudio::AudioRoutingSupported(void) const - ?NewL@CRadioPropertyObserver@@SAPAV1@AAVMRadioPropertyChangeObserver@@ABVTUid@@IW4TRadioPropertyType@1@@Z @ 29 NONAME ; class CRadioPropertyObserver * CRadioPropertyObserver::NewL(class MRadioPropertyChangeObserver &, class TUid const &, unsigned int, enum CRadioPropertyObserver::TRadioPropertyType) - ??0TRadioMethodLogger@@QAE@PBG0@Z @ 30 NONAME ; TRadioMethodLogger::TRadioMethodLogger(unsigned short const *, unsigned short const *) + ??1TRadioMethodLogger@@QAE@XZ @ 6 NONAME ; TRadioMethodLogger::~TRadioMethodLogger(void) + ??1CRadioRoutableAudio@@UAE@XZ @ 7 NONAME ; CRadioRoutableAudio::~CRadioRoutableAudio(void) + ?SetAudioOutput@CRadioRoutableAudio@@IAEXPAVCAudioOutput@@@Z @ 8 NONAME ; void CRadioRoutableAudio::SetAudioOutput(class CAudioOutput *) + ?RegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 9 NONAME ; void CRadioAudioRouter::RegisterRoutableAudio(class CRadioRoutableAudio *) + ?ValueDes@CRadioPropertyObserver@@QBEABVTDesC16@@XZ @ 10 NONAME ; class TDesC16 const & CRadioPropertyObserver::ValueDes(void) const + ??1CRadioSystemEventCollector@@UAE@XZ @ 11 NONAME ; CRadioSystemEventCollector::~CRadioSystemEventCollector(void) + ??1CRadioAudioRouter@@UAE@XZ @ 12 NONAME ; CRadioAudioRouter::~CRadioAudioRouter(void) + ?ActivateL@CRadioPropertyObserver@@QAEXXZ @ 13 NONAME ; void CRadioPropertyObserver::ActivateL(void) + ?Logger@RadioEngineUtils@@SAPAVMRadioEngineLogger@@XZ @ 14 NONAME ; class MRadioEngineLogger * RadioEngineUtils::Logger(void) + ?NewL@CRadioSystemEventCollector@@SAPAV1@XZ @ 15 NONAME ; class CRadioSystemEventCollector * CRadioSystemEventCollector::NewL(void) + ?Logger@MRadioEngineLogger@@SAPAV1@XZ @ 16 NONAME ; class MRadioEngineLogger * MRadioEngineLogger::Logger(void) + ?Release@RadioEngineUtils@@SAXXZ @ 17 NONAME ; void RadioEngineUtils::Release(void) + ?DeleteAudioOutput@CRadioRoutableAudio@@IAEXXZ @ 18 NONAME ; void CRadioRoutableAudio::DeleteAudioOutput(void) + ?ValueInt@CRadioPropertyObserver@@QBEHXZ @ 19 NONAME ; int CRadioPropertyObserver::ValueInt(void) const + ?SetAudioRouteL@CRadioAudioRouter@@QAEXW4TRadioAudioRoute@RadioEngine@@@Z @ 20 NONAME ; void CRadioAudioRouter::SetAudioRouteL(enum RadioEngine::TRadioAudioRoute) + ?FsSession@RadioEngineUtils@@SAAAVRFs@@XZ @ 21 NONAME ; class RFs & RadioEngineUtils::FsSession(void) + ?NewL@CRadioAudioRouter@@SAPAV1@AAVMRadioAudioRoutingObserver@@@Z @ 22 NONAME ; class CRadioAudioRouter * CRadioAudioRouter::NewL(class MRadioAudioRoutingObserver &) + ?UnRegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 23 NONAME ; void CRadioAudioRouter::UnRegisterRoutableAudio(class CRadioRoutableAudio *) + ?AudioRoutingSupported@CRadioRoutableAudio@@QBEHXZ @ 24 NONAME ; int CRadioRoutableAudio::AudioRoutingSupported(void) const + ??0TRadioMethodLogger@@QAE@PBG0@Z @ 25 NONAME ; TRadioMethodLogger::TRadioMethodLogger(unsigned short const *, unsigned short const *) + ?NewL@CRadioPropertyObserver@@SAPAV1@AAVMRadioPropertyChangeObserver@@ABVTUid@@IW4TRadioPropertyType@1@@Z @ 26 NONAME ; class CRadioPropertyObserver * CRadioPropertyObserver::NewL(class MRadioPropertyChangeObserver &, class TUid const &, unsigned int, enum CRadioPropertyObserver::TRadioPropertyType) diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/eabi/fmradioengineutilsu.def --- a/radioengine/utils/eabi/fmradioengineutilsu.def Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/eabi/fmradioengineutilsu.def Fri Jul 23 10:16:59 2010 +0300 @@ -1,49 +1,41 @@ EXPORTS _ZN16RadioEngineUtils11InitializeLEv @ 1 NONAME - _ZN16RadioEngineUtils21FormatFrequencyStringER6TDes16miR7TDesC16 @ 2 NONAME - _ZN16RadioEngineUtils21ReadFrequencyStringLCEmii @ 3 NONAME - _ZN16RadioEngineUtils6LoggerEv @ 4 NONAME - _ZN16RadioEngineUtils7ReleaseEv @ 5 NONAME - _ZN16RadioEngineUtils9FsSessionEv @ 6 NONAME - _ZN17CRadioAudioRouter14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 7 NONAME - _ZN17CRadioAudioRouter21RegisterRoutableAudioEP19CRadioRoutableAudio @ 8 NONAME - _ZN17CRadioAudioRouter23UnRegisterRoutableAudioEP19CRadioRoutableAudio @ 9 NONAME - _ZN17CRadioAudioRouter4NewLER26MRadioAudioRoutingObserver @ 10 NONAME - _ZN17CRadioAudioRouterD0Ev @ 11 NONAME - _ZN17CRadioAudioRouterD1Ev @ 12 NONAME - _ZN17CRadioAudioRouterD2Ev @ 13 NONAME - _ZN18CRadioRemConTarget4NewLEv @ 14 NONAME - _ZN18MRadioEngineLogger6LoggerEv @ 15 NONAME - _ZN18TRadioMethodLoggerC1EPKtS1_ @ 16 NONAME - _ZN18TRadioMethodLoggerC2EPKtS1_ @ 17 NONAME - _ZN18TRadioMethodLoggerD1Ev @ 18 NONAME - _ZN18TRadioMethodLoggerD2Ev @ 19 NONAME - _ZN19CRadioRoutableAudio14SetAudioOutputEP12CAudioOutput @ 20 NONAME - _ZN19CRadioRoutableAudio14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 21 NONAME - _ZN19CRadioRoutableAudio17DeleteAudioOutputEv @ 22 NONAME - _ZN19CRadioRoutableAudioC1EP17CRadioAudioRouter @ 23 NONAME - _ZN19CRadioRoutableAudioC2EP17CRadioAudioRouter @ 24 NONAME - _ZN19CRadioRoutableAudioD0Ev @ 25 NONAME - _ZN19CRadioRoutableAudioD1Ev @ 26 NONAME - _ZN19CRadioRoutableAudioD2Ev @ 27 NONAME - _ZN22CRadioPropertyObserver4NewLER28MRadioPropertyChangeObserverRK4TUidjNS_18TRadioPropertyTypeE @ 28 NONAME - _ZN22CRadioPropertyObserver9ActivateLEv @ 29 NONAME - _ZN26CRadioRepositoryEntityBaseC2ERK4TUidmR30MRadioRepositoryEntityObserverN7CActive9TPriorityE @ 30 NONAME - _ZN26CRadioRepositoryEntityBaseD0Ev @ 31 NONAME - _ZN26CRadioRepositoryEntityBaseD1Ev @ 32 NONAME - _ZN26CRadioRepositoryEntityBaseD2Ev @ 33 NONAME - _ZN26CRadioSystemEventCollector4NewLEv @ 34 NONAME - _ZN26CRadioSystemEventCollectorD0Ev @ 35 NONAME - _ZN26CRadioSystemEventCollectorD1Ev @ 36 NONAME - _ZN26CRadioSystemEventCollectorD2Ev @ 37 NONAME - _ZNK19CRadioRoutableAudio21AudioRoutingSupportedEv @ 38 NONAME - _ZNK22CRadioPropertyObserver8ValueDesEv @ 39 NONAME - _ZNK22CRadioPropertyObserver8ValueIntEv @ 40 NONAME - _ZNK22CRadioPropertyObserver9ValueDes8Ev @ 41 NONAME - _ZTI15CRadioEngineTls @ 42 NONAME - _ZTI19CRadioRoutableAudio @ 43 NONAME - _ZTI26CRadioRepositoryEntityBase @ 44 NONAME - _ZTV15CRadioEngineTls @ 45 NONAME - _ZTV19CRadioRoutableAudio @ 46 NONAME - _ZTV26CRadioRepositoryEntityBase @ 47 NONAME + _ZN16RadioEngineUtils6LoggerEv @ 2 NONAME + _ZN16RadioEngineUtils7ReleaseEv @ 3 NONAME + _ZN16RadioEngineUtils9FsSessionEv @ 4 NONAME + _ZN17CRadioAudioRouter14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 5 NONAME + _ZN17CRadioAudioRouter21RegisterRoutableAudioEP19CRadioRoutableAudio @ 6 NONAME + _ZN17CRadioAudioRouter23UnRegisterRoutableAudioEP19CRadioRoutableAudio @ 7 NONAME + _ZN17CRadioAudioRouter4NewLER26MRadioAudioRoutingObserver @ 8 NONAME + _ZN17CRadioAudioRouterD0Ev @ 9 NONAME + _ZN17CRadioAudioRouterD1Ev @ 10 NONAME + _ZN17CRadioAudioRouterD2Ev @ 11 NONAME + _ZN18CRadioRemConTarget4NewLEv @ 12 NONAME + _ZN18MRadioEngineLogger6LoggerEv @ 13 NONAME + _ZN18TRadioMethodLoggerC1EPKtS1_ @ 14 NONAME + _ZN18TRadioMethodLoggerC2EPKtS1_ @ 15 NONAME + _ZN18TRadioMethodLoggerD1Ev @ 16 NONAME + _ZN18TRadioMethodLoggerD2Ev @ 17 NONAME + _ZN19CRadioRoutableAudio14SetAudioOutputEP12CAudioOutput @ 18 NONAME + _ZN19CRadioRoutableAudio14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 19 NONAME + _ZN19CRadioRoutableAudio17DeleteAudioOutputEv @ 20 NONAME + _ZN19CRadioRoutableAudioC1EP17CRadioAudioRouter @ 21 NONAME + _ZN19CRadioRoutableAudioC2EP17CRadioAudioRouter @ 22 NONAME + _ZN19CRadioRoutableAudioD0Ev @ 23 NONAME + _ZN19CRadioRoutableAudioD1Ev @ 24 NONAME + _ZN19CRadioRoutableAudioD2Ev @ 25 NONAME + _ZN22CRadioPropertyObserver4NewLER28MRadioPropertyChangeObserverRK4TUidjNS_18TRadioPropertyTypeE @ 26 NONAME + _ZN22CRadioPropertyObserver9ActivateLEv @ 27 NONAME + _ZN26CRadioSystemEventCollector4NewLEv @ 28 NONAME + _ZN26CRadioSystemEventCollectorD0Ev @ 29 NONAME + _ZN26CRadioSystemEventCollectorD1Ev @ 30 NONAME + _ZN26CRadioSystemEventCollectorD2Ev @ 31 NONAME + _ZNK19CRadioRoutableAudio21AudioRoutingSupportedEv @ 32 NONAME + _ZNK22CRadioPropertyObserver8ValueDesEv @ 33 NONAME + _ZNK22CRadioPropertyObserver8ValueIntEv @ 34 NONAME + _ZNK22CRadioPropertyObserver9ValueDes8Ev @ 35 NONAME + _ZTI15CRadioEngineTls @ 36 NONAME + _ZTI19CRadioRoutableAudio @ 37 NONAME + _ZTV15CRadioEngineTls @ 38 NONAME + _ZTV19CRadioRoutableAudio @ 39 NONAME diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/group/radioengineutils.mmp --- a/radioengine/utils/group/radioengineutils.mmp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/group/radioengineutils.mmp Fri Jul 23 10:16:59 2010 +0300 @@ -49,7 +49,6 @@ SOURCE cradiopropertyobserver.cpp SOURCE cradioremcontarget.cpp SOURCE cradioremcontargetimp.cpp -SOURCE cradiorepositoryentitybase.cpp SOURCE cradiosystemeventdetector.cpp SOURCE cradiosystemeventcollector.cpp SOURCE cradiosystemeventcollectorimp.cpp @@ -66,4 +65,3 @@ LIBRARY remconcoreapi.lib LIBRARY remconextensionapi.lib LIBRARY remconinterfacebase.lib -LIBRARY featmgr.lib diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/inc/cradiopropertyobserver.h --- a/radioengine/utils/inc/cradiopropertyobserver.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/inc/cradiopropertyobserver.h Fri Jul 23 10:16:59 2010 +0300 @@ -201,42 +201,42 @@ /** * Value of a subscribed category property of type int. */ - TInt iValueInt; + TInt iValueInt; /** * Value of a subscribed category property of type byte array. */ - HBufC8* iValueByteArray; + HBufC8* iValueByteArray; /** * Value of a subscribed category property of type text. */ - HBufC* iValueText; + HBufC* iValueText; /** * Handle to Publish And Subscribe component */ - RProperty iProperty; + RProperty iProperty; /** * Observer to be notified when particular Property value has changed */ - MRadioPropertyChangeObserver& iObserver; + MRadioPropertyChangeObserver& iObserver; /** * UID of Publish And Subscribe category */ - TUid iCategory; + TUid iCategory; /** * Subkey to be used with Publish And Subscribe */ - TUint iKey; + TUint iKey; /** * Type of the observed property. */ - TRadioPropertyType iPropertyType; + TRadioPropertyType iPropertyType; }; diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/inc/cradiosystemeventdetector.h --- a/radioengine/utils/inc/cradiosystemeventdetector.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/inc/cradiosystemeventdetector.h Fri Jul 23 10:16:59 2010 +0300 @@ -100,7 +100,7 @@ /**Indicator for the call status*/ TBool iIsCallActive; - /** Array of audio policy categories that VR must not resume after. */ + /** Array of audio policy categories that radio must not resume after. */ RArray iNoAutoResumeAudioCategories; /** Indicator for audio resource status. */ diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/cradioaccessoryobserver.cpp --- a/radioengine/utils/src/cradioaccessoryobserver.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/src/cradioaccessoryobserver.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -116,7 +116,7 @@ TBool accessoryFound = EFalse; LOG_FORMAT( "Connected accessories count = %d", iAccPolGenIdArr.Count()); - for ( TInt i = 0; i < iAccPolGenIdArr.Count() && !accessoryFound; i++ ) + for ( TInt i = 0; i < iAccPolGenIdArr.Count() && !accessoryFound; ++i ) { TAccPolGenericID accPolGenId = iAccPolGenIdArr.GetGenericIDL( i ); @@ -237,7 +237,7 @@ iSavedAccessories.Reset(); - for ( TInt i = 0; i < iAccPolGenIdArr.Count(); i++ ) + for ( TInt i = 0; i < iAccPolGenIdArr.Count(); ++i ) { iSavedAccessories.AppendL( iAccPolGenIdArr.GetGenericIDL( i ) ); LOG_FORMAT( "- accessory in slot %d: %d", @@ -255,7 +255,7 @@ LEVEL2( LOG_METHOD_AUTO ); TInt removedAccessories( 0 ); - for ( TInt i = 0; i < iSavedAccessories.Count(); i++ ) + for ( TInt i = 0; i < iSavedAccessories.Count(); ++i ) { TAccPolGenericID savedAcc = iSavedAccessories[i]; @@ -293,7 +293,7 @@ LEVEL2( LOG_METHOD_AUTO ); TInt addedAccessories( 0 ); - for ( TInt i = 0; i < iAccPolGenIdArr.Count(); i++ ) + for ( TInt i = 0; i < iAccPolGenIdArr.Count(); ++i ) { TAccPolGenericID freshAcc = iAccPolGenIdArr.GetGenericIDL( i ); diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/cradioaudiorouter.cpp --- a/radioengine/utils/src/cradioaudiorouter.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/src/cradioaudiorouter.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -79,7 +79,7 @@ { LEVEL3( LOG_METHOD_AUTO ); - for ( TInt i = 0 ; i < iRoutableAudios.Count(); i++ ) + for ( TInt i = 0; i < iRoutableAudios.Count(); ++i ) { iRoutableAudios[i]->SetAudioRouteL( aAudioRoute ); } diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/cradioremcontargetimp.cpp --- a/radioengine/utils/src/cradioremcontargetimp.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/src/cradioremcontargetimp.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -81,10 +81,6 @@ CRadioRemConTargetImp::~CRadioRemConTargetImp() { LEVEL3( LOG_METHOD_AUTO ); - if ( iRepeatTimer ) - { - iRepeatTimer->Cancel(); - } delete iRepeatTimer; delete iInterfaceSelector; //deletes also iCallTarget and iCoreTarget iCoreTarget = NULL; diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/cradiorepositoryentitybase.cpp --- a/radioengine/utils/src/cradiorepositoryentitybase.cpp Thu Jul 08 12:44:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "cradiorepositoryentitybase.h" -#include "cradioenginelogger.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -EXPORT_C CRadioRepositoryEntityBase::CRadioRepositoryEntityBase( const TUid& aUid, - TUint32 aKey, - MRadioRepositoryEntityObserver& aObserver, - CActive::TPriority aPriority ) - : CActive( aPriority ), iObserver( aObserver ), iUid( aUid ), iKey( aKey ) - { - LEVEL3( LOG_METHOD_AUTO ); - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -EXPORT_C CRadioRepositoryEntityBase::~CRadioRepositoryEntityBase() - { - LEVEL3( LOG_METHOD_AUTO ); - } - -// --------------------------------------------------------------------------- -// Returns the UID of this entity. -// --------------------------------------------------------------------------- -// -const TUid& CRadioRepositoryEntityBase::Uid() const - { - return iUid; - } - -// --------------------------------------------------------------------------- -// Returns the key of this entity. -// --------------------------------------------------------------------------- -// -TUint32 CRadioRepositoryEntityBase::Key() const - { - LEVEL3( LOG_METHOD_AUTO ); - return iKey; - } diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/cradiosystemeventcollectorimp.cpp --- a/radioengine/utils/src/cradiosystemeventcollectorimp.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/src/cradiosystemeventcollectorimp.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -20,7 +20,6 @@ // User includes #include "cradioaccessoryobserver.h" -#include "cradiorepositorymanager.h" #include "cradiosystemeventcollectorimp.h" #include "cradiosystemeventdetector.h" #include "radioengineutils.h" diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/cradiosystemeventdetector.cpp --- a/radioengine/utils/src/cradiosystemeventdetector.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/src/cradiosystemeventdetector.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -87,6 +87,7 @@ #ifndef __WINS__ // Define audio types for not resuming. + //TODO: Check these audio resume categories! iNoAutoResumeAudioCategories = RArray( KVRAudioCategoryArrayGranularity ); iNoAutoResumeAudioCategories.AppendL( ECatMediaPlayer ); iNoAutoResumeAudioCategories.AppendL( ECatMobileTv ); @@ -176,7 +177,7 @@ TAudioClientList audioClients; audioClients.Copy( aValue ); // Check all playing audios! - for ( TInt i = 0; i < audioClients().iNumOfProcesses ; i++ ) + for ( TInt i = 0; i < audioClients().iNumOfProcesses ; ++i ) { TInt cat = audioClients().iClientCategoryList[i]; LOG_FORMAT( "Check audio cat %x", cat ); diff -r ba22309243a1 -r f8c3d4e6102c radioengine/utils/src/radioengineutils.cpp --- a/radioengine/utils/src/radioengineutils.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radioengine/utils/src/radioengineutils.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -17,7 +17,6 @@ // System includes #include -#include // User includes #include "radioengineutils.h" @@ -59,56 +58,3 @@ { return CRadioEngineTls::Instance().FsSession(); } - -// --------------------------------------------------------------------------- -// Utility method for frequency formatting. -// Frequency is assumed to be in kilohertz format. -// --------------------------------------------------------------------------- -// -EXPORT_C HBufC* RadioEngineUtils::ReadFrequencyStringLC( TUint32 aFreq, - TInt aDecimalCount, - TInt aResourceId ) - { - TBuf freqText; - freqText.AppendNum( static_cast( aFreq ) / 1000.0f, TRealFormat( KDefaultRealWidth, aDecimalCount ) ); // Converts kilohertz to megahertz. - - // Converts the numbers to the proper display mode. - - HBufC* channelFreq = NULL; - - if ( aResourceId == KErrNotFound ) // No resource string. - { - channelFreq = freqText.AllocLC(); - } - else - { - channelFreq = StringLoader::LoadLC( aResourceId, freqText ); - } - - return channelFreq; - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -EXPORT_C void RadioEngineUtils::FormatFrequencyString( TDes& aDest, - TUint32 aFreq, - TInt aDecimalCount, - TDesC& aFormat ) - { - TBuf freqText; - freqText.AppendNum( static_cast( aFreq ) / 1000.0f, TRealFormat( KDefaultRealWidth, aDecimalCount ) ); // Converts kilohertz to megahertz. - - // Converts the numbers to the proper display mode. - - if ( aFormat.Length() <= 0 || freqText.Length() > aDest.MaxLength() ) // No format. - { - aDest.Copy( freqText.Left( aDest.Length() ) ); - } - else - { - StringLoader::Format( aDest, aFormat, KErrNotFound, freqText ); - } - } - diff -r ba22309243a1 -r f8c3d4e6102c radiohswidget/inc/radiohswidgetprofilereader.h --- a/radiohswidget/inc/radiohswidgetprofilereader.h Thu Jul 08 12:44:18 2010 +0300 +++ b/radiohswidget/inc/radiohswidgetprofilereader.h Fri Jul 23 10:16:59 2010 +0300 @@ -37,7 +37,7 @@ void startMonitoringRadioRunningStatus(); - bool isCurrentProfileOffline(); + bool isInOfflineMode(); public slots: void handleDeletedItem(const XQSettingsKey &key); diff -r ba22309243a1 -r f8c3d4e6102c radiohswidget/src/radiohswidget.cpp --- a/radiohswidget/src/radiohswidget.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radiohswidget/src/radiohswidget.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -1085,7 +1085,7 @@ // starting the radio is allowed in other profiles without asking a // permission. bool radioStartPermssion = true; - if (mProfileMonitor->isCurrentProfileOffline()) { + if (mProfileMonitor->isInOfflineMode()) { // Device is in offline profile, ask the user for permission to start HbDeviceMessageBox box(hbTrId( "txt_fmradiohswidget_rad_info_activate_radio_in_offline_mode_hs"), diff -r ba22309243a1 -r f8c3d4e6102c radiohswidget/src/radiohswidgetprofilereader.cpp --- a/radiohswidget/src/radiohswidgetprofilereader.cpp Thu Jul 08 12:44:18 2010 +0300 +++ b/radiohswidget/src/radiohswidgetprofilereader.cpp Fri Jul 23 10:16:59 2010 +0300 @@ -17,9 +17,6 @@ // System includes #include -// TODO: Profile information should be accessed from QtMobility when it is -// ready. -#include #include "xqsettingsmanager.h" #include "xqsettingskey.h" #include "xqpublishandsubscribeutils.h" @@ -28,13 +25,12 @@ #include "radiohswidgetprofilereader.h" #include "radiohswidget.h" #include "radioservicedef.h" +#include "radio_global.h" #include "radiologger.h" // Constants /** Constant for radio running undefined status. */ const int RADIO_RUNNING_STATUS_UNDEFINED(-1); -/** Constant for Off-line profile. */ -const int OFFLINE_PROFILE(5); /*! \class RadioHsWidgetProfileReader @@ -92,19 +88,21 @@ } /*! - Reads the current profile of the device and \returns \c true if the - current profile is offline, \c false otherwise. + Checks if device is in offline mode and \returns \c true if it is + and \c false if not. */ -bool RadioHsWidgetProfileReader::isCurrentProfileOffline() +bool RadioHsWidgetProfileReader::isInOfflineMode() { LOG_METHOD_RET("%d"); - XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, - KCRUidProfileEngine.iUid, KProEngActiveProfile); + XQSettingsKey connectionKey( XQSettingsKey::TargetCentralRepository, + CENREP_CORE_APPLICATION_UIS, ID_NETWORK_CONNECTION_ALLOWED ); + // Read current value. - QVariant profile(mSettingsManager->readItemValue(profileKey)); - if (profile.canConvert(QVariant::Int) && profile.toInt() == OFFLINE_PROFILE) { + const QVariant connectionAllowed = mSettingsManager->readItemValue( connectionKey ); + if ( connectionAllowed.canConvert( QVariant::Int ) && connectionAllowed.toInt() == NetworkNotAllowed ) { return true; } + return false; }