ncdengine/provider/protocol/inc/ncd_cp_actionrequest.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 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:   MNcdConfigurationProtocolActionRequest declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCDCONFIGURATIONPROTOCOLACTIONREQUEST_H
       
    20 #define M_NCDCONFIGURATIONPROTOCOLACTIONREQUEST_H
       
    21 
       
    22 class MNcdConfigurationProtocolQuery;
       
    23 class MNcdConfigurationProtocolDetail;
       
    24 
       
    25 class MNcdConfigurationProtocolUpdateDetails
       
    26     {
       
    27 public:
       
    28     
       
    29     virtual ~MNcdConfigurationProtocolUpdateDetails() {}
       
    30 
       
    31     virtual const TDesC& Id() const = 0;
       
    32     virtual const TDesC& Version() const = 0;
       
    33     virtual const TDesC& Uri() const = 0;
       
    34 
       
    35     };
       
    36 
       
    37 class MNcdConfigurationProtocolActionRequest
       
    38     {
       
    39 public:
       
    40     enum TNcdProtocolActionRequestType
       
    41         {
       
    42         ETypeAdd,
       
    43         ETypeRemove,
       
    44         ETypeClear,
       
    45         ETypeUpdate
       
    46         };
       
    47     
       
    48     /**
       
    49      * Destructor
       
    50      */
       
    51     virtual ~MNcdConfigurationProtocolActionRequest() {}
       
    52 
       
    53     /**
       
    54      * Is action forced
       
    55      * @return True or false
       
    56      */
       
    57     virtual TBool Force() const = 0;
       
    58 
       
    59     /**
       
    60      * Action request type
       
    61      * @return Action type
       
    62      * @see TNcdProtocolActionRequestType
       
    63      */
       
    64     virtual TNcdProtocolActionRequestType Type() const = 0;
       
    65 
       
    66     /**
       
    67      * Action target
       
    68      * @return Target string or KNullDesC
       
    69      */
       
    70     virtual const TDesC& Target() const = 0;
       
    71 
       
    72     /**
       
    73      * Amount of message elements in the action
       
    74      * @return Message count
       
    75      */
       
    76     virtual TInt MessageCount() const = 0;
       
    77     
       
    78     /**
       
    79      * Get message element
       
    80      * @param aIndex Message index. Leaves if index is out of bounds.
       
    81      * @return Message object reference.
       
    82      * @see MessageCount()
       
    83      */
       
    84     virtual const MNcdConfigurationProtocolQuery& MessageL( TInt aIndex ) const = 0;
       
    85     
       
    86     /**
       
    87      * Amount of details objects
       
    88      * @return
       
    89      */
       
    90     virtual TInt DetailCount() const = 0;
       
    91     
       
    92     /**
       
    93      * Get details object
       
    94      * @param aIndex Details index. Leaves if index is out of bounds.
       
    95      * @return Details object reference.
       
    96      * @see DetailCount()
       
    97      */
       
    98     virtual const MNcdConfigurationProtocolDetail& DetailL( TInt aIndex ) const = 0;
       
    99 
       
   100     /**
       
   101      * Get update details. Ownership is NOT transferred.
       
   102      * @return Update details pointer or NULL if not available.
       
   103      */
       
   104     virtual const MNcdConfigurationProtocolUpdateDetails* UpdateDetails() const = 0;
       
   105     };
       
   106 
       
   107 #endif