drm_plat/roap_api/inc/RoapTrigger.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ROAP_TRIGGER_H
       
    20 #define ROAP_TRIGGER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 #include <hash.h>
       
    26 #include "RoapMessage.h"
       
    27 #include "RoapEngBase.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 namespace Roap
       
    32 {
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * ROAP Trigger Data.
       
    38 */
       
    39 class CRoapTrigger: public CRoapMessage
       
    40     {
       
    41     public:     // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Two-phased constructor. Leaves on failure.
       
    45         * @return 
       
    46         */      
       
    47         IMPORT_C static CRoapTrigger* NewL();
       
    48 
       
    49         /**
       
    50         * Two-phased constructor. Leaves on failure.
       
    51         * @return
       
    52         */      
       
    53         IMPORT_C static CRoapTrigger* NewL( const TTriggerType& aTriggerType,
       
    54                                             const TDesC8& aRiId,
       
    55                                             const TDesC8& aDomainId,
       
    56                                             const TDesC8& aRoapUrl,
       
    57                                             const RPointerArray<HBufC8>& aRoIdList,
       
    58                                             const RPointerArray<HBufC8>& aContentIdList );
       
    59                                   
       
    60         /**
       
    61         * 
       
    62         * @return
       
    63         */                                   
       
    64         IMPORT_C HBufC8* MessageAsXmlL(void);
       
    65         
       
    66         /**
       
    67         * Destructor.
       
    68         */      
       
    69         IMPORT_C virtual ~CRoapTrigger();
       
    70         
       
    71         /**
       
    72         * Validates Trigger.
       
    73         * Returns ETrue if Trigge is valid 
       
    74         */
       
    75         IMPORT_C TBool ValidTrigger();
       
    76         
       
    77     protected:  // Constructors and destructor
       
    78 
       
    79         /**
       
    80         * Constructor.
       
    81         */      
       
    82         CRoapTrigger();
       
    83         
       
    84         /**
       
    85         * Second phase constructor. Leaves on failure.
       
    86         */      
       
    87         void ConstructL();
       
    88         
       
    89         /**
       
    90         * Second phase constructor. Leaves on failure.
       
    91         */              
       
    92         void ConstructL( const TTriggerType& aTriggerType,
       
    93                          const TDesC8& aRiId,
       
    94                          const TDesC8& aDomainId,
       
    95                          const TDesC8& aRoapUrl,
       
    96                          const RPointerArray<HBufC8>& aRoIdList,
       
    97                          const RPointerArray<HBufC8>& aContentIdList );
       
    98 
       
    99     public:    // data
       
   100         TBuf8<SHA1_HASH> iRiId;
       
   101         HBufC8* iId;
       
   102         HBufC8* iDomainId;
       
   103         RPointerArray<HBufC8> iRoIdList;
       
   104         RPointerArray<HBufC8> iContentIdList;
       
   105         TTriggerType iTriggerType;
       
   106         HBufC8* iRoapUrl;
       
   107         HBufC8* iSignature;
       
   108         HBufC8* iEncKey;
       
   109         HBufC8* iNonce;
       
   110         HBufC8* iDigestValue;
       
   111         HBufC8* iRiAlias;
       
   112         HBufC8* iDomainAlias;
       
   113     };
       
   114 }
       
   115 
       
   116 #endif