24
|
1 |
// Copyright (c) 1997-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 "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// Implements the inline methods for CSmsProtocol and CSmsProvider.
|
|
15 |
// Includes
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
/**
|
|
20 |
@file
|
|
21 |
@internalAll
|
|
22 |
*/
|
|
23 |
|
|
24 |
#include "smsustrm.h"
|
|
25 |
|
|
26 |
//
|
|
27 |
// CSmsProtocol inline definitions
|
|
28 |
//
|
|
29 |
|
|
30 |
inline TBool CSmsProtocol::ObserverIsPresent(const MSmsMessageObserver& aObserver) const
|
|
31 |
{
|
|
32 |
return ObserverIndex(aObserver)!=iSmsMessageObserverList.Count();
|
|
33 |
}
|
|
34 |
|
|
35 |
inline TBool CSmsProtocol::ClosingDown() const
|
|
36 |
{
|
|
37 |
return iFlags&ESmsProtocolClosingDown;
|
|
38 |
}
|
|
39 |
|
|
40 |
inline void CSmsProtocol::SetClosingDown(TBool aClosingDown)
|
|
41 |
{
|
|
42 |
iFlags=aClosingDown? iFlags|ESmsProtocolClosingDown: iFlags&(~ESmsProtocolClosingDown);
|
|
43 |
}
|
|
44 |
|
|
45 |
inline RFs& CSmsProtocol::FileSession()
|
|
46 |
{
|
|
47 |
return iFs;
|
|
48 |
}
|
|
49 |
|
|
50 |
|
|
51 |
//
|
|
52 |
// CSmsProvider inline definitions
|
|
53 |
//
|
|
54 |
|
|
55 |
inline TBool CSmsProvider::ObserverAddedToProtocol() const
|
|
56 |
{
|
|
57 |
return iFlags&ESmsProviderObserverAddedToProtocol;
|
|
58 |
}
|
|
59 |
|
|
60 |
inline void CSmsProvider::SetObserverAddedToProtocol(TBool aAdded)
|
|
61 |
{
|
|
62 |
iFlags=aAdded? iFlags|ESmsProviderObserverAddedToProtocol: iFlags&(~ESmsProviderObserverAddedToProtocol);
|
|
63 |
}
|
|
64 |
|
|
65 |
inline TBool CSmsProvider::IoctlOutstanding() const
|
|
66 |
{
|
|
67 |
return iFlags&ESmsProviderIoctlOutstanding;
|
|
68 |
}
|
|
69 |
|
|
70 |
inline void CSmsProvider::SetIoctlOutstanding(TBool aOutstanding)
|
|
71 |
{
|
|
72 |
iFlags=aOutstanding? iFlags|ESmsProviderIoctlOutstanding: iFlags&(~ESmsProviderIoctlOutstanding);
|
|
73 |
}
|
|
74 |
|
|
75 |
inline TInt CSmsProvider::NumSegments(TInt aSize)
|
|
76 |
{
|
|
77 |
return (aSize+(KSmsMaxSegmentLength-1))/KSmsMaxSegmentLength;
|
|
78 |
}
|