upnpmediaserver/connectionmanagerservice/inc/upnpcm.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     2 * Copyright (c) 2005-2006 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:  Declares ConnectionManager class
       
    15 *
       
    16 */
       
    17 class CUpnpSecurityManager;
       
    18 
       
    19 
       
    20 #ifndef C_CUPNPCM_H
       
    21 #define C_CUPNPCM_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "upnpserviceimplementation.h"
       
    25 
       
    26 const TInt KGranularity = 10;
       
    27 const TInt KBufExpandSize = 128;
       
    28 _LIT8(KConnectionManagerType, "ConnectionManager:1" );
       
    29 
       
    30 /**
       
    31 *  Declares ConnectionManager class
       
    32 *  This service-type enables modeling of streaming capabilities of A/V devices, 
       
    33 *  and binding of those capabilities between devices.
       
    34 *
       
    35 *  @upnpcm.lib
       
    36 *  @since Series60 2.6
       
    37 */
       
    38 NONSHARABLE_CLASS( CUpnpCM ): public CUpnpServiceImplementation
       
    39     {
       
    40     public: // Constructors and destructor
       
    41         
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45         IMPORT_C static CUpnpCM* NewL( CUpnpDevice& aParentService, 
       
    46                                        const TDesC8& aMediaTypes,
       
    47                                        const TDesC& aDescriptionPath );
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         ~CUpnpCM();
       
    52                 
       
    53     public: // Functions from CUpnpServiceImplementation
       
    54 
       
    55         /**
       
    56         * ActionReceivedLD
       
    57         * From CUpnpServiceImplementation,Handles actions received from the 
       
    58         * ServiceFramework, see coments in base class
       
    59         * @since Series60 2.0
       
    60         * @param aAction Pointer to Action element that is going to be handled
       
    61         */
       
    62         void ActionReceivedLD( CUpnpAction* aAction );
       
    63 
       
    64     public: // Functions from CConnectionManager
       
    65 
       
    66         /**
       
    67         * GetProtocolInfo
       
    68         * From CConnectionManager,Handles GetProtocolInfo actions by setting
       
    69         * the needed information to aAction
       
    70         * @since Series60 2.0
       
    71         * @param aAction Instructions
       
    72         * @return TUpnpErrocCode, Returns an error code if the operation has
       
    73         * failed
       
    74         */
       
    75         TUpnpErrorCode GetProtocolInfoL( CUpnpAction* aAction );
       
    76 
       
    77         /**
       
    78         * PrepareForConnection
       
    79         * From CConnectionManager,Handles PrepareForConnection actions 
       
    80         * according to instructions
       
    81         * @since Series60 2.0
       
    82         * @param aAction Instructions
       
    83         * @return TUpnpErrocCode, Returns an error code if the operation
       
    84         * has failed
       
    85         */
       
    86         TUpnpErrorCode PrepareForConnection( CUpnpAction* aAction );
       
    87 
       
    88         /**
       
    89         * ConnectionComplete
       
    90         * From CConnectionManager,Releases the connection specified in the
       
    91         * aAction
       
    92         * @since Series60 2.0
       
    93         * @param aAction Instructions
       
    94         * @return TUpnpErrocCode, Returns an error code if the operation has
       
    95         * failed
       
    96         */
       
    97         TUpnpErrorCode ConnectionComplete( CUpnpAction* aAction );
       
    98 
       
    99         /**
       
   100         * GetCurrentConnectionIDsL
       
   101         * From CConnectionManager,Check the current connections and inserts a 
       
   102         * CSV list of them into the aAction
       
   103         * @since Series 602.0
       
   104         * @param aAction Instructions
       
   105         * @return TUpnpErrocCode, Returns an error code if the operation has 
       
   106         * failed
       
   107         */
       
   108         TUpnpErrorCode GetCurrentConnectionIDsL( CUpnpAction* aAction );
       
   109 
       
   110         /**
       
   111         * GetCurrentConnectionIDsL
       
   112         * From CConnectionManager,Checks the ConnectionInfo of the connection 
       
   113         * specified in the aAction and sets the data to aAction
       
   114         * @since Series60 2.0
       
   115         * @param aAction Instructions
       
   116         * @return TUpnpErrocCode, Returns an error code if the operation has 
       
   117         * failed
       
   118         */
       
   119         TUpnpErrorCode GetCurrentConnectionInfoL( CUpnpAction* aAction );
       
   120         
       
   121 	private: 	
       
   122 		/**
       
   123         * C++ default constructor.
       
   124         */
       
   125         CUpnpCM(CUpnpDevice& aDevice);
       
   126 
       
   127         /**
       
   128         * By default Symbian 2nd phase constructor is private.
       
   129         * @param aParentService Reference to parent service
       
   130         */
       
   131         void ConstructL( const TDesC8& aMediaTypes, const TDesC& aDescriptionPath );    
       
   132 
       
   133     private: 
       
   134 
       
   135         HBufC8* CreateProtocolInfosL(const TDesC8& aMediaTypes );
       
   136 		void GetMediaListFromStringL(CPtrC8Array* aList, const TDesC8& aMediaTypes);
       
   137 
       
   138     private:
       
   139         CUpnpSecurityManager* iSecurityManager;
       
   140 		
       
   141 	};
       
   142 
       
   143 #endif // C_CUPNPCM_H
       
   144 
       
   145 // End of File