00001 /* 00002 * ========================================================================= 00003 * Name : MSenHostlet.h 00004 * Part of : Web Services Framework 00005 * Description : 00006 * Version : 00007 * 00008 * Copyright © 2002-2005 Nokia. All rights reserved. 00009 * This material, including documentation and any related 00010 * computer programs, is protected by copyright controlled by 00011 * Nokia. All rights are reserved. Copying, including 00012 * reproducing, storing, adapting or translating, any 00013 * or all of this material requires the prior written consent of 00014 * Nokia. This material also contains confidential 00015 * information which may not be disclosed to others without the 00016 * prior written consent of Nokia. 00017 * ============================================================================== 00018 */ 00019 00020 #ifndef M_SEN_HOSTLET_H 00021 #define M_SEN_HOSTLET_H 00022 00023 // INCLUDES 00024 #include <e32base.h> // for CBase 00025 #include <badesca.h> 00026 00027 #include <MSenHostletRequest.h> 00028 #include <MSenHostletResponse.h> 00029 #include <SenXmlServiceDescription.h> 00030 #include <SenServiceConnection.h> 00031 00032 // FORWARD DECLARE 00033 00034 // CLASS DECLARATION 00035 class MSenHostlet 00036 { 00037 public: 00048 virtual TInt ServiceL(MSenHostletRequest& aRequest, MSenHostletResponse& aResponse) = 0; 00049 00071 virtual TPtrC8 Endpoint() const = 0; 00072 00084 virtual TPtrC8 Contract() const = 0; 00085 00092 inline virtual TPtrC8 FrameworkId() const { return KDefaultRestServicesFrameworkID(); } 00093 00111 inline virtual void DescribeServiceL(CSenXmlServiceDescription& aSD) 00112 { 00113 aSD.SetEndPointL(Endpoint()); 00114 aSD.SetContractL(Contract()); 00115 aSD.SetFrameworkIdL(FrameworkId()); 00116 } 00117 00132 inline virtual void OnServiceCompleteL(TInt /* aTxnId */, 00133 TInt /* aCompletionCode */, 00134 const TDesC8& /* aDesc*/ ) { ; } 00135 00147 inline virtual TAny* GetInterfaceByUid( TUid /* aUID */ ) { return NULL; }; 00148 }; 00149 00150 00151 #endif // M_SEN_HOSTLET_H 00152 00153 // End of File