DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
Data Structures | Macros | Typedefs | Enumerations | Functions
siQuery.h File Reference

Header to siQuery module - functions for managing SI queries. More...

#include "clDsmSystem.h"
#include "linkList.h"

Go to the source code of this file.

Data Structures

struct  s_SiQuery
 

Macros

#define SI_QUERY_MAGIC   0xC537D89E
 

Typedefs

typedef struct s_SiQuery S_SiQuery
 

Enumerations

enum  E_SiQueryState {
  SIQS_INITIAL = 0, SIQS_PENDING, SIQS_COMPLETED, SIQS_ABORTED,
  SIQS_EXPIRED
}
 

Functions

E_DscError siQueryStart (P_DsmCoreInst idp, P_SIQueryRequest pQueryData, void *queryTarget, P_SIQueryResult pResult)
 Starts an SI Query. First tests if we have already made this query and the results are stored or still pending. Otherwise tries SI query callback. If results are not synchronously returned, stores state of query ready for when they are asynchronously returned (via clDsmProcessSiQueryEvent). NB. If start returns results SYNCHRONOUSLY then siQueryStop must not be called. More...
 
void siQueryAbortPending (P_DsmCoreInst idp, P_SiQuery pSiQueryRef)
 Aborts the specified SI Query before completion. Stops/destroys duplicate queries. For original queries or duplicate queries that have expired parents (and no further duplicates) calls stop SI Query callback on relevant query. More...
 
void siQueryStop (P_DsmCoreInst idp, P_SiQuery pSiQuery)
 Stops the specified SI Query. Removes from any lists it is in and destroys associated memory object. NB. If siQueryStart returned results SYNCHRONOUSLY then this must not be called. More...
 
E_DscError siQueryProcessResult (P_DsmCoreInst idp, P_SiQuery pSiQueryRef, P_SIQueryResult pResult)
 Processes and stops the specified SI Query. More...
 

Detailed Description

Header to siQuery module - functions for managing SI queries.

Date
07/05/2002
Author
N Kirkland

Definition in file siQuery.h.

Function Documentation

void siQueryAbortPending ( P_DsmCoreInst  idp,
P_SiQuery  pSiQueryRef 
)

Aborts the specified SI Query before completion. Stops/destroys duplicate queries. For original queries or duplicate queries that have expired parents (and no further duplicates) calls stop SI Query callback on relevant query.

Parameters
idpPointer to instance data.
phPendingSiQueryRefPointer to handle of query to abort.
Returns

Definition at line 350 of file siQuery.c.

E_DscError siQueryProcessResult ( P_DsmCoreInst  idp,
P_SiQuery  pSiQueryRef,
P_SIQueryResult  pResult 
)

Processes and stops the specified SI Query.

Parameters
idpPointer to instance data.
pSiQueryRefRefererence for this query (value supplied at start time).
statusStatus of query results.
pResultPointer to results of query (if successful).
Returns
CLDSM_OK (0) The process SI query event was executed with no problems. CLDSM_ERR_INVALID_SIQUERY_STATUS Supplied status value is invalid here. CLDSM_ERR_SYSTEM_ADD_SECTION_FILTER, Problem with add section filter callback.

Definition at line 523 of file siQuery.c.

E_DscError siQueryStart ( P_DsmCoreInst  idp,
P_SIQueryRequest  pQueryData,
void *  queryTarget,
P_SIQueryResult  pResult 
)

Starts an SI Query. First tests if we have already made this query and the results are stored or still pending. Otherwise tries SI query callback. If results are not synchronously returned, stores state of query ready for when they are asynchronously returned (via clDsmProcessSiQueryEvent). NB. If start returns results SYNCHRONOUSLY then siQueryStop must not be called.

Parameters
idpPointer to instance data.
pQueryDataPointer to structure containing query details.
queryTargetHandle to target of query (ie. object that needs query results - eg. carousel or section filter).
pResultResults of query if synchronously returned.
Returns
CLDSM_OK Everything hunkydory CLDSM_ERR_SI_QUERY_FAILED Synchronous SI query failed to determine requested information CLDSM_MEM_HEAP_FULL Internal memory manager heap full (treat as internal error)

Definition at line 76 of file siQuery.c.

void siQueryStop ( P_DsmCoreInst  idp,
P_SiQuery  pSiQueryRef 
)

Stops the specified SI Query. Removes from any lists it is in and destroys associated memory object. NB. If siQueryStart returned results SYNCHRONOUSLY then this must not be called.

Parameters
idpPointer to instance data.
pSiQueryRefPointer to handle of query to stop (nulled after call).
Returns

Definition at line 283 of file siQuery.c.