epoc32/include/smsclnt.inl
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/smsclnt.inl	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/smsclnt.inl	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,146 @@
     1.4 -smsclnt.inl
     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 +#include <msvuids.h>
    1.21 +#include <smcmmain.h>
    1.22 +
    1.23 +/** 
    1.24 +Gets the message header for a message context.
    1.25 +
    1.26 +The current context must be set to a message entry with type KUidMsvMessageEntryValue.
    1.27 +If the current context is not set, or is set to an entry not of type
    1.28 +KUidMsvMessageEntryValuethen a panic will occur.
    1.29 +
    1.30 +The message header object is the SMS MTM encapsulation of an SMS message. The
    1.31 +contents of the message header has been extracted from the current context.
    1.32 +
    1.33 +@return
    1.34 +The (non-const) message header object.
    1.35 +
    1.36 +@panic	SMCM	1
    1.37 +The current context has not been set (debug only).
    1.38 +
    1.39 +@panic	SMCM	2
    1.40 +The current context was not of type KUidMsvMessageEntry (debug only).
    1.41 +
    1.42 +@see	CSmsHeader
    1.43 +*/
    1.44 +inline CSmsHeader& CSmsClientMtm::SmsHeader()
    1.45 +	{
    1.46 +	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
    1.47 +	__ASSERT_DEBUG(iMsvEntry->Entry().iType==KUidMsvMessageEntry, Panic(ESmscWrongContextType));
    1.48 +	return *iSmsHeader;
    1.49 +	}
    1.50 +
    1.51 +/** 
    1.52 +Gets the (const) message header for a message context.
    1.53 +
    1.54 +The current context must be set to a message entry with type KUidMsvMessageEntryValue.
    1.55 +If the current context is not set, or is set to an entry not of type
    1.56 +KUidMsvMessageEntryValuethen a panic will occur.
    1.57 +
    1.58 +The message header object is the SMS MTM encapsulation of an SMS message. The
    1.59 +contents of the message header has been extracted from the current context.
    1.60 +
    1.61 +@return
    1.62 +The (const) message header object.
    1.63 +
    1.64 +@panic	SMCM	1
    1.65 +The current context has not been set (debug only).
    1.66 +
    1.67 +@panic	SMCM	2
    1.68 +The current context was not of type KUidMsvMessageEntry (debug only).
    1.69 +
    1.70 +@see	CSmsHeader
    1.71 +*/
    1.72 +inline const CSmsHeader& CSmsClientMtm::SmsHeader() const
    1.73 +	{
    1.74 +	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
    1.75 +	__ASSERT_DEBUG(iMsvEntry->Entry().iType==KUidMsvMessageEntry, Panic(ESmscWrongContextType));
    1.76 +	return *iSmsHeader;
    1.77 +	}
    1.78 +
    1.79 +/** 
    1.80 +Gets the current SMS service settings.
    1.81 +
    1.82 +The current context must be set. If the current context is not set then a panic
    1.83 +will occur.
    1.84 +
    1.85 +The SMS service settings must have been set or a panic will occur. The 
    1.86 +CSmsClientMtm::RestoreServiceAndSettingsL API can restore the SMS service 
    1.87 +settings. This also sets the SMS service ID.
    1.88 +
    1.89 +@return
    1.90 +The current (non-const) SMS service settings.
    1.91 +
    1.92 +@panic	SMCM	1
    1.93 +The current context has not been set (debug only).
    1.94 +
    1.95 +@panic	SMCM	11
    1.96 +The SMS Service settings have not been set (debug only).
    1.97 +
    1.98 +@see	CSmsClientMtm::RestoreServiceAndSettingsL
    1.99 +*/
   1.100 +inline CSmsSettings& CSmsClientMtm::ServiceSettings()
   1.101 +	{
   1.102 +	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
   1.103 +	__ASSERT_DEBUG(iServiceSettings, Panic(ESmscSettingsNotSet));
   1.104 +	return *iServiceSettings;
   1.105 +	}
   1.106 +
   1.107 +/**
   1.108 +Gets the current (const) SMS service settings.
   1.109 +
   1.110 +The current context must be set. If the current context is not set then a panic
   1.111 +will occur.
   1.112 +
   1.113 +The SMS service settings must have been set or a panic will occur. The 
   1.114 +CSmsClientMtm::RestoreServiceAndSettingsL API can restore the SMS service 
   1.115 +settings. This also sets the SMS service ID.
   1.116 +
   1.117 +@return
   1.118 +The current (const) SMS service settings.
   1.119 +
   1.120 +@panic	SMCM	1
   1.121 +The current context has not been set (debug only).
   1.122 +
   1.123 +@panic	SMCM	11
   1.124 +The SMS Service settings have not been set (debug only).
   1.125 +
   1.126 +@see	CSmsClientMtm::RestoreServiceAndSettingsL
   1.127 +*/
   1.128 +inline const CSmsSettings& CSmsClientMtm::ServiceSettings() const
   1.129 +	{	
   1.130 +	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
   1.131 +	__ASSERT_DEBUG(iServiceSettings, Panic(ESmscSettingsNotSet));
   1.132 +	return *iServiceSettings;
   1.133 +	}
   1.134 +
   1.135 +/**
   1.136 +Gets the ID of the current SMS service.
   1.137 +
   1.138 +If there is no current SMS service, the ID will be a value of 0. The 
   1.139 +CSmsClientMtm::RestoreServiceAndSettingsL API can set the SMS service IS. This 
   1.140 +also restores the SMS service settings.
   1.141 +
   1.142 +@return
   1.143 +The ID for the current SMS service
   1.144 +
   1.145 +@see	CSmsClientMtm::RestoreServiceAndSettingsL
   1.146 +*/
   1.147 +inline TInt CSmsClientMtm::ServiceId() const
   1.148 +	{
   1.149 +	return iServiceId;
   1.150 +	}