<commit_before>#pragma once
// Version history:
// 1
// Original, unversioned header
// 2
// NAMEID_ARRAY_ENTRY augmented with ulType and lpszArea
// 3
// lpSmartViewParserTypes and ulSmartViewParserTypes added to _Addin

#define MFCMAPI_HEADER_V1 1
#define MFCMAPI_HEADER_V2 2
#define MFCMAPI_HEADER_V3 3

// Version number of this header file. Will be bumped when breaking changes are made
#define MFCMAPI_HEADER_CURRENT_VERSION MFCMAPI_HEADER_V3

// Force all ATL (like CString) to use CP_ACP
#define _CONVERSION_DONT_USE_THREAD_LOCALE

// Property tags and types - used by GetPropTags and GetPropTypes
struct NAME_ARRAY_ENTRY
{
	ULONG ulValue;
	LPCWSTR lpszName;
};
typedef NAME_ARRAY_ENTRY* LPNAME_ARRAY_ENTRY;

struct NAME_ARRAY_ENTRY_V2
{
	ULONG ulValue;
	ULONG ulSortOrder;
	LPCWSTR lpszName;
};
typedef NAME_ARRAY_ENTRY_V2* LPNAME_ARRAY_ENTRY_V2;

// Guids - used by GetPropGuids
struct GUID_ARRAY_ENTRY
{
	LPCGUID lpGuid;
	LPCWSTR lpszName;
};
typedef GUID_ARRAY_ENTRY* LPGUID_ARRAY_ENTRY;

// Named property mappings - used by GetNameIDs
struct NAMEID_ARRAY_ENTRY
{
	LONG lValue;
	LPCGUID lpGuid;
	LPCWSTR lpszName;
	ULONG ulType;
	LPCWSTR lpszArea;
};
typedef NAMEID_ARRAY_ENTRY* LPNAMEID_ARRAY_ENTRY;

// Types of flag array entries
enum __FlagType
{
	flagFLAG,
	flagVALUE,
	flagVALUE3RDBYTE,
	flagVALUE4THBYTE,
	flagVALUELOWERNIBBLE,
	flagCLEARBITS, // Used to clear bits that we know we don't know so that remaining bits can be examined as values
	flagVALUEHIGHBYTES,
};

// Types of guids for InterpretFlag named property lookup
enum __GuidType
{
	guidPSETID_Meeting = 0x100,
	guidPSETID_Address = 0x200,
	guidPSETID_Task = 0x300,
	guidPSETID_Appointment = 0x400,
	guidPSETID_Common = 0x500,
	guidPSETID_Log = 0x600,
	guidPSETID_PostRss = 0x700,
	guidPSETID_Sharing = 0x800,
	guidPSETID_Note = 0x900,
};

// All MAPI props are stored in the array by their PROP_ID. So all are < 0xffff.
// clang-format off
#define FLAG_ENTRY(_fName,_fValue,_fType) {PROP_ID(_fName),static_cast<LONG>(_fValue),(_fType),L#_fValue},
#define FLAG_ENTRY_NAMED(_fName,_fValue,_fValueName,_fType) {PROP_ID(_fName),static_cast<LONG>(_fValue),(_fType),(_fValueName)},
#define FLAG_ENTRY3RDBYTE(_fName,_fValue,_fValType) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagVALUE3RDBYTE,L#_fValType L": " L#_fValue}, // STRING_OK
#define FLAG_ENTRY4THBYTE(_fName,_fValue,_fValType) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagVALUE4THBYTE,L#_fValType L": " L#_fValue}, // STRING_OK
#define CLEAR_BITS_ENTRY(_fName,_fValue) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagCLEARBITS,L""},
#define FLAG_ENTRYHIGHBYTES(_fName,_fValue,_fValType) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagVALUEHIGHBYTES,L#_fValType L": " L#_fValue}, // STRING_OK

