1.1 --- a/epoc32/include/mw/senhostletconnection.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/senhostletconnection.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,115 @@
1.4 -senhostletconnection.h
1.5 +/*
1.6 +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: CSenHostletConnection offers public API for
1.19 +* applications to to provide locally, invocable
1.20 + services (identified by unique endpoint URI)
1.21 + to service consumers.
1.22 +*
1.23 +*/
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +
1.31 +
1.32 +#ifndef SEN_HOSTLET_CONNECTION_H
1.33 +#define SEN_HOSTLET_CONNECTION_H
1.34 +
1.35 +// INCLUDES
1.36 +#include <e32base.h> // for CActive
1.37 +
1.38 +#include <MSenHostlet.h>
1.39 +#include <MSenServiceDescription.h>
1.40 +#include <SenServiceConnection.h>
1.41 +#include <SenSoapEnvelope.h>
1.42 +#include <SenFragment.h>
1.43 +
1.44 +// CONSTANTS
1.45 +
1.46 +const TInt KErrSenEndpointReserved = -30317;
1.47 +
1.48 +
1.49 +// FORWARD DECLARATIONS
1.50 +class CSenServicePattern;
1.51 +
1.52 +// CLASS DECLARATION
1.53 +class CSenHostletConnection : public CActive
1.54 + {
1.55 + public: // Constructors and destructor
1.56 +
1.57 + /**
1.58 + * Constructs a new hostlet connection, utilizing the service description
1.59 + * provided by MSenHostlet::ServiceDescriptionL() callback implementation.
1.60 + * Leave codes:
1.61 + * - KErrSenEndpointReserved if the endpoint specified in hostlet
1.62 + * implementation already exists and is reserved for some other
1.63 + * use (hostlet).
1.64 + * @return a pointer to a newly created hostlet connection
1.65 + */
1.66 + IMPORT_C static CSenHostletConnection* NewL(MSenHostlet& aProvider);
1.67 +
1.68 + /**
1.69 + * Constructs a new hostlet connection, utilizing the service description
1.70 + * provided by MSenHostlet::ServiceDescriptionL() callback implementation.
1.71 + * Leave codes:
1.72 + * - KErrSenEndpointReserved if the endpoint specified in hostlet
1.73 + * implementation already exists and is reserved for some other
1.74 + * use (hostlet).
1.75 + * @return a pointer to a newly created hostlet connection, which is also
1.76 + * left on the cleanup stack.
1.77 + */
1.78 + IMPORT_C static CSenHostletConnection* NewLC(MSenHostlet& aProvider);
1.79 +
1.80 + /**
1.81 + * Method for responding to incoming message. This asynchronous method
1.82 + * will send a response for the request that was received by the hostlet
1.83 + * implementation in the ServiceL callback. After the response has been
1.84 + * delivered to service consumer who made the request, the following
1.85 + * callback will be invoked:
1.86 + * MSenHostlet::OnServiceCompleteL
1.87 + * @return KErrNone, if response was successfully pre-processed by
1.88 + * the hostlet connection - it does not mean, that it was yet
1.89 + * received by the consumer, as this method is asynchronous.
1.90 + * If the response cannot be processed, some system-wide error
1.91 + * code is returned.
1.92 + * KErrAlreadyExists, if response was already provided
1.93 + * for this request
1.94 + */
1.95 + virtual TInt RespondL(MSenHostletResponse& aResponse) = 0;
1.96 +
1.97 +
1.98 + /* Getter for full, (live) service desctiption for this hostlet connection */
1.99 +// virtual TInt ServiceDescriptionL(CSenXmlServiceDescription*& apSessionDescription) = 0;
1.100 +
1.101 + /**
1.102 + * Getter for the identifier of this connection.
1.103 + * @return the identifier as integer.
1.104 + */
1.105 + virtual TInt Identifier() = 0;
1.106 +
1.107 +
1.108 + protected:
1.109 + /**
1.110 + * C++ default constructor.
1.111 + */
1.112 + CSenHostletConnection();
1.113 +
1.114 + };
1.115 +
1.116 +#endif //SEN_HOSTLET_CONNECTION_H
1.117 +
1.118 +// End of File
1.119 +