Functions | Variables

# option.c File Reference

`#include "wizard/studio.h"`
`#include "wizard/authenticate.h"`
`#include "wizard/cipher.h"`
`#include "wizard/entropy.h"`
`#include "wizard/exception-private.h"`
`#include "wizard/memory_.h"`
`#include "wizard/mime.h"`
`#include "wizard/mime-private.h"`
`#include "wizard/option.h"`
`#include "wizard/resource_.h"`
`#include "wizard/string_.h"`
`#include "wizard/token.h"`

## Functions

static const OptionInfo * | GetOptionInfo (const WizardOption option)
WizardExport char ** | GetWizardOptions (const WizardOption option)
WizardExport WizardBooleanType | IsWizardOption (const char *option)
WizardExport WizardBooleanType | ListWizardOptions (FILE *file, const WizardOption option, ExceptionInfo *wizard_unused(exception))
WizardExport ssize_t | ParseWizardOption (const WizardOption option, const WizardBooleanType list, const char *options)
WizardExport const char * | WizardOptionToMnemonic (const WizardOption option, const ssize_t type)

## Variables

static const OptionInfo | AuthenticateOptions []
static const OptionInfo | CipherOptions []
static const OptionInfo | CommandOptions []
static const OptionInfo | DataTypeOptions []
static const OptionInfo | EndianOptions []
static const OptionInfo | EntropyLevelOptions []
static const OptionInfo | EntropyOptions []
static const OptionInfo | KeyLengthOptions []
static const OptionInfo | HashOptions []
static const OptionInfo | ListOptions []
static const OptionInfo | LogWizardEventOptions []
static const OptionInfo | ModeOptions []
static const OptionInfo | ResourceOptions []

## Function Documentation

static const OptionInfo* GetOptionInfo | ( | const WizardOption | option | ) | `[static]`

References AuthenticateOptions, CipherOptions, CommandOptions, DataTypeOptions, EndianOptions, EntropyLevelOptions, EntropyOptions, HashOptions, KeyLengthOptions, ListOptions, LogWizardEventOptions, ModeOptions, ResourceOptions, WizardAuthenticateOptions, WizardCipherOptions, WizardCommandOptions, WizardDataTypeOptions, WizardDebugOptions, WizardEndianOptions, WizardEntropyLevelOptions, WizardEntropyOptions, WizardHashOptions, WizardKeyLengthOptions, WizardListOptions, WizardLogEventOptions, WizardModeOptions, and WizardResourceOptions.

Referenced by GetWizardOptions(), ListWizardOptions(), ParseWizardOption(), and WizardOptionToMnemonic().

WizardExport char** GetWizardOptions | ( | const WizardOption | option | ) |

References AcquireQuantumMemory(), AcquireString(), GetOptionInfo(), _OptionInfo::mnemonic, ResourceFatalError, and ThrowFatalException.

WizardExport WizardBooleanType IsWizardOption | ( | const char * | option | ) |

References WizardFalse, and WizardTrue.

WizardExport WizardBooleanType ListWizardOptions | ( | FILE * | file,
|  | const WizardOption | option,
|  | ExceptionInfo * | wizard_unusedexception |
| ) |  |  |

References GetOptionInfo(), _OptionInfo::mnemonic, WizardFalse, and WizardTrue.

WizardExport ssize_t ParseWizardOption | ( | const WizardOption | option,
|  | const WizardBooleanType | list,
|  | const char * | options |
| ) |  |  |

References CopyWizardString(), GetOptionInfo(), LocaleCompare(), WizardPathExtent, _OptionInfo::mnemonic, _OptionInfo::type, WizardFalse, and WizardTrue.

Referenced by LoadLogList(), LoadMimeList(), and SetLogEventMask().

WizardExport const char* WizardOptionToMnemonic | ( | const WizardOption | option,
|  | const ssize_t | type |
| ) |  |  |

References GetOptionInfo(), and _OptionInfo::mnemonic.

Referenced by AcquireWizardResource(), LogWizardEventList(), and RelinquishWizardResource().

## Variable Documentation

const OptionInfo AuthenticateOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedAuthenticate },
        { "Public", (ssize_t) PublicAuthenticateMethod },
        { "Secret", (ssize_t) SecretAuthenticateMethod },
        { (char *) NULL, UndefinedAuthenticate }
      }

Referenced by GetOptionInfo().

const OptionInfo CipherOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedCipher },
        { "AES", (ssize_t) AESCipher },
        { "None", (ssize_t) NoCipher },
        { "Serpent", (ssize_t) SerpentCipher },
        { "Twofish", (ssize_t) TwofishCipher },
        { (char *) NULL, UndefinedCipher }
      }

Referenced by GetOptionInfo().

const OptionInfo CommandOptions[]`[static]`

Referenced by GetOptionInfo().