#define NAMEDPROP_FLAG_ENTRY(_fName,_fGuid,_fValue,_fType) {PROP_TAG((guid##_fGuid),(_fName)),static_cast<LONG>(_fValue),(_fType),L#_fValue},
#define NAMEDPROP_FLAG_ENTRY_NAMED(_fName,_fGuid,_fValue,_fValueName,_fType) {PROP_TAG((guid##_fGuid),(_fName)),static_cast<LONG>(_fValue),(_fType),(_fValueName)},
#define NAMEDPROP_CLEAR_BITS_ENTRY(_fName,_fGuid,_fValue) {PROP_TAG((guid##_fGuid),(_fName)), static_cast<LONG>(_fValue),flagCLEARBITS,L""},

// I can put non property related flags with the high bit set (see enum __NonPropFlag)
#define NON_PROP_FLAG_ENTRY(_fName,_fValue,_fType) {(_fName),static_cast<LONG>(_fValue),(_fType),L#_fValue},
#define NON_PROP_FLAG_ENTRY_NAMED(_fName,_fValue,_fValueName,_fType) {(_fName),static_cast<LONG>(_fValue),(_fType),(_fValueName)},
#define NON_PROP_FLAG_ENTRYLOWERNIBBLE(_fName,_fValue,_fValType) {(_fName),static_cast<LONG>(_fValue),flagVALUELOWERNIBBLE,L#_fValType L": " L#_fValue}, // STRING_OK
#define NON_PROP_CLEAR_BITS_ENTRY(_fName,_fValue) {(_fName),static_cast<LONG>(_fValue),flagCLEARBITS,L""},
// clang-format on

// Flag parsing array - used by GetPropFlags
struct FLAG_ARRAY_ENTRY
{
	ULONG ulFlagName;
	LONG lFlagValue;
	ULONG ulFlagType;
	LPWSTR lpszName; // Must stay raw string for add-ins
};
typedef FLAG_ARRAY_ENTRY* LPFLAG_ARRAY_ENTRY;<commit_msg>make const<commit_after>#pragma once
// Version history:
// 1
// Original, unversioned header
// 2
// NAMEID_ARRAY_ENTRY augmented with ulType and lpszArea
// 3
// lpSmartViewParserTypes and ulSmartViewParserTypes added to _Addin

#define MFCMAPI_HEADER_V1 1
#define MFCMAPI_HEADER_V2 2
#define MFCMAPI_HEADER_V3 3

// Version number of this header file. Will be bumped when breaking changes are made
#define MFCMAPI_HEADER_CURRENT_VERSION MFCMAPI_HEADER_V3

// Force all ATL (like CString) to use CP_ACP
#define _CONVERSION_DONT_USE_THREAD_LOCALE

// Property tags and types - used by GetPropTags and GetPropTypes
struct NAME_ARRAY_ENTRY
{
	ULONG ulValue;
	LPCWSTR lpszName;
};
typedef NAME_ARRAY_ENTRY* LPNAME_ARRAY_ENTRY;

struct NAME_ARRAY_ENTRY_V2
{
	ULONG ulValue;
	ULONG ulSortOrder;
	LPCWSTR lpszName;
};
typedef NAME_ARRAY_ENTRY_V2* LPNAME_ARRAY_ENTRY_V2;

// Guids - used by GetPropGuids
struct GUID_ARRAY_ENTRY
{
	LPCGUID lpGuid;
	LPCWSTR lpszName;
};
typedef GUID_ARRAY_ENTRY* LPGUID_ARRAY_ENTRY;

// Named property mappings - used by GetNameIDs
struct NAMEID_ARRAY_ENTRY
{
	LONG lValue;
	LPCGUID lpGuid;
	LPCWSTR lpszName;
	ULONG ulType;
	LPCWSTR lpszArea;
};
typedef NAMEID_ARRAY_ENTRY* LPNAMEID_ARRAY_ENTRY;

// Types of flag array entries
enum __FlagType
{
	flagFLAG,
	flagVALUE,
	flagVALUE3RDBYTE,
	flagVALUE4THBYTE,
	flagVALUELOWERNIBBLE,
	flagCLEARBITS, // Used to clear bits that we know we don't know so that remaining bits can be examined as values
	flagVALUEHIGHBYTES,
};

