loc_plat/location_centre_api/inc/lcnotification.h
branchRCL_3
changeset 16 4721bd00d3da
parent 14 3a25f69541ff
child 21 e15b7f06eba6
equal deleted inserted replaced
14:3a25f69541ff 16:4721bd00d3da
     1 /*
       
     2 * Copyright (c) 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:  Observer class defintion to notify any changes to the
       
    15 *                state of Location Applications.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef M_LCNOTIFICATION_H
       
    20 #define M_LCNOTIFICATION_H
       
    21 
       
    22 /**
       
    23  *  @file lcnotification.h
       
    24  *
       
    25  *  This file provides the definitions for the observer class which enables
       
    26  *  the client application to listen to notifications from Location Centre.
       
    27  *
       
    28  *  @lib lcservice.lib
       
    29  *  @since S60 v5.0 
       
    30  */
       
    31 
       
    32 // SYSTEM INCLUDES
       
    33 #include <e32base.h>
       
    34 
       
    35 /**
       
    36  *  @class MLcNotification
       
    37  *  Observer class to notify the changes to the applications registered with
       
    38  *  Location Centre.
       
    39  *
       
    40  *  This client application needs to pass an instance of this class when calling 
       
    41  *  @ref CLcService::StartNotificationL
       
    42  *
       
    43  *  @lib lcservice.lib
       
    44  *  @since S60 v5.0
       
    45  */
       
    46 class MLcNotification
       
    47     {
       
    48 public:
       
    49     /**
       
    50      * Notification for the termination of the chained Location based Application.
       
    51      *
       
    52      * The notification can occur under the following conditions
       
    53      * - When a new Location based Application registers into Location
       
    54      * Centre. In this case, the Location based Application would be 
       
    55      * immediately available for all Location Centre operations.
       
    56      * - When an already registered Location based Application de-registers.
       
    57      * In this case, the Location based Application will be removed from
       
    58      * Location Centre. Hence, it would not be available for any further Location
       
    59      * Centre operations.
       
    60      * - When a Location based Application is present on a removable media (like
       
    61      * Memory card)and the media is removed. In this case, for all practical
       
    62      * purposes the Location based Application behaves as in the previous context.
       
    63      * The difference being that the application does not get removed from
       
    64      * Location Centre but is marked as an Absent application. When the
       
    65      * removable media is re-inserted, the application immediately becomes 
       
    66      * available for all Location Centre operations.
       
    67      * - When an removable media containing an Absent Location based Application
       
    68      * is re-inserted. In this case, the Location based Application would be
       
    69      * immediately available for all Location Centre operations.
       
    70      * - When the Location Centre server terminates pre-maturely. In this case, no
       
    71      * further notifications would be given to the Client application and all 
       
    72      * further requests to the Location Centre server would fail with 
       
    73      * @p KErrServerTerminated.     
       
    74      *         
       
    75      * @since S60 v5.0
       
    76      * @param[in] aErrorCode Error code for the notification completion.
       
    77      *                       The following are the values which the variable
       
    78      *                       can assume on completion of the request.
       
    79      *                       - KErrNone If there is an new Location based
       
    80      *                       Application registered to Location Centre, when
       
    81      *                       an existing Location based Application is removed
       
    82      *                       from Location Centre or when an Location based 
       
    83      *                       Application becomes absent or present.
       
    84      *                       - KErrCancel If an outstanding request is Cancelled.
       
    85      *                       - KErrServerTerminated If the Location Centre server
       
    86      *                       is pre-maturely terminated.
       
    87      *                       - System wide error codes in other error conditions. 
       
    88      */
       
    89     virtual void LcStatusChangedL( TInt aErrorCode ) = 0;
       
    90     };
       
    91 
       
    92 #endif // M_LCNOTIFICATION_H