The TOKEN structure contains information about a token.
typedef struct _TOKEN {
INT tokenType;
char szName[BUFF_SIZE];
char szValue[BUFF_SIZE];
DWORD dwOp;
char szArchitecture[BUFF_SIZE];
char szGroupClass[BUFF_SIZE];
char szAttributeName[BUFF_SIZE];
char szTokenString[TOKEN_STRING_SIZE];
BOOL bIndent;
} TOKEN;
The TOKEN structure is used to add and read tokens in filters and inventory rules folders.
Note that szName is used by all filter types except machine filters (MACHINE_FILTER) and attribute filters (ATTRIBUTE_FILTER). Machine and attribute filters use the szAttributeName to specify the name of the attribute to use for the expression. For these two filters, szName is NULL.
An architecture is a standard structure used for inventorying a set of related objects. An architecture labels and groups together all objects of a specific type. For example, all personal computers use the Personal Computer architecture, and all SMS system events use the SMSEvents architecture.
A group defines the structure for inventorying an item within an object. A group is a set of attributes that describe a specific type of item. For example, SMS inventories disk drives by using the Disk group. The Disk group has attributes (such as Disk Index, Serial Number, Storage Size, and so on) used to identify and describe a disk drive. When SMS inventories a hard disk drive on a computer, the hard disk drive's inventory is stored as a set of attribute values (for example, Disk Index is C, Serial Number is 10F10470, Storage Size is 59 MB, and so on). A group also has a class name that is used by the SMS system to uniquely identify a group (for example, two groups both have the name Monitor, but have different class names—the different class names make them different groups). A class name is composed of the organization name (usually, the organization that defined the group), a name for the group, and the version number. For example, MICROSOFT|DISK|1.0 is the class name of the group used by the SMS system to inventory disks.
Note that szName is used by all filter types except machine filters (MACHINE_FILTER) and attribute filters (ATTRIBUTE_FILTER). For all other filters except machine and attribute filters, szAttributeName is NULL.
For inventory rules folders, the szTokenString member specifies the attributes that identify the file. For example, "file "winword.exe" CHECKSUM 20 200 7232". For inventory rules folders, an expression token uses only the szTokenString member of the TOKEN structure. For information about the format of the expression string for szTokenString, see Inventory Rules Folder Tokens.
For filters, each token represents a criterion for selecting an object or an operator that defines the relationship of the adjacent tokens.
For inventory rules folders, each token represents the criteria used to identify a file or an operator that defines the relationship of the adjacent tokens. For inventory rules folders, an expression token uses only the szTokenString member of the TOKEN structure.
There are two types of tokens:
For inventory rules folders, expression tokens represent the rule for collecting inventory on a package. An expression token uses only the szTokenString member of the TOKEN structure. The szTokenString member specifies the attributes that identify the file.