const OptionInfo DataTypeOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedData },
        { "Byte", (ssize_t) ByteData },
        { "Long", (ssize_t) LongData },
        { "Short", (ssize_t) ShortData },
        { "String", (ssize_t) StringData },
        { (char *) NULL, (ssize_t) UndefinedData }
      }

Referenced by GetOptionInfo().

const OptionInfo EndianOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedEndian },
        { "LSB", (ssize_t) LSBEndian },
        { "MSB", (ssize_t) MSBEndian },
        { (char *) NULL, (ssize_t) UndefinedEndian }
      }

Referenced by GetOptionInfo().

const OptionInfo EntropyLevelOptions[]`[static]`

Initial value:

      {
        { "0", 0L },
        { "1", 1L },
        { "2", 2L },
        { "3", 3L },
        { "4", 4L },
        { "5", 5L },
        { "6", 6L },
        { "7", 7L },
        { "8", 8L },
        { "9", 9L },
        { (char *) NULL, 0L }
      }

Referenced by GetOptionInfo().

const OptionInfo EntropyOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedEntropy },
        { "None", (ssize_t) NoEntropy },
        { "BZip", (ssize_t) BZIPEntropy },
        { "LZMA", (ssize_t) LZMAEntropy },
        { "Zip", (ssize_t) ZIPEntropy },
        { (char *) NULL, UndefinedEntropy }
      }

Referenced by GetOptionInfo().

const OptionInfo HashOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedHash },
        { "CRC64", (ssize_t) CRC64Hash },
        { "MD5", (ssize_t) MD5Hash },
        { "None", (ssize_t) NoHash },
        { "SHA1", (ssize_t) SHA1Hash },
        { "SHA224", (ssize_t) SHA224Hash },
        { "SHA256", (ssize_t) SHA256Hash },
        { "SHA384", (ssize_t) SHA384Hash },
        { "SHA512", (ssize_t) SHA512Hash },
        { (char *) NULL, UndefinedHash }
      }

Referenced by GetOptionInfo().

const OptionInfo KeyLengthOptions[]`[static]`

Initial value:

      {
        { "256", 256L },
        { "512", 512L },
        { "1024", 1024L },
        { "2048", 2048L },
        { (char *) NULL, 0L }
      }

Referenced by GetOptionInfo().

const OptionInfo ListOptions[]`[static]`

Initial value:

      {
        { "Authenticate", (ssize_t) WizardAuthenticateOptions },
        { "Cipher", (ssize_t) WizardCipherOptions },
        { "Command", (ssize_t) WizardCommandOptions },
        { "DataType", (ssize_t) WizardDataTypeOptions },
        { "Debug", (ssize_t) WizardDebugOptions },
        { "Endian", (ssize_t) WizardEndianOptions },
        { "Entropy", (ssize_t) WizardEntropyOptions },
        { "EntropyLevel", (ssize_t) WizardEntropyLevelOptions },
        { "Hash", (ssize_t) WizardHashOptions },
        { "KeyLength", (ssize_t) WizardKeyLengthOptions },
        { "List", (ssize_t) WizardListOptions },
        { "Mode", (ssize_t) WizardModeOptions },
        { (char *) NULL, (ssize_t) WizardUndefinedOptions }
      }

Referenced by GetOptionInfo().

const OptionInfo LogWizardEventOptions[]`[static]`

Initial value:

      {
        { "All", (ssize_t) (AllEvents &~ TraceEvent) },
        { "Blob", (ssize_t) BlobEvent },
        { "Deprecate", (ssize_t) DeprecateEvent },
        { "Configure", (ssize_t) ConfigureEvent },
        { "Exception", (ssize_t) ExceptionEvent },
        { "Locale", (ssize_t) LocaleEvent },
        { "None", (ssize_t) NoEvents },
        { "Resource", (ssize_t) ResourceEvent },
        { "Trace", (ssize_t) TraceEvent },
        { "User", (ssize_t) UserEvent },
        { "Warning", (ssize_t) WarningEvent },
        { (char *) NULL, UndefinedEvents }
      }

Referenced by GetOptionInfo().

const OptionInfo ModeOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedMode },
        { "CBC", (ssize_t) CBCMode },
        { "CFB", (ssize_t) CFBMode },
        { "CTR", (ssize_t) CTRMode },
        { "ECB", (ssize_t) ECBMode },
        { "OFB", (ssize_t) OFBMode },
        { (char *) NULL, UndefinedMode }
      }

Referenced by GetOptionInfo().

const OptionInfo ResourceOptions[]`[static]`

Initial value:

      {
        { "Undefined", (ssize_t) UndefinedResource },
        { "Area", (ssize_t) AreaResource },
        { "Disk", (ssize_t) DiskResource },
        { "File", (ssize_t) FileResource },
        { "Map", (ssize_t) MapResource },
        { "Memory", (ssize_t) MemoryResource },
        { (char *) NULL, (ssize_t) UndefinedResource }
      }

Referenced by GetOptionInfo().