syncmlfw/ds/alerthandler/inc/nsmldsalert.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 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:  DS server alert handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __NSMLDSALERT_H
       
    20 #define __NSMLDSALERT_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <nsmlsyncalerthandlerif.h>
       
    24 #include "WBXMLSyncMLParser.h"
       
    25 
       
    26 //used for SA message validation
       
    27 _LIT8( KMdoAgentSupportedVersion, "NokiaInq/*" );
       
    28 
       
    29 const TUint KNSmlDSAlertImplUid = 0x101F99EC; 
       
    30 const TInt KNSmlDSAlertVersionPos = 16;
       
    31 const TInt KNSmlDSAlertVersion = 12;
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  CNSmlDSAlert 
       
    36 *  
       
    37 */
       
    38 class CNSmlDSAlert:public CNSmlSyncAlertHandler, public MWBXMLSyncMLCallbacks
       
    39 	{
       
    40     public:  // Constructors and destructor
       
    41         
       
    42     static CNSmlDSAlert* NewL();
       
    43     ~CNSmlDSAlert();       //from CBase
       
    44 
       
    45     public: // New functions
       
    46         
       
    47 	TNSmlAlertResult StartSyncL( const TDesC8& aSyncMLMessage,
       
    48 			TInt aTransport,
       
    49             TBTDevAddr aBTAddress,
       
    50             const TDesC& aBTName,
       
    51             MNSmlAlertObexPluginContext* aPluginRes );
       
    52 		
       
    53     private: //functions
       
    54 	
       
    55 	CNSmlDSAlert();
       
    56 	CNSmlDSAlert( const CNSmlDSAlert& aOther );
       
    57 	CNSmlDSAlert& operator=( const CNSmlDSAlert& aOther );
       
    58 
       
    59 	void ParseMessageL( const TDesC8& aSyncMLMessage );
       
    60 	TBool Is12Package( const TDesC8& aTriggerMessage ) const;
       
    61 	
       
    62 	void PCDATAToUnicodeLC( const SmlPcdata_t& aPcdata, HBufC*& aUnicodeData ) const;
       
    63 	void TrimRightSpaceAndNull (TDes8& aDes ) const;
       
    64 	
       
    65 	// Functions from MWBXMLSyncMLCallbacks  
       
    66 
       
    67 	Ret_t smlAlertCmdFuncL( SmlAlertPtr_t aContent);          
       
    68 	Ret_t smlGetCmdFuncL( SmlGetPtr_t aContent );                      
       
    69 	Ret_t smlPutCmdFuncL( SmlPutPtr_t aContent );            
       
    70 	Ret_t smlResultsCmdFuncL( SmlResultsPtr_t aContent );   
       
    71 	Ret_t smlStatusCmdFuncL( SmlStatusPtr_t aContent );       
       
    72 	Ret_t smlStartMessageFuncL( SmlSyncHdrPtr_t aSyncHdr);    
       
    73 	Ret_t smlEndMessageFuncL( Boolean_t final );           
       
    74 	Ret_t smlStartSyncFuncL( SmlSyncPtr_t aContent );       
       
    75 	Ret_t smlEndSyncFuncL();                               
       
    76 	Ret_t smlStartAtomicFuncL( SmlAtomicPtr_t aContent );  
       
    77 	Ret_t smlEndAtomicFuncL();                              
       
    78 	Ret_t smlStartSequenceFuncL( SmlSequencePtr_t aContent ); 
       
    79 	Ret_t smlEndSequenceFuncL();                              
       
    80 	Ret_t smlAddCmdFuncL( SmlAddPtr_t aContent );          
       
    81    	Ret_t smlCopyCmdFuncL( SmlCopyPtr_t aContent);               
       
    82 	Ret_t smlDeleteCmdFuncL( SmlDeletePtr_t aContent );    
       
    83 	Ret_t smlExecCmdFuncL( SmlExecPtr_t aContent );        
       
    84 	Ret_t smlMapCmdFuncL( SmlMapPtr_t aContent );          
       
    85 	Ret_t smlReplaceCmdFuncL( SmlReplacePtr_t aContent );  
       
    86 	Ret_t smlSearchCmdFuncL( SmlSearchPtr_t aContent );
       
    87     Ret_t smlMoveCmdFuncL( SmlMovePtr_t aContent );
       
    88 
       
    89     private:
       
    90     
       
    91     TBool iPacketShouldGoToMdo;
       
    92 	};
       
    93 
       
    94 #endif      // __NSMLDSALERT_H
       
    95             
       
    96 // End of File