upnpharvester/mdhserver/inc/server/mdhserversession.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:      Metadata Harvester server session header
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CMMDHSERVERSESSION_H
       
    25 #define CMMDHSERVERSESSION_H
       
    26 
       
    27 //  INCLUDES
       
    28 #include <e32std.h>
       
    29 //include "mdhmediaservercontainer.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 class CCmMdhMediaserverContainer;
       
    34 class CCmMdhServer;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  CCmMdhSession
       
    40 *  This is a class for metadata harvester server main session
       
    41 *
       
    42 *  @lib -
       
    43 *  @since Series 60 3.0
       
    44 */
       
    45 class CCmMdhSession : public CSession2
       
    46     {
       
    47     public:  // Constructors and destructor
       
    48         
       
    49         /**
       
    50         * Two-phased constructor.
       
    51         */
       
    52         static CCmMdhSession* NewL( 
       
    53             CCmMdhMediaserverContainer* aMediaserverContainer, 
       
    54             CCmMdhServer& aServer );
       
    55         
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         ~CCmMdhSession();
       
    60         
       
    61     public: // Functions from base classes
       
    62 
       
    63         /**
       
    64         * ServiceL from base class CSession2.
       
    65         * @since Series 60 3.0
       
    66         * @param aMessage Message for Metadata Harvester
       
    67         * @return void
       
    68         */
       
    69         void ServiceL( const RMessage2 &aMessage );
       
    70         
       
    71     public: // New functions
       
    72     
       
    73     private:
       
    74 
       
    75        /**
       
    76         * Constructor.
       
    77         */
       
    78         CCmMdhSession( CCmMdhMediaserverContainer* aMediaserverContainer, 
       
    79             CCmMdhServer& aServer );
       
    80          
       
    81        /**
       
    82         * By default Symbian 2nd phase constructor is private.
       
    83         */
       
    84         void ConstructL();
       
    85         
       
    86         /**
       
    87         * Server returns the server reference.
       
    88         * @since Series 60 3.1
       
    89         * @param void
       
    90         * @return Metadata harvester server reference
       
    91         */      
       
    92         CCmMdhServer& Server();
       
    93 
       
    94         /**
       
    95         * Completes message with busy error code if server is busy
       
    96         * @since Series 60 3.1
       
    97         * @param aMessage message
       
    98         * @return ETrue if completed
       
    99         */      
       
   100         TBool CompleteIfBusy( const RMessage2& aMessage );
       
   101         
       
   102 
       
   103     private:    // Data
       
   104     
       
   105         // media server container pointer (not owned)
       
   106         CCmMdhMediaserverContainer* iMediaserverContainer;
       
   107                 
       
   108         // Server
       
   109         CCmMdhServer& iServer;        
       
   110    
       
   111     };
       
   112 
       
   113 #endif      // CMMDHSERVERSESSION_H   
       
   114             
       
   115 // End of File