DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
siQuery.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2002 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
25 #ifndef _SIQUERY_H_
26 #define _SIQUERY_H_
27 
28 
29 /*---includes for this file--------------------------------------------------*/
30 
31 
32 #include "clDsmSystem.h"
33 #include "linkList.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 
40 /*---Constant and macro definitions for public use---------------------------*/
41 
42 #define SI_QUERY_MAGIC 0xC537D89E
43 
44 
45 /*******************
46 * EXPORTED TYPES *
47 ********************/
48 
49 typedef enum
50 {
51  SIQS_INITIAL = 0,
52  SIQS_PENDING, /* -- Waiting for results to be supplied asynchronously */
53  SIQS_COMPLETED, /* -- Results supplied */
54  SIQS_ABORTED, /* -- Aborted before results supplied */
55  SIQS_EXPIRED /* -- Aborted before results supplied but has duplicates */
56 } E_SiQueryState;
57 
58 typedef struct s_SiQuery
59 {
60  S_LLObject llData[NUM_LISTS_SI_QUERY];
61 
62  U32BIT magic;
63  E_SiQueryState state;
64 
65  S_SIQueryRequest query;
66  void *target;
67 
68  void *queryHandle; /* -- External handle */
69 
70  P_LLControl llcDuplSiQuerys; /* -- Only used if original == True */
71  BOOLEAN original; /* -- original or duplicate (False) */
72 } S_SiQuery;
73 
74 
75 /*---Global variable declarations for public use-----------------------------*/
76 
77 /*---Global Function prototypes for public use---------------------------------*/
78 
79 E_DscError siQueryStart( P_DsmCoreInst idp,
80  /*I*/ P_SIQueryRequest pQueryData, void *queryTarget,
81  P_SIQueryResult pResult );
82 
83 void siQueryAbortPending( P_DsmCoreInst idp, P_SiQuery pSiQueryRef );
84 
85 void siQueryStop( P_DsmCoreInst idp, P_SiQuery pSiQuery );
86 
87 E_DscError siQueryProcessResult( P_DsmCoreInst idp, P_SiQuery pSiQueryRef, P_SIQueryResult pResult );
88 
89 #ifdef GET_PID_LIST
90 E_DscError siQueryGetPIDList( P_DsmCoreInst idp );
91 #endif /*GET_PID_LIST*/
92 
93 /*----------------------------------------------------------------------------*/
94 #ifdef __cplusplus
95 }
96 #endif
97 #endif /* _SIQUERY_H_ */
General include file for clDsm library internal definitions.
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...
Definition: siQuery.c:283
E_DscError siQueryProcessResult(P_DsmCoreInst idp, P_SiQuery pSiQueryRef, P_SIQueryResult pResult)
Processes and stops the specified SI Query.
Definition: siQuery.c:523
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.
Definition: siQuery.c:350
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 stil...
Definition: siQuery.c:76