Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

191 lines
5.8 KiB

#define IN [in]
#define OUT [out]
#define SIZE_IS(size)
#define LENGTH_IS(length)
#define UNIQUE
#define INTERFACE
#define SPLAY_TREE
#define CALLBACK
[
uuid (12345678-1234-ABCD-EF00-0123456789AB),
version(1.0),
endpoint("msc_np:[\\pipe\\splay]")
]
interface dict {
// import "util1.idl"
/*************************************************************************/
/*** Strongly typed tree nodes and dictionaries ***/
/*************************************************************************/
// struct dumbnode imported from previous util1.idl
typedef struct dumbnode {
short key;
[string] char* name;
} Record;
typedef struct _RecordTreeNode {
struct _RecordTreeNode *left; // left child pointer
struct _RecordTreeNode *right; // right child pointer
Record *item; // pointer to a Record structure
} RecordTreeNode;
/*
RDict (Remote Dictionary) is used for marshalling a complete dictionary.
*/
typedef struct _RDict {
RecordTreeNode *root; // pointer to the root of a SAT
long size; // number of records in dictionary
} RDict;
typedef [context_handle] void * VDict;
/*
typedef enum {
DICT_SUCCESS,
DICT_ITEM_ALREADY_PRESENT,
DICT_ITEM_NOT_FOUND,
DICT_FIRST_ITEM,
DICT_LAST_ITEM,
DICT_EMPTY_DICTIONARY,
DICT_NULL_ITEM
}
VDict_Status;
*/
/*
VDict_Status and the #defines following replaces the above enum
definition for now.
*/
typedef short VDict_Status;
#define DICT_SUCCESS 0
#define DICT_ITEM_ALREADY_PRESENT 1
#define DICT_ITEM_NOT_FOUND 2
#define DICT_FIRST_ITEM 3
#define DICT_LAST_ITEM 4
#define DICT_EMPTY_DICTIONARY 5
#define DICT_NULL_ITEM 6
/*************************************************************************/
/*** Virtual Dictionary Operations: ***/
/*** ***/
/*** VDict_Status *Dict_New(VDict *) ***/
/*** ***/
/*** VDict_Status Dict_Find(VDict*, Record*) ***/
/*** VDict_Status Dict_Next(VDict*, Record*) ***/
/*** VDict_Status Dict_Prev(VDict*, Record*) ***/
/*** VDict_Status Dict_Insert(VDict*, Record*) ***/
/*** VDict_Status Dict_Delete(VDict*, Record**) ***/
/*** ***/
/*************************************************************************/
/*************************************************************************/
/*** Virtual Dictionary Operations: ***/
/*** ***/
/*** VDict_Status VDict_New(OUT VDict *) ***/
/*** ***/
/*** VDict_Status VDict_Find(IN VDict, IN OUT Record**) ***/
/*** VDict_Status VDict_Next(IN VDict, IN OUT Record**) ***/
/*** VDict_Status VDict_Prev(IN VDict, IN OUT Record**) ***/
/*** VDict_Status VDict_Insert(IN VDict, IN Record*) ***/
/*** VDict_Status VDict_Delete(IN VDict, IN OUT Record**) ***/
/*** ***/
/*** VDict_Status VDict_Get_Dict(IN VDict, OUT RDict**) ***/
/*** VDict_Status VDict_Curr_Item(IN VDict, OUT Record**); ***/
/*** VDict_Status VDict_Delete_Curr(IN VDict, OUT Record**); ***/
/*** VDict_Status VDict_Curr_Next(IN VDict, OUT Record**); ***/
/*** VDict_Status VDict_Curr_Prev(IN VDict, OUT Record**); ***/
/*** ***/
/*************************************************************************/
/*************************************************************************/
/*
Most of the remote operations interfacing to a remote dictionary are
nearly identical to operations on local dictionaries, with the following
noted exceptions. To compansate for the fact that it is possible to "peek"
and get the current item of a local dictionary, some interfaces had to be
added, and others have to be changed to closely match the capabilities of
a local dictionaries by a remote dictionary. In particular the item
(Record) argument became an OUT or an IN OUT argument, returning the value
of the "current_item" following an operation (VDict_Find, VDict_Next,
VDict_Prev). The operations VDict_Curr_Item, VDict_Delete_Curr,
VDict_Curr_Next, and VDict_Curr_Prev were added to get functionality
obtained in local dictionaries by the DICT_CURR_ITEM macro, and by passing
the current item as an IN argument to Dict_Delete, Dict_Next and
Dict_Prev.
*/
/*************************************************************************/
VDict_Status
VDict_New( [out] VDict * v_dict );
VDict_Status
VDict_Find(
[in] VDict v_dict,
[in, out] Record ** item
);
VDict_Status
VDict_Next(
[in] VDict v_dict,
[in, out] Record ** item
);
VDict_Status
VDict_Prev(
[in] VDict v_dict,
[in, out] Record ** item
);
VDict_Status
VDict_Insert(
[in] VDict v_dict,
[in] Record * item
);
VDict_Status
VDict_Delete(
[in] VDict v_dict,
[in, out] Record ** item
);
VDict_Status
VDict_Get_Dict(
[in] VDict v_dict,
[out] RDict ** r_dict
);
VDict_Status
VDict_Curr_Item(
[in] VDict v_dict,
[out] Record ** item
);
VDict_Status
VDict_Curr_Delete(
[in] VDict v_dict,
[out] Record ** item
);
VDict_Status
VDict_Curr_Next(
[in] VDict v_dict,
[out] Record ** item
);
VDict_Status
VDict_Curr_Prev(
[in] VDict v_dict,
[out] Record ** item
);
}