00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _konkrete_Alert_h
00010 #define _konkrete_Alert_h
00011
00012 #include <konkret/konkret.h>
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 typedef struct _AlertRef
00024 {
00025 KBase __base;
00026
00027 }
00028 AlertRef;
00029
00030 static const unsigned char __AlertRef_sig[] =
00031 {
00032 0x08,0x4b,0x43,0x5f,0x41,0x6c,0x65,0x72,0x74,0x00,0x00,
00033 };
00034
00035 KINLINE void AlertRef_Init(
00036 AlertRef* self,
00037 const CMPIBroker* cb,
00038 const char* ns)
00039 {
00040 const unsigned char* sig = __AlertRef_sig;
00041 KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
00042 }
00043
00044 KINLINE CMPIStatus AlertRef_InitFromInstance(
00045 AlertRef* self,
00046 const CMPIBroker* cb,
00047 const CMPIInstance* x)
00048 {
00049 AlertRef_Init(self, cb, NULL);
00050 return KBase_FromInstance(&self->__base, x);
00051 }
00052
00053 KINLINE CMPIStatus AlertRef_InitFromObjectPath(
00054 AlertRef* self,
00055 const CMPIBroker* cb,
00056 const CMPIObjectPath* x)
00057 {
00058 AlertRef_Init(self, cb, NULL);
00059 return KBase_FromObjectPath(&self->__base, x);
00060 }
00061
00062 KINLINE void AlertRef_Print(
00063 const AlertRef* self,
00064 FILE* os)
00065 {
00066 KBase_Print(os, &self->__base, 'r');
00067 }
00068
00069 KINLINE CMPIInstance* AlertRef_ToInstance(
00070 const AlertRef* self,
00071 CMPIStatus* status)
00072 {
00073 return KBase_ToInstance(&self->__base, status);
00074 }
00075
00076 KINLINE CMPIObjectPath* AlertRef_ToObjectPath(
00077 const AlertRef* self,
00078 CMPIStatus* status)
00079 {
00080 return KBase_ToObjectPath(&self->__base, status);
00081 }
00082
00083 KINLINE const char* AlertRef_NameSpace(
00084 AlertRef* self)
00085 {
00086 if (self && self->__base.magic == KMAGIC)
00087 return self->__base.ns ? KChars(self->__base.ns) : NULL;
00088 return NULL;
00089 }
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 typedef struct _Alert
00101 {
00102 KBase __base;
00103
00104 const KString Message;
00105 }
00106 Alert;
00107
00108 static const unsigned char __Alert_sig[] =
00109 {
00110 0x08,0x4b,0x43,0x5f,0x41,0x6c,0x65,0x72,0x74,0x00,0x01,0x0c,0x07,0x4d,0x65,
00111 0x73,0x73,0x61,0x67,0x65,0x00,
00112 };
00113
00114 KINLINE void Alert_Init(
00115 Alert* self,
00116 const CMPIBroker* cb,
00117 const char* ns)
00118 {
00119 const unsigned char* sig = __Alert_sig;
00120 KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
00121 }
00122
00123 KINLINE CMPIStatus Alert_InitFromInstance(
00124 Alert* self,
00125 const CMPIBroker* cb,
00126 const CMPIInstance* x)
00127 {
00128 Alert_Init(self, cb, NULL);
00129 return KBase_FromInstance(&self->__base, x);
00130 }
00131
00132 KINLINE CMPIStatus Alert_InitFromObjectPath(
00133 Alert* self,
00134 const CMPIBroker* cb,
00135 const CMPIObjectPath* x)
00136 {
00137 Alert_Init(self, cb, NULL);
00138 return KBase_FromObjectPath(&self->__base, x);
00139 }
00140
00141 KINLINE void Alert_Print(
00142 const Alert* self,
00143 FILE* os)
00144 {
00145 KBase_Print(os, &self->__base, 'i');
00146 }
00147
00148 KINLINE CMPIInstance* Alert_ToInstance(
00149 const Alert* self,
00150 CMPIStatus* status)
00151 {
00152 return KBase_ToInstance(&self->__base, status);
00153 }
00154
00155 KINLINE CMPIObjectPath* Alert_ToObjectPath(
00156 const Alert* self,
00157 CMPIStatus* status)
00158 {
00159 return KBase_ToObjectPath(&self->__base, status);
00160 }
00161
00162 KINLINE const char* Alert_NameSpace(
00163 Alert* self)
00164 {
00165 if (self && self->__base.magic == KMAGIC)
00166 return self->__base.ns ? KChars(self->__base.ns) : NULL;
00167 return NULL;
00168 }
00169
00170 KINLINE void Alert_SetString_Message(
00171 Alert* self,
00172 CMPIString* x)
00173 {
00174 if (self && self->__base.magic == KMAGIC)
00175 {
00176 KString* field = (KString*)&self->Message;
00177 KString_SetString(field, x);
00178 }
00179 }
00180
00181 KINLINE void Alert_Set_Message(
00182 Alert* self,
00183 const char* s)
00184 {
00185 if (self && self->__base.magic == KMAGIC)
00186 {
00187 KString* field = (KString*)&self->Message;
00188 KString_Set(field, self->__base.cb, s);
00189 }
00190 }
00191
00192 KINLINE void Alert_Null_Message(
00193 Alert* self)
00194 {
00195 if (self && self->__base.magic == KMAGIC)
00196 {
00197 KString* field = (KString*)&self->Message;
00198 KString_Null(field);
00199 }
00200 }
00201
00202 KINLINE void Alert_Clr_Message(
00203 Alert* self)
00204 {
00205 if (self && self->__base.magic == KMAGIC)
00206 {
00207 KString* field = (KString*)&self->Message;
00208 KString_Clr(field);
00209 }
00210 }
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220 KINLINE CMPIStatus Alert_InvokeMethod(
00221 const CMPIBroker* cb,
00222 CMPIMethodMI* mi,
00223 const CMPIContext* cc,
00224 const CMPIResult* cr,
00225 const CMPIObjectPath* cop,
00226 const char* meth,
00227 const CMPIArgs* in,
00228 CMPIArgs* out)
00229 {
00230 AlertRef self;
00231
00232 KReturnIf(AlertRef_InitFromObjectPath(&self, cb, cop));
00233
00234
00235 KReturn(ERR_METHOD_NOT_FOUND);
00236 }
00237
00238 #endif