epoc32/include/asclisession.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // 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
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __ASCLISESSION_H__
    17 #define __ASCLISESSION_H__
    18 
    19 // System includes
    20 #include <e32base.h>
    21 
    22 // User includes
    23 #include <asshddefs.h>
    24 
    25 // Classes referenced
    26 class TASShdAlarm;
    27 class TASCliSoundPlayDefinition;
    28 
    29 
    30 class RASCliSession : public RSessionBase
    31 /** The client-side interface to the Symbian OS alarm server. 
    32 @publishedAll
    33 @released
    34 */
    35 	{
    36 ///////////////////////////////////////////////////////////////////////////////////////
    37 public:										// CONNECT TO SERVER & VERSIONING
    38 ///////////////////////////////////////////////////////////////////////////////////////
    39 
    40 	IMPORT_C RASCliSession();
    41 
    42 	IMPORT_C TInt							Connect();
    43 
    44 	IMPORT_C TVersion						Version() const;
    45 
    46 ///////////////////////////////////////////////////////////////////////////////////////
    47 public:										// ALARM SPECIFIC FUNCTIONALITY
    48 ///////////////////////////////////////////////////////////////////////////////////////
    49 
    50 	IMPORT_C TInt							AlarmAdd(TASShdAlarm& aAlarm) const;
    51 
    52 	IMPORT_C TInt							AlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const;
    53 
    54 	IMPORT_C void							AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm);
    55 
    56 	IMPORT_C void							AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData);
    57 
    58 	IMPORT_C void							AlarmNotificationCancelAndDequeue(TAlarmId aAlarmId) const;
    59 
    60 	IMPORT_C TInt							GetAlarmDetails(TAlarmId aAlarmId, TASShdAlarm& aAlarm) const;
    61 	
    62 	IMPORT_C TInt							AlarmDelete(TAlarmId aAlarmId) const;
    63 
    64 	IMPORT_C TInt							GetAlarmCategory(TAlarmId aAlarmId, TAlarmCategory& aCategory) const;
    65 
    66 	IMPORT_C TInt							GetAlarmOwner(TAlarmId aAlarmId, TFullName& aThreadName) const;
    67 
    68 	IMPORT_C TInt							SetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus aStatus) const;
    69 
    70 	IMPORT_C TInt							GetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus& aStatus) const;
    71 
    72 	IMPORT_C TInt							SetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed aDayOrTimed) const;
    73 
    74 	IMPORT_C TInt							GetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed& aDayOrTimed) const;
    75 
    76 	IMPORT_C TInt							SetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags aCharacteristics) const;
    77 
    78 	IMPORT_C TInt							GetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags& aCharacteristics) const;
    79 
    80 	IMPORT_C TInt							SetClientData(const TASShdAlarm& aAlarm);
    81 
    82 	IMPORT_C TInt							SetAlarmDays(TAlarmId aAlarmId, TUint8 aAlarmDays) const;
    83     IMPORT_C TInt							GetAlarmDays(TAlarmId aAlarmId, TUint8& aAlarmDays) const;
    84     IMPORT_C TInt							SetContinuous(TAlarmId aAlarmId, TBool aContinuous) const;
    85     IMPORT_C TInt							GetContinuous(TAlarmId aAlarmId, TBool& aContinuous) const;
    86 	
    87 ///////////////////////////////////////////////////////////////////////////////////////
    88 public:										// ALARM DATA FUNCTIONALITY
    89 ///////////////////////////////////////////////////////////////////////////////////////
    90 
    91 	IMPORT_C TInt							AlarmDataAttachL(TAlarmId aAlarmId, const TDesC8& aData) const;
    92 
    93 	IMPORT_C TInt							AlarmDataDetach(TAlarmId aAlarmId) const;
    94 
    95 	inline	 TInt							AlarmDataDetatch(TAlarmId aAlarmId) const;
    96 
    97 	IMPORT_C TInt							AlarmDataSize(TAlarmId aAlarmId) const;
    98 
    99 	IMPORT_C TInt							GetAlarmData(TAlarmId aAlarmId, TDes8& aSink) const;
   100 
   101 	IMPORT_C TInt							GetAlarmData(TAlarmId aAlarmId, HBufC8*& aSink) const;
   102 
   103 ///////////////////////////////////////////////////////////////////////////////////////
   104 public:										// CATEGORY-SPECIFIC FUNCTIONALITY
   105 ///////////////////////////////////////////////////////////////////////////////////////
   106 
   107 	IMPORT_C TInt							SetAlarmStatusByCategory(TAlarmCategory aCategory, TAlarmStatus aStatus) const;
   108 
   109 	IMPORT_C TInt							GetAlarmCountForCategory(TAlarmCategory aCategory) const;
   110 
   111 	IMPORT_C TInt							AlarmDeleteAllByCategory(TAlarmCategory aCategory, TBool aDeleteOnlyOrphanedAlarmsInCategory) const;
   112 
   113 	IMPORT_C TInt							AlarmDeleteByCategory(TAlarmCategory aCategory, TDeleteType aWhatToDelete) const;
   114 
   115 	IMPORT_C void							GetAvailableCategoryListL(RArray<TAlarmCategory>& aCategories) const;
   116 
   117 	IMPORT_C void							GetAlarmIdListForCategoryL(TAlarmCategory aCategory, RArray<TAlarmId>& aAlarmIds) const;
   118 
   119 ///////////////////////////////////////////////////////////////////////////////////////
   120 public:										// MISC FUNCTIONALITY
   121 ///////////////////////////////////////////////////////////////////////////////////////
   122 
   123 	IMPORT_C TInt							AlarmCountByState(TAlarmState aState) const;
   124 
   125 	IMPORT_C void							GetAlarmIdListByStateL(TAlarmState aState, RArray<TAlarmId>& aAlarmIds) const;
   126 
   127 	IMPORT_C void							GetAlarmIdListL(RArray<TAlarmId>& aAlarmIds) const;
   128 
   129 	IMPORT_C TInt							GetNextDueAlarmId(TAlarmId& aAlarmId) const;
   130 
   131 	IMPORT_C TInt							NumberOfAlarmsActiveInQueue() const;
   132 
   133 ///////////////////////////////////////////////////////////////////////////////////////
   134 public:										// SOUND CONTROL
   135 ///////////////////////////////////////////////////////////////////////////////////////
   136 
   137 	IMPORT_C TInt							SetAlarmSoundState(TAlarmGlobalSoundState aState) const;
   138 
   139 	IMPORT_C TInt							GetAlarmSoundState(TAlarmGlobalSoundState& aState) const;
   140 
   141 	IMPORT_C TInt							SetAlarmSoundsSilentUntil(const TTime& aLocalTime) const;
   142 
   143 	IMPORT_C TInt							SetAlarmSoundsSilentFor(TTimeIntervalMinutes aTimeToRemainSilentFor) const;
   144 
   145 	IMPORT_C TInt							GetAlarmSoundsSilentUntil(TTime& aLocalTime) const;
   146 
   147 	IMPORT_C TInt							CancelAlarmSilence() const;
   148 
   149 	IMPORT_C TBool							AlarmSoundsTemporarilySilenced() const;
   150 
   151 	IMPORT_C void							SetAlarmPlayIntervalsL(const CArrayFix<TASCliSoundPlayDefinition>& aIntervals) const;
   152 
   153 	IMPORT_C void							GetAlarmPlayIntervalsL(CArrayFix<TASCliSoundPlayDefinition>& aIntervals) const;
   154 
   155 ///////////////////////////////////////////////////////////////////////////////////////
   156 public:										// CHANGE NOTIFICATION
   157 ///////////////////////////////////////////////////////////////////////////////////////
   158 
   159 	IMPORT_C void							NotifyChange(TRequestStatus& aStatus, TAlarmId& aAlarmId);
   160 
   161 	IMPORT_C void							NotifyChangeCancel() const;
   162 
   163 ///////////////////////////////////////////////////////////////////////////////////////
   164 public:										// DEBUG ONLY
   165 ///////////////////////////////////////////////////////////////////////////////////////
   166 
   167 	IMPORT_C void							__DbgShutDownServer() const;
   168 
   169 	IMPORT_C void							__DbgFailAlloc(TInt aCount) const;
   170 
   171 	IMPORT_C void							__DbgPreventUserNotify(TBool aShouldStop) const;
   172 
   173 	IMPORT_C TInt							__DbgSnoozeAlarm(TAlarmId aAlarmId, const TTime& aNewTime) const;
   174 	
   175 	IMPORT_C TInt 							__DbgSetEnvChgHandling(TBool aFlag) const;
   176 ///////////////////////////////////////////////////////////////////////////////////////
   177 private:									// MEMBER DATA
   178 ///////////////////////////////////////////////////////////////////////////////////////
   179 
   180 	void									FetchAlarmIdsFromBufferL(RArray<TAlarmId>& aAlarmIds, TInt aBufferSize) const;
   181 
   182 	CBufBase*								FetchTransferBufferLC(TInt aBufferSize) const;
   183 
   184 	void									DoAlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData);
   185 	TInt									DoAlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const;
   186 
   187 ///////////////////////////////////////////////////////////////////////////////////////
   188 private:									// MEMBER DATA
   189 ///////////////////////////////////////////////////////////////////////////////////////
   190 
   191 	TPtr8									iPackage;
   192 	TPtr8									iAlarmIdPointer;
   193 	};
   194 
   195 ///////////////////////////////////////////////////////////////////////////////////////
   196 // ----> RASCliSession (inlines)
   197 ///////////////////////////////////////////////////////////////////////////////////////
   198 inline TInt RASCliSession::AlarmDataDetatch(TAlarmId aAlarmId) const
   199 /** @deprecated 8.0
   200 
   201 RASCliSession::AlarmDataDetach() should be used instead */
   202 	{
   203 	return AlarmDataDetach(aAlarmId);
   204 	};
   205 
   206 #endif