1.1 --- a/epoc32/include/asclisession.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/asclisession.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,206 @@
1.4 -asclisession.h
1.5 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __ASCLISESSION_H__
1.21 +#define __ASCLISESSION_H__
1.22 +
1.23 +// System includes
1.24 +#include <e32base.h>
1.25 +
1.26 +// User includes
1.27 +#include <asshddefs.h>
1.28 +
1.29 +// Classes referenced
1.30 +class TASShdAlarm;
1.31 +class TASCliSoundPlayDefinition;
1.32 +
1.33 +
1.34 +class RASCliSession : public RSessionBase
1.35 +/** The client-side interface to the Symbian OS alarm server.
1.36 +@publishedAll
1.37 +@released
1.38 +*/
1.39 + {
1.40 +///////////////////////////////////////////////////////////////////////////////////////
1.41 +public: // CONNECT TO SERVER & VERSIONING
1.42 +///////////////////////////////////////////////////////////////////////////////////////
1.43 +
1.44 + IMPORT_C RASCliSession();
1.45 +
1.46 + IMPORT_C TInt Connect();
1.47 +
1.48 + IMPORT_C TVersion Version() const;
1.49 +
1.50 +///////////////////////////////////////////////////////////////////////////////////////
1.51 +public: // ALARM SPECIFIC FUNCTIONALITY
1.52 +///////////////////////////////////////////////////////////////////////////////////////
1.53 +
1.54 + IMPORT_C TInt AlarmAdd(TASShdAlarm& aAlarm) const;
1.55 +
1.56 + IMPORT_C TInt AlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const;
1.57 +
1.58 + IMPORT_C void AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm);
1.59 +
1.60 + IMPORT_C void AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData);
1.61 +
1.62 + IMPORT_C void AlarmNotificationCancelAndDequeue(TAlarmId aAlarmId) const;
1.63 +
1.64 + IMPORT_C TInt GetAlarmDetails(TAlarmId aAlarmId, TASShdAlarm& aAlarm) const;
1.65 +
1.66 + IMPORT_C TInt AlarmDelete(TAlarmId aAlarmId) const;
1.67 +
1.68 + IMPORT_C TInt GetAlarmCategory(TAlarmId aAlarmId, TAlarmCategory& aCategory) const;
1.69 +
1.70 + IMPORT_C TInt GetAlarmOwner(TAlarmId aAlarmId, TFullName& aThreadName) const;
1.71 +
1.72 + IMPORT_C TInt SetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus aStatus) const;
1.73 +
1.74 + IMPORT_C TInt GetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus& aStatus) const;
1.75 +
1.76 + IMPORT_C TInt SetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed aDayOrTimed) const;
1.77 +
1.78 + IMPORT_C TInt GetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed& aDayOrTimed) const;
1.79 +
1.80 + IMPORT_C TInt SetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags aCharacteristics) const;
1.81 +
1.82 + IMPORT_C TInt GetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags& aCharacteristics) const;
1.83 +
1.84 + IMPORT_C TInt SetClientData(const TASShdAlarm& aAlarm);
1.85 +
1.86 + IMPORT_C TInt SetAlarmDays(TAlarmId aAlarmId, TUint8 aAlarmDays) const;
1.87 + IMPORT_C TInt GetAlarmDays(TAlarmId aAlarmId, TUint8& aAlarmDays) const;
1.88 + IMPORT_C TInt SetContinuous(TAlarmId aAlarmId, TBool aContinuous) const;
1.89 + IMPORT_C TInt GetContinuous(TAlarmId aAlarmId, TBool& aContinuous) const;
1.90 +
1.91 +///////////////////////////////////////////////////////////////////////////////////////
1.92 +public: // ALARM DATA FUNCTIONALITY
1.93 +///////////////////////////////////////////////////////////////////////////////////////
1.94 +
1.95 + IMPORT_C TInt AlarmDataAttachL(TAlarmId aAlarmId, const TDesC8& aData) const;
1.96 +
1.97 + IMPORT_C TInt AlarmDataDetach(TAlarmId aAlarmId) const;
1.98 +
1.99 + inline TInt AlarmDataDetatch(TAlarmId aAlarmId) const;
1.100 +
1.101 + IMPORT_C TInt AlarmDataSize(TAlarmId aAlarmId) const;
1.102 +
1.103 + IMPORT_C TInt GetAlarmData(TAlarmId aAlarmId, TDes8& aSink) const;
1.104 +
1.105 + IMPORT_C TInt GetAlarmData(TAlarmId aAlarmId, HBufC8*& aSink) const;
1.106 +
1.107 +///////////////////////////////////////////////////////////////////////////////////////
1.108 +public: // CATEGORY-SPECIFIC FUNCTIONALITY
1.109 +///////////////////////////////////////////////////////////////////////////////////////
1.110 +
1.111 + IMPORT_C TInt SetAlarmStatusByCategory(TAlarmCategory aCategory, TAlarmStatus aStatus) const;
1.112 +
1.113 + IMPORT_C TInt GetAlarmCountForCategory(TAlarmCategory aCategory) const;
1.114 +
1.115 + IMPORT_C TInt AlarmDeleteAllByCategory(TAlarmCategory aCategory, TBool aDeleteOnlyOrphanedAlarmsInCategory) const;
1.116 +
1.117 + IMPORT_C TInt AlarmDeleteByCategory(TAlarmCategory aCategory, TDeleteType aWhatToDelete) const;
1.118 +
1.119 + IMPORT_C void GetAvailableCategoryListL(RArray<TAlarmCategory>& aCategories) const;
1.120 +
1.121 + IMPORT_C void GetAlarmIdListForCategoryL(TAlarmCategory aCategory, RArray<TAlarmId>& aAlarmIds) const;
1.122 +
1.123 +///////////////////////////////////////////////////////////////////////////////////////
1.124 +public: // MISC FUNCTIONALITY
1.125 +///////////////////////////////////////////////////////////////////////////////////////
1.126 +
1.127 + IMPORT_C TInt AlarmCountByState(TAlarmState aState) const;
1.128 +
1.129 + IMPORT_C void GetAlarmIdListByStateL(TAlarmState aState, RArray<TAlarmId>& aAlarmIds) const;
1.130 +
1.131 + IMPORT_C void GetAlarmIdListL(RArray<TAlarmId>& aAlarmIds) const;
1.132 +
1.133 + IMPORT_C TInt GetNextDueAlarmId(TAlarmId& aAlarmId) const;
1.134 +
1.135 + IMPORT_C TInt NumberOfAlarmsActiveInQueue() const;
1.136 +
1.137 +///////////////////////////////////////////////////////////////////////////////////////
1.138 +public: // SOUND CONTROL
1.139 +///////////////////////////////////////////////////////////////////////////////////////
1.140 +
1.141 + IMPORT_C TInt SetAlarmSoundState(TAlarmGlobalSoundState aState) const;
1.142 +
1.143 + IMPORT_C TInt GetAlarmSoundState(TAlarmGlobalSoundState& aState) const;
1.144 +
1.145 + IMPORT_C TInt SetAlarmSoundsSilentUntil(const TTime& aLocalTime) const;
1.146 +
1.147 + IMPORT_C TInt SetAlarmSoundsSilentFor(TTimeIntervalMinutes aTimeToRemainSilentFor) const;
1.148 +
1.149 + IMPORT_C TInt GetAlarmSoundsSilentUntil(TTime& aLocalTime) const;
1.150 +
1.151 + IMPORT_C TInt CancelAlarmSilence() const;
1.152 +
1.153 + IMPORT_C TBool AlarmSoundsTemporarilySilenced() const;
1.154 +
1.155 + IMPORT_C void SetAlarmPlayIntervalsL(const CArrayFix<TASCliSoundPlayDefinition>& aIntervals) const;
1.156 +
1.157 + IMPORT_C void GetAlarmPlayIntervalsL(CArrayFix<TASCliSoundPlayDefinition>& aIntervals) const;
1.158 +
1.159 +///////////////////////////////////////////////////////////////////////////////////////
1.160 +public: // CHANGE NOTIFICATION
1.161 +///////////////////////////////////////////////////////////////////////////////////////
1.162 +
1.163 + IMPORT_C void NotifyChange(TRequestStatus& aStatus, TAlarmId& aAlarmId);
1.164 +
1.165 + IMPORT_C void NotifyChangeCancel() const;
1.166 +
1.167 +///////////////////////////////////////////////////////////////////////////////////////
1.168 +public: // DEBUG ONLY
1.169 +///////////////////////////////////////////////////////////////////////////////////////
1.170 +
1.171 + IMPORT_C void __DbgShutDownServer() const;
1.172 +
1.173 + IMPORT_C void __DbgFailAlloc(TInt aCount) const;
1.174 +
1.175 + IMPORT_C void __DbgPreventUserNotify(TBool aShouldStop) const;
1.176 +
1.177 + IMPORT_C TInt __DbgSnoozeAlarm(TAlarmId aAlarmId, const TTime& aNewTime) const;
1.178 +
1.179 + IMPORT_C TInt __DbgSetEnvChgHandling(TBool aFlag) const;
1.180 +///////////////////////////////////////////////////////////////////////////////////////
1.181 +private: // MEMBER DATA
1.182 +///////////////////////////////////////////////////////////////////////////////////////
1.183 +
1.184 + void FetchAlarmIdsFromBufferL(RArray<TAlarmId>& aAlarmIds, TInt aBufferSize) const;
1.185 +
1.186 + CBufBase* FetchTransferBufferLC(TInt aBufferSize) const;
1.187 +
1.188 + void DoAlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData);
1.189 + TInt DoAlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const;
1.190 +
1.191 +///////////////////////////////////////////////////////////////////////////////////////
1.192 +private: // MEMBER DATA
1.193 +///////////////////////////////////////////////////////////////////////////////////////
1.194 +
1.195 + TPtr8 iPackage;
1.196 + TPtr8 iAlarmIdPointer;
1.197 + };
1.198 +
1.199 +///////////////////////////////////////////////////////////////////////////////////////
1.200 +// ----> RASCliSession (inlines)
1.201 +///////////////////////////////////////////////////////////////////////////////////////
1.202 +inline TInt RASCliSession::AlarmDataDetatch(TAlarmId aAlarmId) const
1.203 +/** @deprecated 8.0
1.204 +
1.205 +RASCliSession::AlarmDataDetach() should be used instead */
1.206 + {
1.207 + return AlarmDataDetach(aAlarmId);
1.208 + };
1.209 +
1.210 +#endif