smsprotocols/smsstack/ems/inc/EMSObjectDistributionIE.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2009 Sony Ericsson Mobile Communications AB
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Sony Ericsson Mobile Communications AB - initial contribution.
       
    11 * Nokia Corporation - additional changes.
       
    12 * 
       
    13 * Contributors:
       
    14 * 
       
    15 * Description:
       
    16 * Implements the Enhanced SMS Object Distribution Information Element.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  *  @file
       
    23  *  @internalComponent
       
    24  *  Defines  CEmsObjectDistributionIE  class
       
    25  */
       
    26 
       
    27 #ifndef __EMSObjectDistributionIE_H__
       
    28 #define __EMSObjectDistributionIE_H__
       
    29 
       
    30 #include <emspictureie.h>
       
    31 #include <gsmuelem.h>
       
    32 
       
    33 
       
    34 class CEmsObjectDistribution : public CEmsInformationElement
       
    35 /**
       
    36  *  CEmsObjectDistribution wraps the creation & modification of the object distribution
       
    37  *  information element into a single class.
       
    38  *  
       
    39  *  Format of Extended Object.
       
    40  *  ----------------------------
       
    41  *  
       
    42  *  Position (Octet)		Bit		Description
       
    43  *  1							Number of information Elements
       
    44  *  2							Distribution Attr
       
    45  *  2					0		NoForwarding Attr (1=NoForward)
       
    46  *  2					1..7	Reserved
       
    47  *  
       
    48  *  @see 3gpp Spec V5 section 9.2.3.24.10.1.14
       
    49  *  @internalComponent
       
    50  */
       
    51 	{
       
    52 public:
       
    53 	enum {EIESize=2};
       
    54 	enum TAttrs {EForward=0x0, ENoForward=0x01};
       
    55 
       
    56 public:
       
    57 	IMPORT_C static CEmsObjectDistribution* NewL(TUint aObjectCount=1, TAttrs aAttr = EForward);
       
    58 	IMPORT_C CEmsInformationElement* DuplicateL() const;
       
    59 	IMPORT_C void CopyL(const CEmsObjectDistribution& aSrc);
       
    60 	IMPORT_C TUint ObjectCount() const;
       
    61 	IMPORT_C void SetObjectCount(TUint aObjectCount);
       
    62 	IMPORT_C TAttrs Forwarding() const;
       
    63 	IMPORT_C void SetForwarding(TAttrs aAttr);
       
    64 
       
    65 private:
       
    66 	virtual void EncodeBodyL(TPtr8 aPtr, TBool aIsForSerialisation) const;
       
    67 	virtual void DecodeBodyL(const TPtrC8 aPtr, TBool aIsFromSerialisation);
       
    68 	CEmsObjectDistribution(TUint aObjectCount = 0, TAttrs aAttr = EForward);
       
    69 
       
    70 private:
       
    71 	TUint iObjectCount;
       
    72 	TAttrs iAttr;
       
    73 	};
       
    74 
       
    75 #endif // __EMSObjectDistributionIE_H__