cmmanager/cmmgr/cmmserver/inc/cmmsession.h
changeset 40 c5b848e6c7d1
parent 30 8dde790cab74
equal deleted inserted replaced
34:3b0cec605979 40:c5b848e6c7d1
    19 
    19 
    20 #ifndef CMMSESSION_H_
    20 #ifndef CMMSESSION_H_
    21 #define CMMSESSION_H_
    21 #define CMMSESSION_H_
    22 
    22 
    23 #include <e32base.h>
    23 #include <e32base.h>
       
    24 #include <f32file.h>
    24 
    25 
    25 #include "cmmcache.h"
    26 #include "cmmcache.h"
    26 
    27 
    27 class CCmmServer;
    28 class CCmmServer;
    28 class CCmmConnMethodInstance;
    29 class CCmmConnMethodInstance;
    75     /**
    76     /**
    76      * Finds a connection method instance that belongs to this session and
    77      * Finds a connection method instance that belongs to this session and
    77      * matches the provided ID. Return NULL if no match is found.
    78      * matches the provided ID. Return NULL if no match is found.
    78      */
    79      */
    79     CCmmConnMethodInstance* FindConnMethodInstanceById(
    80     CCmmConnMethodInstance* FindConnMethodInstanceById(
    80             const TUint32& aConnMethodId );
    81             const TUint32 aConnMethodId );
    81 
    82 
    82     /**
    83     /**
    83      * Finds a destination instance that belongs to this session and matches
    84      * Finds a destination instance that belongs to this session and matches
    84      * the provided handle.
    85      * the provided handle.
    85      */
    86      */
    86     CCmmDestinationInstance* FindDestinationInstanceByHandleL(
    87     CCmmDestinationInstance* FindDestinationInstanceByHandleL(
    87             const TInt& aDestinationHandle );
    88             const TInt aDestinationHandle );
    88 
    89 
    89     /**
    90     /**
    90      * Finds a destination instance that belongs to this session and matches
    91      * Finds a destination instance that belongs to this session and matches
    91      * the provided ID. Return NULL if no match is found.
    92      * the provided ID. Return NULL if no match is found.
    92      */
    93      */
    93     CCmmDestinationInstance* FindDestinationInstanceById(
    94     CCmmDestinationInstance* FindDestinationInstanceById(
    94             const TUint32& aDestinationId );
    95             const TUint32 aDestinationId );
    95 
    96 
    96     /**
    97     /**
    97      * Check from all open destination handles in this session if the given
    98      * Check from all open destination handles in this session if the given
    98      * connection method is inside any of them. The given destination is
    99      * connection method is inside any of them. The given destination is
    99      * skipped.
   100      * skipped.
   100      */
   101      */
   101     TBool ConnMethodInOtherDestination(
   102     TBool ConnMethodInOtherDestination(
   102             const TUint32& aConnMethodId,
   103             const TUint32 aConnMethodId,
   103             const TUint32& aDestinationId );
   104             const TUint32 aDestinationId );
   104 
   105 
   105     /**
   106     /**
   106      * Check for restrictions for adding an embedded destination from destination
   107      * Check for restrictions for adding an embedded destination from destination
   107      * instances of all clients.
   108      * instances of all clients.
   108      * @param aDestinationId The ID of the destination where a destination is
   109      * @param aDestinationId The ID of the destination where a destination is
   109      * beeing embedded.
   110      * beeing embedded.
   110      * @param aEmbeddedDestinationId The ID of the destination that is beeing
   111      * @param aEmbeddedDestinationId The ID of the destination that is beeing
   111      * embedded.
   112      * embedded.
   112      */
   113      */
   113     TBool EmbeddedDestinationConflictsFromAllSessions(
   114     TBool EmbeddedDestinationConflictsFromAllSessions(
   114             const TUint32& aDestinationId,
   115             const TUint32 aDestinationId,
   115             const TUint32& aEmbeddedDestinationId );
   116             const TUint32 aEmbeddedDestinationId );
   116 
   117 
   117     /**
   118     /**
   118      * Check for restrictions for adding an embedded destination from destination
   119      * Check for restrictions for adding an embedded destination from destination
   119      * instances of this session.
   120      * instances of this session.
   120      * @param aDestinationId The ID of the destination where a destination is
   121      * @param aDestinationId The ID of the destination where a destination is
   121      * beeing embedded.
   122      * beeing embedded.
   122      * @param aEmbeddedDestinationId The ID of the destination that is beeing
   123      * @param aEmbeddedDestinationId The ID of the destination that is beeing
   123      * embedded.
   124      * embedded.
   124      */
   125      */
   125     TBool EmbeddedDestinationConflicts(
   126     TBool EmbeddedDestinationConflicts(
   126             const TUint32& aDestinationId,
   127             const TUint32 aDestinationId,
   127             const TUint32& aEmbeddedDestinationId );
   128             const TUint32 aEmbeddedDestinationId );
   128 
   129 
   129     /**
   130     /**
   130      * After update to database, refresh temporary ID to real ID if necessary
   131      * After update to database, refresh temporary ID to real ID if necessary
   131      * and refresh status information for any related handles for all client
   132      * and refresh status information for any related handles for all client
   132      * sessions.
   133      * sessions.
   136     /**
   137     /**
   137      * Removes a connection method from any open destination handle in this
   138      * Removes a connection method from any open destination handle in this
   138      * session.
   139      * session.
   139      */
   140      */
   140     void RemoveConnMethodFromDestinationHandles(
   141     void RemoveConnMethodFromDestinationHandles(
   141             const TUint32& aConnMethodId );
   142             const TUint32 aConnMethodId );
   142 
   143 
   143     /**
   144     /**
   144      * Notify this sessions destination/connection method handles about an
   145      * Notify this sessions destination/connection method handles about an
   145      * updated/deleted destination/connection method.
   146      * updated/deleted destination/connection method.
   146      */
   147      */
   147     void RefreshHandles( const TUint32& aId ) const;
   148     void RefreshHandles( const TUint32 aId ) const;
   148 
   149 
   149 private:
   150 private:
   150     /**
   151     /**
   151      * The first phase of two phase construction.
   152      * The first phase of two phase construction.
   152      *
   153      *
   254      */
   255      */
   255     void CheckCapabilitiesForProtectedCML( 
   256     void CheckCapabilitiesForProtectedCML( 
   256             const RMessage2& aMessage,
   257             const RMessage2& aMessage,
   257             CCmmConnMethodInstance* aConnectionMethod );
   258             CCmmConnMethodInstance* aConnectionMethod );
   258 
   259 
       
   260     /**
       
   261      * Checks the disk space.
       
   262      */
       
   263     TBool CheckSpaceBelowCriticalLevelL();
       
   264 
   259 private:
   265 private:
   260     RMessage2 iMessage;
   266     RMessage2 iMessage;
   261 
   267 
   262     CCmmServer& iServer;
   268     CCmmServer& iServer;
   263 
   269 
   272 
   278 
   273     // Object index which stores objects for this session
   279     // Object index which stores objects for this session
   274     CObjectIx* iConnMethodObjects;
   280     CObjectIx* iConnMethodObjects;
   275 
   281 
   276     CCmmCache& iCache; // Not owned
   282     CCmmCache& iCache; // Not owned
       
   283 
       
   284     // Tells if Fileserver handle is valid.
       
   285     TBool iFsConnected;
       
   286 
       
   287     // File server handle.
       
   288     RFs iFs;
   277     };
   289     };
   278 
   290 
   279 #endif // CMMSESSION_H_
   291 #endif // CMMSESSION_H_
   280 
   292 
   281 // End of file
   293 // End of file