Changeset 9f03c47 for protocols/nogaim.h


Ignore:
Timestamp:
2016-11-14T00:37:14Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
537d9b9, b4f496e
Parents:
ea90275
Message:

Improve support for protocols which don't require a password

This adds a prpl_options_t enum with flags, which mostly just brings
OPT_PROTO_{NO_PASSWORD,PASSWORD_OPTIONAL} from libpurple as
PRPL_OPT_{NO_PASSWORD,PASSWORD_OPTIONAL}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.h

    rea90275 r9f03c47  
    140140};
    141141
     142/* This enum takes a few things from libpurple and a few things from old OPT_ flags.
     143 * The only flag that was used before this struct was PRPL_OPT_NOOTR.
     144 *
     145 * The libpurple ones only use the same values as the PurpleProtocolOptions
     146 * enum for convenience, but there's no promise of direct compatibility with
     147 * those values. As of libpurple 2.8.0 they use up to 0x800 (1 << 11), which is
     148 * a nice coincidence.
     149 */
     150typedef enum {
     151        /* The protocol doesn't use passwords
     152         * Mirrors libpurple's OPT_PROTO_NO_PASSWORD */
     153        PRPL_OPT_NO_PASSWORD = 1 << 4,
     154
     155        /* The protocol doesn't require passwords, but may use them
     156         * Mirrors libpurple's OPT_PROTO_PASSWORD_OPTIONAL */
     157        PRPL_OPT_PASSWORD_OPTIONAL = 1 << 7,
     158
     159        /* The protocol is not suitable for OTR, see OPT_NOOTR */
     160        PRPL_OPT_NOOTR = 1 << 12,
     161} prpl_options_t;
     162
    142163struct prpl {
    143164        int options;
Note: See TracChangeset for help on using the changeset viewer.