// Types of guids for InterpretFlag named property lookup
enum __GuidType
{
	guidPSETID_Meeting = 0x100,
	guidPSETID_Address = 0x200,
	guidPSETID_Task = 0x300,
	guidPSETID_Appointment = 0x400,
	guidPSETID_Common = 0x500,
	guidPSETID_Log = 0x600,
	guidPSETID_PostRss = 0x700,
	guidPSETID_Sharing = 0x800,
	guidPSETID_Note = 0x900,
};

// All MAPI props are stored in the array by their PROP_ID. So all are < 0xffff.
// clang-format off
#define FLAG_ENTRY(_fName,_fValue,_fType) {PROP_ID(_fName),static_cast<LONG>(_fValue),(_fType),L#_fValue},
#define FLAG_ENTRY_NAMED(_fName,_fValue,_fValueName,_fType) {PROP_ID(_fName),static_cast<LONG>(_fValue),(_fType),(_fValueName)},
#define FLAG_ENTRY3RDBYTE(_fName,_fValue,_fValType) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagVALUE3RDBYTE,L#_fValType L": " L#_fValue}, // STRING_OK
#define FLAG_ENTRY4THBYTE(_fName,_fValue,_fValType) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagVALUE4THBYTE,L#_fValType L": " L#_fValue}, // STRING_OK
#define CLEAR_BITS_ENTRY(_fName,_fValue) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagCLEARBITS,L""},
#define FLAG_ENTRYHIGHBYTES(_fName,_fValue,_fValType) {PROP_ID(_fName),static_cast<LONG>(_fValue),flagVALUEHIGHBYTES,L#_fValType L": " L#_fValue}, // STRING_OK

#define NAMEDPROP_FLAG_ENTRY(_fName,_fGuid,_fValue,_fType) {PROP_TAG((guid##_fGuid),(_fName)),static_cast<LONG>(_fValue),(_fType),L#_fValue},
#define NAMEDPROP_FLAG_ENTRY_NAMED(_fName,_fGuid,_fValue,_fValueName,_fType) {PROP_TAG((guid##_fGuid),(_fName)),static_cast<LONG>(_fValue),(_fType),(_fValueName)},
#define NAMEDPROP_CLEAR_BITS_ENTRY(_fName,_fGuid,_fValue) {PROP_TAG((guid##_fGuid),(_fName)), static_cast<LONG>(_fValue),flagCLEARBITS,L""},

// I can put non property related flags with the high bit set (see enum __NonPropFlag)
#define NON_PROP_FLAG_ENTRY(_fName,_fValue,_fType) {(_fName),static_cast<LONG>(_fValue),(_fType),L#_fValue},
#define NON_PROP_FLAG_ENTRY_NAMED(_fName,_fValue,_fValueName,_fType) {(_fName),static_cast<LONG>(_fValue),(_fType),(_fValueName)},
#define NON_PROP_FLAG_ENTRYLOWERNIBBLE(_fName,_fValue,_fValType) {(_fName),static_cast<LONG>(_fValue),flagVALUELOWERNIBBLE,L#_fValType L": " L#_fValue}, // STRING_OK
#define NON_PROP_CLEAR_BITS_ENTRY(_fName,_fValue) {(_fName),static_cast<LONG>(_fValue),flagCLEARBITS,L""},
// clang-format on

// Flag parsing array - used by GetPropFlags
struct FLAG_ARRAY_ENTRY
{
	ULONG ulFlagName;
	LONG lFlagValue;
	ULONG ulFlagType;
	LPCWSTR lpszName; // Must stay raw string for add-ins
};
typedef FLAG_ARRAY_ENTRY* LPFLAG_ARRAY_ENTRY;
{'fraction_non_alphanumeric': 0.10905044510385757, 'fraction_numerical': 0.013847675568743818, 'mean_word_length': 7.889010989010989, 'pattern_counts': {'":': 8, '<': 31, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '617079', 'n_tokens_mistral': 3233, 'n_tokens_neox': 3103, 'n_words': 586}