2.2.8 STAT

The STAT structure is used to specify the state of a table and location information that applies to that table. It appears as both an input parameter and an output parameter in many NSPI methods.

 typedef struct {
   DWORD SortType;
   DWORD ContainerID;
   DWORD CurrentRec;
   long Delta;
   DWORD NumPos;
   DWORD TotalRecs;
   DWORD CodePage;
   DWORD TemplateLocale;
   DWORD SortLocale;
 } STAT;
  

SortType:  This field contains a DWORD [MS-DTYP] value that represents a sort order. The client sets this field to specify the sort type of this table. Possible values are specified in section 2.2.1.10. The server MUST NOT modify this field.

ContainerID:  This field contains a Minimal Entry ID. The client sets this field to specify the Minimal Entry ID of the address book container that this STAT structure represents. The client obtains these Minimal Entry IDs from the server's address book hierarchy table. The server MUST NOT modify this field in any NSPI method except the NspiGetMatches method.

CurrentRec:  This field contains a Minimal Entry ID. The client sets this field to specify a beginning position in the table for the start of an NSPI method. The server sets this field to report the end position in the table after processing an NSPI method.

Delta:  This field contains a long value. The client sets this field to specify an offset from the beginning position in the table for the start of an NSPI method. If the NSPI method returns a success value, the server MUST set this field to 0.

NumPos:  This field contains a DWORD value that specifies a position in the table. The client sets this field to specify a fractional position for the beginning position in the table for the start of an NSPI method, as specified in section 3.1.4.5.2. If absolute positioning, as specified in section 3.1.4.5.1, is used, the value of this field specified by the client will be ignored by the server. The server sets this field to specify the approximate fractional position at the end of an NSPI method. This value is a zero index; the first element in a table has the numeric position 0. Although the protocol places no boundary or requirements on the accuracy of the approximation the server reports, it is recommended that implementations maximize the accuracy of the approximation to improve usability of the server for clients.

TotalRecs:  This field contains a DWORD value that specifies the number of rows in the table. The client sets this field to specify a fractional position for the beginning position in the table for the start of an NSPI method, as specified in section 3.1.4.5.2. If absolute positioning, as specified in section 3.1.4.5.1, is used, the value of this field specified by the client will be ignored by the server. The server sets this field to specify the total number of rows in the table. Unlike the NumPos field, the server MUST report this number accurately; an approximation is insufficient.

CodePage:  This field contains a DWORD value that represents a code page. The client sets this field to specify the code page the client uses for non-Unicode strings. The server MUST use this value during string handling, as specified in section 3.1.4.3. The server MUST NOT modify this field.

TemplateLocale:  This field contains a DWORD value that represents a language code identifier (LCID). The client sets this field to specify the LCID associated with the template the client wants the server to return. The server MUST NOT modify this field.

SortLocale:  This field contains a DWORD value that represents an LCID. The client sets this field to specify the LCID that it wants the server to use when sorting any strings. The server MUST use this value during sorting, as specified in section 3.1.4.3. The server MUST NOT modify this field.