upnpsharing/upnpsecurity/inc/client/upnpsecuritymanagerclientsession.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     2  * Copyright (c) 2009 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:  upnpsecuritymanager / client side interface
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef R_UPNPSECURITYMANAGERCLIENTSESSION_H
       
    19 #define R_UPNPSECURITYMANAGERCLIENTSESSION_H
       
    20 
       
    21 #include "upnpsessionbase.h"
       
    22 #include "upnpsecaccesscontroller.h"    //TAccessType
       
    23 #include <in_sock.h>
       
    24 
       
    25 /**
       
    26  *  Client session to UPnP Security Manager
       
    27  *
       
    28  *  @lib upnpsecuritymanagerclient
       
    29  */
       
    30 NONSHARABLE_CLASS( RUpnpSecurityManagerClientSession ) : public RUpnpSessionBase
       
    31     {
       
    32 public:
       
    33 
       
    34     /**
       
    35      * Constructor.
       
    36      */
       
    37     IMPORT_C RUpnpSecurityManagerClientSession();
       
    38 
       
    39     /**
       
    40      * Establish connection with server
       
    41      */
       
    42     IMPORT_C TInt Connect();
       
    43 
       
    44     /**
       
    45      * Adds new file to allowed file array, if not existing yet
       
    46      *
       
    47      * @param aFileName file path+name to new allowed file
       
    48      */
       
    49     IMPORT_C void AddFileL( const TDesC& aFileName );
       
    50 
       
    51     /**
       
    52      * Removes file from allowed array
       
    53      *
       
    54      * @param aFileName File path+name to file to be removed
       
    55      */
       
    56     IMPORT_C void RemoveFileL( const TDesC& aFileName );
       
    57 
       
    58     /**
       
    59      * Adds new address to allowed address array, if not existing yet
       
    60      *
       
    61      * @param aIpAddress containing IP Address of the remote party
       
    62      */
       
    63     IMPORT_C void AddAddressL( const TInetAddr& aIpAddress );
       
    64 
       
    65     /**
       
    66      * Removes address from allowed array
       
    67      *
       
    68      * @param aIpAddress containing IP Address to be removed
       
    69      */
       
    70     IMPORT_C void RemoveAddressL( const TInetAddr& aIpAddress );
       
    71 
       
    72     /**
       
    73      * Resets file access list
       
    74      */
       
    75     IMPORT_C void ResetFileListL();
       
    76 
       
    77     /**
       
    78      * Resets address access list
       
    79      */
       
    80     IMPORT_C void ResetAddressListL();
       
    81 
       
    82     /**
       
    83      * Checks if ipAddress and file exist on access list
       
    84      *
       
    85      * @param aIpAddress  IP Address 
       
    86      * @param aFileName path+name to file 
       
    87      */
       
    88     IMPORT_C TAccessType CheckAuthorizationL(
       
    89             const TInetAddr& aIpAddress,
       
    90             const TDesC& aFileName );
       
    91 
       
    92     /**
       
    93      * Checks if ipAddress and file exist on access list
       
    94      *
       
    95      * @param  aIpAddress containing IP Address to be
       
    96      *        removed
       
    97      */
       
    98     IMPORT_C TAccessType QueryAuthorisationL( const TInetAddr& aIpAdress );
       
    99 
       
   100     };
       
   101 
       
   102 #endif // R_UPNPSECURITYMANAGERCLIENTSESSION_H
       
   103 // End of File