remotemgmt_plat/syncml_alert_api/inc/NSmlPrivateAPI.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Used to transfer Alert messages and DM Auth info to SyncML Symbian OS Server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __NSMLPRIVATEAPI_H__
       
    20 #define __NSMLPRIVATEAPI_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <SyncMLDef.h>
       
    24 #include "nsmlconstants.h"		 
       
    25 #include <s32mem.h>
       
    26 class CNSmlDMAuthInfo;
       
    27 
       
    28 struct CNSmlDMAlertItem { 
       
    29         HBufC8* iSource;
       
    30 	    HBufC8* iTarget;
       
    31 	    HBufC8* iMetaType;
       
    32 	    HBufC8* iMetaFormat;
       
    33 	    HBufC8* iMetaMark;
       
    34 	    HBufC8* iData;
       
    35 };
       
    36 
       
    37 
       
    38 /**
       
    39 *  RNSmlPrivateAPI class 
       
    40 *  Used to transfer Alert messages and DM Auth info to SyncML Symbian OS Server
       
    41 *
       
    42 *  @lib NSmlPrivateApi.lib
       
    43 */
       
    44 class RNSmlPrivateAPI : public RSessionBase
       
    45 	{
       
    46 	
       
    47 	public:
       
    48 
       
    49 		/**
       
    50 		* C++ default constructor.
       
    51 	    */
       
    52 		IMPORT_C RNSmlPrivateAPI();
       
    53 		
       
    54 		/**
       
    55 	    * Creates new session to SyncML SOS Server. Server is launched if not already running.
       
    56 	    * @param -
       
    57 	    * @return -
       
    58 	    */
       
    59 		IMPORT_C void OpenL();
       
    60 		
       
    61 		/**
       
    62 	    * Transfer message to SyncML SOS Server.
       
    63 	    * @param aData message to be transferred.
       
    64 	    * @param aType Specifies the usage type (DS/DM).
       
    65 	    * @param aVersion specifies the protocol of the message
       
    66 	    * @return -
       
    67 	    */
       
    68 		IMPORT_C void SendL(const TDesC8& aData, TSmlUsageType aType, TSmlProtocolVersion aVersion, TUid aTransportId = KUidNSmlMediumTypeInternet );
       
    69 
       
    70 		/**
       
    71 	    * Sends DM authetication info to server for saving.
       
    72 	    * @param aAuthInfo Reference to authentication data container.
       
    73 	    * @return -
       
    74 	    */
       
    75 		IMPORT_C void SetDMAuthInfoL( const CNSmlDMAuthInfo& aAuthInfo );
       
    76 		
       
    77 		/**
       
    78 	    * Retrieves the DM authentication data from server.
       
    79 	    * @param aAuthInfo Reference to authentication data container.
       
    80 	    * @return -
       
    81 	    */
       
    82 		IMPORT_C void GetDMAuthInfoL( CNSmlDMAuthInfo& aAuthInfo );
       
    83 		
       
    84 		// FOTA
       
    85 		
       
    86 		/**
       
    87 	    * Adds a Generic Alert to DM Agent if it is found.
       
    88 	    * @param aMgmtUri The uri which has been used in the exe command whose final result is 
       
    89 	    * about to be reported.
       
    90 	    * @param aMetaType Meta/Type that should be used in the alert.
       
    91 	    * @param aMetaFormat Meta/Format that should be used in the alert.
       
    92 	    * @param aFinalResult The final result value which is reported to remote server.
       
    93 	    * @param aCorrelator Correlator value used in the original exec command.
       
    94 	    * @return KErrNone, if successful. System wide error otherwise.
       
    95 	    */
       
    96 		IMPORT_C TInt AddDMGenericAlertRequestL( const TDesC8& aMgmtUri, const TDesC8& aMetaType, const TDesC8& aMetaFormat, TInt aFinalResult, const TDesC8& aCorrelator ) const;
       
    97 		
       
    98 		// FOTA end
       
    99 		/**
       
   100 	    * Adds a Generic Alert to DM Agent if it is found.
       
   101 	    * @param aCorrelator Correlator value used in the original exec command.
       
   102 	    * @param aItemList Array of CNSmlDMAlertItem.
       
   103 		* @return KErrNone, if successful. System wide error otherwise.
       
   104 	    */
       
   105 
       
   106 	    IMPORT_C TInt AddDMGenericAlertRequestL( const TDesC8& aCorrelator, RArray<CNSmlDMAlertItem>& aItemList ) const;
       
   107 
       
   108 		/**
       
   109 	    * Closes the connection with SyncML SOS Server
       
   110 	    * @param -
       
   111 	    * @return -
       
   112 	    */
       
   113 		IMPORT_C void Close();
       
   114 
       
   115 	};
       
   116 	
       
   117 #endif