85 lines
2.0 KiB
C
85 lines
2.0 KiB
C
|
|
#pragma once
|
||
|
|
#ifndef __WFASSOC_H__
|
||
|
|
#define __WFASSOC_H__
|
||
|
|
|
||
|
|
#include <stdarg.h>
|
||
|
|
#include <stdbool.h>
|
||
|
|
#include <stddef.h>
|
||
|
|
#include <stdint.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
|
||
|
|
|
||
|
|
typedef const char *CStyleString;
|
||
|
|
|
||
|
|
typedef uint64_t Token;
|
||
|
|
|
||
|
|
typedef uint32_t Scope;
|
||
|
|
#define SCOPE_USER 0u
|
||
|
|
#define SCOPE_SYSTEM 1u
|
||
|
|
|
||
|
|
typedef uint32_t View;
|
||
|
|
#define VIEW_USER 0u
|
||
|
|
#define VIEW_SYSTEM 1u
|
||
|
|
#define VIEW_HYBRID 2u
|
||
|
|
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif // __cplusplus
|
||
|
|
|
||
|
|
bool WFStartup(void);
|
||
|
|
|
||
|
|
bool WFShutdown(void);
|
||
|
|
|
||
|
|
CStyleString WFGetLastError(void);
|
||
|
|
|
||
|
|
bool WFHasPrivilege(void);
|
||
|
|
|
||
|
|
bool WFSchemaCreate(Token *out_schema);
|
||
|
|
|
||
|
|
bool WFSchemaDestroy(Token in_schema);
|
||
|
|
|
||
|
|
bool WFSchemaSetIdentifier(Token in_schema, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaSetPath(Token in_schema, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaSetClsid(Token in_schema, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaSetName(Token in_schema, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaSetIcon(Token in_schema, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaSetBehavior(Token in_schema, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaAddStr(Token in_schema, CStyleString in_name, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaAddIcon(Token in_schema, CStyleString in_name, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaAddBehavior(Token in_schema, CStyleString in_name, CStyleString in_value);
|
||
|
|
|
||
|
|
bool WFSchemaAddExt(Token in_schema,
|
||
|
|
CStyleString in_ext,
|
||
|
|
CStyleString in_ext_name,
|
||
|
|
CStyleString in_ext_icon,
|
||
|
|
CStyleString in_ext_behavior);
|
||
|
|
|
||
|
|
bool WFProgramCreate(Token in_schema, Token *out_program);
|
||
|
|
|
||
|
|
bool WFProgramDestroy(Token in_program);
|
||
|
|
|
||
|
|
bool WFProgramRegister(Token in_program, uint32_t in_scope);
|
||
|
|
|
||
|
|
bool WFProgramUnregister(Token in_program, uint32_t in_scope);
|
||
|
|
|
||
|
|
bool WFProgramIsRegistered(Token in_program, uint32_t in_scope, bool *out_is_registered);
|
||
|
|
|
||
|
|
bool WFProgramLinkExt(Token in_program, uint32_t in_scope, size_t in_index);
|
||
|
|
|
||
|
|
bool WFProgramUnlinkExt(Token in_program, uint32_t in_scope, size_t in_index);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
} // extern "C"
|
||
|
|
#endif // __cplusplus
|
||
|
|
|
||
|
|
#endif // __WFASSOC_H__
|