| AnyConnect Secure Mobility Client 5.0.04032

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# include/PreferenceInfo.h

    00001 /**************************************************************************
    00002 *   Copyright (c) 2008, 2022 Cisco Systems, Inc.
    00003 *   All Rights Reserved. Cisco Highly Confidential.
    00004 ***************************************************************************
    00005 *
    00006 *   File:   PreferenceInfo.h
    00007 *   Date:   07/2008
    00008 *
    00009 ***************************************************************************
    00010 *   Preference Info class declaration for the Client API.
    00011 ***************************************************************************/
    00012
    00013 #ifndef _PREFERENCEINFO_
    00014 #define _PREFERENCEINFO_
    00015
    00016
    00017 /**
    00018 * Class representing a collection of preferences that are grouped together.
    00019 * Provides the ability to retrieve an ordered list of preferences, as well as
    00020 * as a generic heading that describes this grouping of preferences.
    00021 */
    00022
    00023 #include "PreferenceInfoBase.h"
    00024
    00025
    00026 class VPN_VPNAPI PreferenceInfo : public PreferenceInfoBase
    00027 {
    00028
    00029     public:
    00030
    00031         /**
    00032          * This method returns the count of any available Preference objects
    00033          * (both parent and child).
    00034          */
    00035         unsigned int countPreferences() const;
    00036
    00037
    00038         /**
    00039         * If there exists a Preference with the passed ::PreferenceId, returns
    00040         * a pointer to that Preference object in the passed rpPreference pointer.
    00041         * Returns false if no such preference could be found.
    00042         */
    00043         bool getPreference(const PreferenceId& preferenceId,
    00044                            OUT Preference*& rpPreference) const;
    00045
    00046
    00047         /**
    00048         * Returns a vector of preferences.  The order is significant, and
    00049         * represents the visual order with which prompts should be displayed.
    00050         * To access the child preferences of the returned preferences use
    00051         * Preference::getChildren()
    00052         */
    00053         const std::vector<Preference*>& getListPreferences() const;
    00054
    00055
    00056         /**
    00057         * Returns a string that describes the contents of this PreferenceInfo.
    00058         * User Interfaces should display this string at the top of the dialog
    00059         * or screen used to display preference controls/widgets.
    00060         */
    00061         const tstring getPreferenceHeading() const;
    00062
    00063
    00064         PreferenceInfo();
    00065
    00066         virtual ~PreferenceInfo() {};
    00067
    00068         /**
    00069         * Deep Copy Constructor
    00070         */
    00071         explicit PreferenceInfo(
    00072             const PreferenceInfo& existingPrefInfo)
    00073             :
    00074             PreferenceInfoBase(existingPrefInfo)
    00075         {
    00076         }
    00077
    00078         /**
    00079         * Deep Copy Assignment Operator
    00080         */
    00081         PreferenceInfo& operator=(const PreferenceInfo& existingPrefInfo)
    00082         {
    00083             if (std::addressof(existingPrefInfo) != this)
    00084             {
    00085                 PreferenceInfoBase::operator=(existingPrefInfo);
    00086             }
    00087             return *this;
    00088         }
    00089 };
    00090
    00091 #endif // _PREFERENCEINFO_