ncdengine/provider/protocol/inc/ncd_cp_query.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:   MNcdProtocolElementEntity declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCDPROTOCOLELEMENTQUERY_H
       
    20 #define NCDPROTOCOLELEMENTQUERY_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "ncdquery.h"
       
    25 //#include "ncdprotocoltypes.h"
       
    26 
       
    27 class MNcdConfigurationProtocolQueryElement;
       
    28 class CNcdString;
       
    29 
       
    30 
       
    31 class MNcdConfigurationProtocolQuery
       
    32     {
       
    33 public:
       
    34     
       
    35     enum TNcdProtocolQueryTrigger
       
    36         {
       
    37         ETriggerAutomatic, // triggered when query encountered
       
    38         ETriggerActivation // triggered when associated entity is activated
       
    39         };
       
    40     
       
    41     /**
       
    42      * Destructor
       
    43      */
       
    44     virtual ~MNcdConfigurationProtocolQuery() {}
       
    45 
       
    46     /**
       
    47      * Returns the ID of this query.
       
    48      * @return Id
       
    49      */
       
    50     virtual const TDesC& Id() const = 0;
       
    51     
       
    52     /**
       
    53      * Returns the semantics of this query.
       
    54      *
       
    55      * @return Semantics enumeration value.
       
    56      */
       
    57     virtual MNcdQuery::TSemantics Semantics() const = 0;
       
    58     
       
    59     /**
       
    60      * Explicitly specifies an event that triggers the message.
       
    61      *
       
    62      * @return TNcdProtocolQueryTrigger
       
    63      */
       
    64     virtual TNcdProtocolQueryTrigger Trigger() const = 0;
       
    65     
       
    66     /**
       
    67      * If true then the client must show this query to the end-user.
       
    68      *
       
    69      * @return True or false
       
    70      */
       
    71     virtual TBool Force() const = 0;
       
    72 
       
    73     /**
       
    74      * Returns the response URI of this query.
       
    75      * @return URI or KNullDesC
       
    76      */
       
    77     virtual const TDesC& ResponseUri() const = 0;
       
    78     
       
    79     /**
       
    80      * If true, the query can be omitted.
       
    81      *
       
    82      * @return True or false
       
    83      */
       
    84     virtual TBool Optional() const = 0;
       
    85 
       
    86     /**
       
    87      * Proposed dialog title that the client should use when displaying this
       
    88      * message.
       
    89      *
       
    90      * @return Title text.
       
    91      */
       
    92     virtual const CNcdString& Title() const = 0;
       
    93     
       
    94     /**
       
    95      * Proposed dialog body that the client should use when displaying this
       
    96      * message.
       
    97      *
       
    98      * @return Body text.
       
    99      */
       
   100     virtual const CNcdString& BodyText() const = 0;
       
   101 
       
   102     /**
       
   103      * Returns the number of query elements in this query.
       
   104      *
       
   105      * @return Query element count.
       
   106      */
       
   107     virtual TInt QueryElementCount() const = 0;
       
   108     
       
   109     /**
       
   110      * Returns query element by index.
       
   111      *
       
   112      * @param aIndex Query index. Leaves if index is out of bounds.
       
   113      * @return Query element 
       
   114      */
       
   115     virtual const MNcdConfigurationProtocolQueryElement& QueryElementL( 
       
   116         TInt aIndex ) const = 0;
       
   117 
       
   118     };
       
   119 
       
   120 
       
   121 #endif // NCDPROTOCOLELEMENTQUERY_H