diff -r f979ecb2b13e -r c198609911f9 calendarui/application/src/calenserviceprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calendarui/application/src/calenserviceprovider.cpp Fri Apr 16 14:57:40 2010 +0300 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2010 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 +#include +#include + +#include "calencontroller.h" +#include "caleneditor.h" +#include "calenserviceprovider.h" + +CalenServiceProvider::CalenServiceProvider(CCalenController *controller, QObject* parent) : + XQServiceProvider(QLatin1String("com.nokia.services.calendar.Launch"), parent) +{ + publishAll(); + mController = controller; + //Q_IMPLEMENT_USER_METATYPE_ENUM(CalenView); +} + +CalenServiceProvider::~CalenServiceProvider() +{ +} + +void CalenServiceProvider::launchCalendarApp(const QDateTime& date, int viewId) +{ + qDebug() << "launchCalendarApp slot getting called -->"; + + // Check the view ID and launch the corresponding view + switch(viewId) { + case 0: + // Launch the month view + mController->handleServiceManagerSlot(ECalenMonthView, date); + break; + case 1: + // Launch the month view + mController->handleServiceManagerSlot(ECalenDayView, date); + break; + default: + // Keep Quiet + break; + } +} + +// End of file --Don't remove this. +