epoc32/include/smsclnt.inl
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 smsclnt.inl
     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 #include <msvuids.h>
       
    17 #include <smcmmain.h>
       
    18 
       
    19 /** 
       
    20 Gets the message header for a message context.
       
    21 
       
    22 The current context must be set to a message entry with type KUidMsvMessageEntryValue.
       
    23 If the current context is not set, or is set to an entry not of type
       
    24 KUidMsvMessageEntryValuethen a panic will occur.
       
    25 
       
    26 The message header object is the SMS MTM encapsulation of an SMS message. The
       
    27 contents of the message header has been extracted from the current context.
       
    28 
       
    29 @return
       
    30 The (non-const) message header object.
       
    31 
       
    32 @panic	SMCM	1
       
    33 The current context has not been set (debug only).
       
    34 
       
    35 @panic	SMCM	2
       
    36 The current context was not of type KUidMsvMessageEntry (debug only).
       
    37 
       
    38 @see	CSmsHeader
       
    39 */
       
    40 inline CSmsHeader& CSmsClientMtm::SmsHeader()
       
    41 	{
       
    42 	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
       
    43 	__ASSERT_DEBUG(iMsvEntry->Entry().iType==KUidMsvMessageEntry, Panic(ESmscWrongContextType));
       
    44 	return *iSmsHeader;
       
    45 	}
       
    46 
       
    47 /** 
       
    48 Gets the (const) message header for a message context.
       
    49 
       
    50 The current context must be set to a message entry with type KUidMsvMessageEntryValue.
       
    51 If the current context is not set, or is set to an entry not of type
       
    52 KUidMsvMessageEntryValuethen a panic will occur.
       
    53 
       
    54 The message header object is the SMS MTM encapsulation of an SMS message. The
       
    55 contents of the message header has been extracted from the current context.
       
    56 
       
    57 @return
       
    58 The (const) message header object.
       
    59 
       
    60 @panic	SMCM	1
       
    61 The current context has not been set (debug only).
       
    62 
       
    63 @panic	SMCM	2
       
    64 The current context was not of type KUidMsvMessageEntry (debug only).
       
    65 
       
    66 @see	CSmsHeader
       
    67 */
       
    68 inline const CSmsHeader& CSmsClientMtm::SmsHeader() const
       
    69 	{
       
    70 	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
       
    71 	__ASSERT_DEBUG(iMsvEntry->Entry().iType==KUidMsvMessageEntry, Panic(ESmscWrongContextType));
       
    72 	return *iSmsHeader;
       
    73 	}
       
    74 
       
    75 /** 
       
    76 Gets the current SMS service settings.
       
    77 
       
    78 The current context must be set. If the current context is not set then a panic
       
    79 will occur.
       
    80 
       
    81 The SMS service settings must have been set or a panic will occur. The 
       
    82 CSmsClientMtm::RestoreServiceAndSettingsL API can restore the SMS service 
       
    83 settings. This also sets the SMS service ID.
       
    84 
       
    85 @return
       
    86 The current (non-const) SMS service settings.
       
    87 
       
    88 @panic	SMCM	1
       
    89 The current context has not been set (debug only).
       
    90 
       
    91 @panic	SMCM	11
       
    92 The SMS Service settings have not been set (debug only).
       
    93 
       
    94 @see	CSmsClientMtm::RestoreServiceAndSettingsL
       
    95 */
       
    96 inline CSmsSettings& CSmsClientMtm::ServiceSettings()
       
    97 	{
       
    98 	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
       
    99 	__ASSERT_DEBUG(iServiceSettings, Panic(ESmscSettingsNotSet));
       
   100 	return *iServiceSettings;
       
   101 	}
       
   102 
       
   103 /**
       
   104 Gets the current (const) SMS service settings.
       
   105 
       
   106 The current context must be set. If the current context is not set then a panic
       
   107 will occur.
       
   108 
       
   109 The SMS service settings must have been set or a panic will occur. The 
       
   110 CSmsClientMtm::RestoreServiceAndSettingsL API can restore the SMS service 
       
   111 settings. This also sets the SMS service ID.
       
   112 
       
   113 @return
       
   114 The current (const) SMS service settings.
       
   115 
       
   116 @panic	SMCM	1
       
   117 The current context has not been set (debug only).
       
   118 
       
   119 @panic	SMCM	11
       
   120 The SMS Service settings have not been set (debug only).
       
   121 
       
   122 @see	CSmsClientMtm::RestoreServiceAndSettingsL
       
   123 */
       
   124 inline const CSmsSettings& CSmsClientMtm::ServiceSettings() const
       
   125 	{	
       
   126 	__ASSERT_DEBUG(iMsvEntry, Panic(ESmscEntryNotSet));
       
   127 	__ASSERT_DEBUG(iServiceSettings, Panic(ESmscSettingsNotSet));
       
   128 	return *iServiceSettings;
       
   129 	}
       
   130 
       
   131 /**
       
   132 Gets the ID of the current SMS service.
       
   133 
       
   134 If there is no current SMS service, the ID will be a value of 0. The 
       
   135 CSmsClientMtm::RestoreServiceAndSettingsL API can set the SMS service IS. This 
       
   136 also restores the SMS service settings.
       
   137 
       
   138 @return
       
   139 The ID for the current SMS service
       
   140 
       
   141 @see	CSmsClientMtm::RestoreServiceAndSettingsL
       
   142 */
       
   143 inline TInt CSmsClientMtm::ServiceId() const
       
   144 	{
       
   145 	return iServiceId;
       
   146 	}