~ubuntu-branches/ubuntu/lucid/sblim-sfcb/lucid

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * constClass.h
 *
 * (C) Copyright IBM Corp. 2005
 *
 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
 * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
 * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
 *
 * You can obtain a current copy of the Eclipse Public License from
 * http://www.opensource.org/licenses/eclipse-1.0.php
 *
 * Author:        Frank Scheffler
 * Contributions: Adrian Schuur <schuur@de.ibm.com>
 *
 * Description:
 *
 * Internal CMPIConstClass implementation.
 *
*/

#ifndef CMPI_constClass_h
#define CMPI_constClass_h

#include "cmpidt.h"

#define MALLOCED(a) (((a) & 0xff000000)!=0xff000000)

#define FL_assocsOnly 64

struct _CMPIConstClass_FT;
typedef struct _CMPIConstClass_FT CMPIConstClass_FT;

struct _CMPIConstClass {
   void *hdl;
   CMPIConstClass_FT *ft;
   int refCount;
};
typedef struct _CMPIConstClass CMPIConstClass;

struct _CMPIConstClass_FT { 
   int version;
  /* functions defined in cimcift.h */
   CMPIStatus(*release) (CMPIConstClass * cc);
   CMPIConstClass *(*clone) (CMPIConstClass * cc, CMPIStatus * rc); 
   CMPIString *(*getClassName)(CMPIConstClass* cc, CMPIStatus * rc);
   CMPIData (*getProperty) (CMPIConstClass * cc, const char *prop, CMPIStatus * rc);
   CMPIData (*getPropertyAt) (CMPIConstClass * cc, CMPICount i,
                             CMPIString ** name,  CMPIStatus * rc);
   CMPICount (*getPropertyCount) (CMPIConstClass * cc, CMPIStatus * rc);
   
   CMPIData (*getQualifier) (CMPIConstClass * cc, const char *qual, CMPIStatus * rc);
   CMPIData (*getQualifierAt) (CMPIConstClass * cc, CMPICount i,
                              CMPIString ** name, CMPIStatus * rc);
   CMPICount (*getQualifierCount) (CMPIConstClass * cc, CMPIStatus * rc);
   
   CMPIData (*getPropQualifier) (CMPIConstClass * cc, const char *prop,
                                   const char *qual, CMPIStatus * rc);
   CMPIData (*getPropQualifierAt) (CMPIConstClass * cc, const char *prop,
                                   CMPICount i, CMPIString ** name,
                                   CMPIStatus * rc);
   CMPICount (*getPropQualifierCount) (CMPIConstClass * cc, const char * prop, CMPIStatus * rc);
   
  /* local functions for sfcb */
   CMPIString *(*getSuperClassName)(CMPIConstClass* cc, CMPIStatus * rc);   
   CMPIArray *(*getKeyList) (CMPIConstClass * cc);
   char *(*toString) (CMPIConstClass * cc);     
   void (*relocate) (CMPIConstClass * cc);
   const char *(*getCharClassName) (CMPIConstClass * br);
   const char *(*getCharSuperClassName) (CMPIConstClass * br);
   CMPIBoolean(*isAssociation) (CMPIConstClass * cc);
   CMPIBoolean(*isAbstract) (CMPIConstClass * cc);
   CMPIBoolean(*isIndication) (CMPIConstClass * cc);
   CMPIData(*getPropQualAt) (CMPIConstClass * cc, CMPICount p, CMPICount i, CMPIString ** name,
                                   CMPIStatus * rc);
};

extern CMPIData getPropertyQuals (CMPIConstClass * cc, const char *prop,
                            unsigned long *quals, CMPIStatus * rc);
extern CMPIData getPropertyQualsAt (CMPIConstClass * cc, CMPICount i,
                              CMPIString ** name, unsigned long *quals, CMPIString ** refName,
                              CMPIStatus * rc);
extern CMPIData internalGetPropQualAt (CMPIConstClass * cc, CMPICount p,
                              CMPICount i, CMPIString ** name, CMPIStatus * rc);
extern CMPIConstClass_FT *CMPIConstClassFT;

//   extern CMPIConstClass* newCMPIConstClass(const char *cn, const char *pn);

#endif