AnyConnect Secure Mobility Client 5.1.10.233
PreferenceInfo.h
1/**************************************************************************
2* Copyright (c) 2008, 2022 Cisco Systems, Inc.
3* All Rights Reserved. Cisco Highly Confidential.
4***************************************************************************
5*
6* File: PreferenceInfo.h
7* Date: 07/2008
8*
9***************************************************************************
10* Preference Info class declaration for the Client API.
11***************************************************************************/
12
13#ifndef _PREFERENCEINFO_
14#define _PREFERENCEINFO_
15
16
17/**
18* Class representing a collection of preferences that are grouped together.
19* Provides the ability to retrieve an ordered list of preferences, as well as
20* as a generic heading that describes this grouping of preferences.
21*/
22
23#include "PreferenceInfoBase.h"
24
25
26class VPN_VPNAPI PreferenceInfo : public PreferenceInfoBase
27{
28
29 public:
30
31 /**
32 * This method returns the count of any available Preference objects
33 * (both parent and child).
34 */
35 unsigned int countPreferences() const;
36
37
38 /**
39 * If there exists a Preference with the passed ::PreferenceId, returns
40 * a pointer to that Preference object in the passed rpPreference pointer.
41 * Returns false if no such preference could be found.
42 */
43 bool getPreference(const PreferenceId& preferenceId,
44 OUT Preference*& rpPreference) const;
45
46
47 /**
48 * Returns a vector of preferences. The order is significant, and
49 * represents the visual order with which prompts should be displayed.
50 * To access the child preferences of the returned preferences use
51 * Preference::getChildren()
52 */
53 const std::vector<Preference*>& getListPreferences() const;
54
55
56 /**
57 * Returns a string that describes the contents of this PreferenceInfo.
58 * User Interfaces should display this string at the top of the dialog
59 * or screen used to display preference controls/widgets.
60 */
62
63
64 PreferenceInfo();
65
66 virtual ~PreferenceInfo() {};
67
68 /**
69 * Deep Copy Constructor
70 */
72 const PreferenceInfo& existingPrefInfo)
73 :
74 PreferenceInfoBase(existingPrefInfo)
75 {
76 }
77
78 /**
79 * Deep Copy Assignment Operator
80 */
81 PreferenceInfo& operator=(const PreferenceInfo& existingPrefInfo)
82 {
83 if (std::addressof(existingPrefInfo) != this)
84 {
85 PreferenceInfoBase::operator=(existingPrefInfo);
86 }
87 return *this;
88 }
89};
90
91#endif // _PREFERENCEINFO_
PreferenceId
Definition api.h:284
#define tstring
Definition api.h:35
Definition Preference.h:28
const std::vector< Preference * > & getListPreferences() const
PreferenceInfo & operator=(const PreferenceInfo &existingPrefInfo)
Definition PreferenceInfo.h:81
PreferenceInfo(const PreferenceInfo &existingPrefInfo)
Definition PreferenceInfo.h:71
unsigned int countPreferences() const
const tstring getPreferenceHeading() const
bool getPreference(const PreferenceId &preferenceId, OUT Preference *&rpPreference) const