epoc32/include/smsclnt.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#include <msvuids.h>
williamr@2
    17
#include <smcmmain.h>
williamr@2
    18
williamr@2
    19
/** 
williamr@2
    20
Gets the message header for a message context.
williamr@2
    21
williamr@2
    22
The current context must be set to a message entry with type KUidMsvMessageEntryValue.
williamr@2
    23
If the current context is not set, or is set to an entry not of type
williamr@2
    24
KUidMsvMessageEntryValuethen a panic will occur.
williamr@2
    25
williamr@2
    26
The message header object is the SMS MTM encapsulation of an SMS message. The
williamr@2
    27
contents of the message header has been extracted from the current context.
williamr@2
    28
williamr@2
    29
@return
williamr@2
    30
The (non-const) message header object.
williamr@2
    31
williamr@2
    32
@panic	SMCM	1
williamr@2
    33
The current context has not been set (debug only).
williamr@2
    34
williamr@2
    35
@panic	SMCM	2
williamr@2
    36
The current context was not of type KUidMsvMessageEntry (debug only).
williamr@2
    37
williamr@2
    38
@see	CSmsHeader
williamr@2
    39
*/
williamr@2
    40
inline CSmsHeader& CSmsClientMtm::SmsHeader()
williamr@2
    41
	{
williamr@2
    42
	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
williamr@2
    43
	__ASSERT_DEBUG(iMsvEntry->Entry().iType==KUidMsvMessageEntry, Panic(ESmscWrongContextType));
williamr@2
    44
	return *iSmsHeader;
williamr@2
    45
	}
williamr@2
    46
williamr@2
    47
/** 
williamr@2
    48
Gets the (const) message header for a message context.
williamr@2
    49
williamr@2
    50
The current context must be set to a message entry with type KUidMsvMessageEntryValue.
williamr@2
    51
If the current context is not set, or is set to an entry not of type
williamr@2
    52
KUidMsvMessageEntryValuethen a panic will occur.
williamr@2
    53
williamr@2
    54
The message header object is the SMS MTM encapsulation of an SMS message. The
williamr@2
    55
contents of the message header has been extracted from the current context.
williamr@2
    56
williamr@2
    57
@return
williamr@2
    58
The (const) message header object.
williamr@2
    59
williamr@2
    60
@panic	SMCM	1
williamr@2
    61
The current context has not been set (debug only).
williamr@2
    62
williamr@2
    63
@panic	SMCM	2
williamr@2
    64
The current context was not of type KUidMsvMessageEntry (debug only).
williamr@2
    65
williamr@2
    66
@see	CSmsHeader
williamr@2
    67
*/
williamr@2
    68
inline const CSmsHeader& CSmsClientMtm::SmsHeader() const
williamr@2
    69
	{
williamr@2
    70
	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
williamr@2
    71
	__ASSERT_DEBUG(iMsvEntry->Entry().iType==KUidMsvMessageEntry, Panic(ESmscWrongContextType));
williamr@2
    72
	return *iSmsHeader;
williamr@2
    73
	}
williamr@2
    74
williamr@2
    75
/** 
williamr@2
    76
Gets the current SMS service settings.
williamr@2
    77
williamr@2
    78
The current context must be set. If the current context is not set then a panic
williamr@2
    79
will occur.
williamr@2
    80
williamr@2
    81
The SMS service settings must have been set or a panic will occur. The 
williamr@2
    82
CSmsClientMtm::RestoreServiceAndSettingsL API can restore the SMS service 
williamr@2
    83
settings. This also sets the SMS service ID.
williamr@2
    84
williamr@2
    85
@return
williamr@2
    86
The current (non-const) SMS service settings.
williamr@2
    87
williamr@2
    88
@panic	SMCM	1
williamr@2
    89
The current context has not been set (debug only).
williamr@2
    90
williamr@2
    91
@panic	SMCM	11
williamr@2
    92
The SMS Service settings have not been set (debug only).
williamr@2
    93
williamr@2
    94
@see	CSmsClientMtm::RestoreServiceAndSettingsL
williamr@2
    95
*/
williamr@2
    96
inline CSmsSettings& CSmsClientMtm::ServiceSettings()
williamr@2
    97
	{
williamr@2
    98
	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
williamr@2
    99
	__ASSERT_DEBUG(iServiceSettings, Panic(ESmscSettingsNotSet));
williamr@2
   100
	return *iServiceSettings;
williamr@2
   101
	}
williamr@2
   102
williamr@2
   103
/**
williamr@2
   104
Gets the current (const) SMS service settings.
williamr@2
   105
williamr@2
   106
The current context must be set. If the current context is not set then a panic
williamr@2
   107
will occur.
williamr@2
   108
williamr@2
   109
The SMS service settings must have been set or a panic will occur. The 
williamr@2
   110
CSmsClientMtm::RestoreServiceAndSettingsL API can restore the SMS service 
williamr@2
   111
settings. This also sets the SMS service ID.
williamr@2
   112
williamr@2
   113
@return
williamr@2
   114
The current (const) SMS service settings.
williamr@2
   115
williamr@2
   116
@panic	SMCM	1
williamr@2
   117
The current context has not been set (debug only).
williamr@2
   118
williamr@2
   119
@panic	SMCM	11
williamr@2
   120
The SMS Service settings have not been set (debug only).
williamr@2
   121
williamr@2
   122
@see	CSmsClientMtm::RestoreServiceAndSettingsL
williamr@2
   123
*/
williamr@2
   124
inline const CSmsSettings& CSmsClientMtm::ServiceSettings() const
williamr@2
   125
	{	
williamr@2
   126
	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
williamr@2
   127
	__ASSERT_DEBUG(iServiceSettings, Panic(ESmscSettingsNotSet));
williamr@2
   128
	return *iServiceSettings;
williamr@2
   129
	}
williamr@2
   130
williamr@2
   131
/**
williamr@2
   132
Gets the ID of the current SMS service.
williamr@2
   133
williamr@2
   134
If there is no current SMS service, the ID will be a value of 0. The 
williamr@2
   135
CSmsClientMtm::RestoreServiceAndSettingsL API can set the SMS service IS. This 
williamr@2
   136
also restores the SMS service settings.
williamr@2
   137
williamr@2
   138
@return
williamr@2
   139
The ID for the current SMS service
williamr@2
   140
williamr@2
   141
@see	CSmsClientMtm::RestoreServiceAndSettingsL
williamr@2
   142
*/
williamr@2
   143
inline TInt CSmsClientMtm::ServiceId() const
williamr@2
   144
	{
williamr@2
   145
	return iServiceId;
williamr@2
   146
	}