obex/obexextensionapi/public/mobexserverrequestpacketnotify.h
changeset 54 4dc88a4ac6f4
parent 52 866b4af7ffbe
child 57 f6055a57ae18
equal deleted inserted replaced
52:866b4af7ffbe 54:4dc88a4ac6f4
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef OBEXSERVERREQUESTPACKETNOTIFY_H
       
    23 #define OBEXSERVERREQUESTPACKETNOTIFY_H
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <obexbase.h>
       
    27 
       
    28 class TObexConnectInfo;
       
    29 
       
    30 typedef TUint8 TObexRequestCode;
       
    31 
       
    32 const TObexRequestCode KObexRequestFinalConnect		= 0x80;
       
    33 const TObexRequestCode KObexRequestFinalDisconnect	= 0x81;
       
    34 const TObexRequestCode KObexRequestPut				= 0x02;
       
    35 const TObexRequestCode KObexRequestFinalPut			= 0x82;
       
    36 const TObexRequestCode KObexRequestGet				= 0x03;
       
    37 const TObexRequestCode KObexRequestFinalGet			= 0x83;
       
    38 const TObexRequestCode KObexFinalSetPath			= 0x85;
       
    39 const TObexRequestCode KObexFinalAbort				= 0xFF;
       
    40 
       
    41 /**
       
    42 A Mixin to provide a notification interface for the receipt of request
       
    43 packets by an OBEX server.
       
    44 
       
    45 @publishedPartner
       
    46 @released
       
    47 */
       
    48 class MObexServerRequestPacketNotify
       
    49 	{
       
    50 public:
       
    51 	
       
    52 	/**
       
    53 	Receipt of a generic request packet.
       
    54 	
       
    55 	@param aRequest 	The opcode of the request packet received.
       
    56 	@param aResponse 	The implementer should set this to the response they
       
    57 						want to send to the client if they are abandoning
       
    58 						processing.
       
    59 	@return EFalse to abandon processing the packet, ETrue to process as normal 
       
    60 	*/
       
    61 	virtual TBool RequestPacket(TObexRequestCode aRequest, TObexResponse& aResponse) = 0;
       
    62 	
       
    63 	/**
       
    64 	Receipt of a Connect Request packet. Overload of the generic case.
       
    65 	
       
    66 	@param aRequest 	The opcode of the Connect Request packet received.
       
    67 	@param aConnectInfo	The Connect Info of the Connect Request packet.
       
    68 	@param aResponse 	The implementer should set this to the response they
       
    69 						want to send to the client if they are abandoning
       
    70 						processing.
       
    71 	@return EFalse to abandon processing the packet, ETrue to process as normal 
       
    72 	*/
       
    73 	virtual TBool RequestPacket(TObexRequestCode aRequest, TObexConnectInfo& aConnectInfo, TObexResponse& aResponse) = 0;
       
    74 	
       
    75 	/**
       
    76 	Receipt of a SetPath Request packet. Overload of the generic case.
       
    77 	
       
    78 	@param aRequest 	The opcode of the SetPath Request packet received.
       
    79 	@param aSetPathInfo	The SetPath Info of the SetPath Request packet.
       
    80 	@param aResponse 	The implementer should set this to the response they
       
    81 						want to send to the client if they are abandoning
       
    82 						processing.
       
    83 	@return EFalse to abandon processing the packet, ETrue to process as normal 
       
    84 	*/
       
    85 	virtual TBool RequestPacket(TObexRequestCode aRequest, CObex::TSetPathInfo& aSetPathInfo, TObexResponse& aResponse) = 0;
       
    86 	
       
    87 	};
       
    88 
       
    89 #endif // OBEXSERVERREQUESTPACKETNOTIFY_H
       
    90