PromiseResult VerifyMethodsPromise(EvalContext *ctx, const Promise *pp) { Attributes a = GetMethodAttributes(ctx, pp); const Constraint *cp; Rval method_name; bool destroy_name; if ((cp = PromiseGetConstraint(pp, "usebundle"))) { method_name = cp->rval; destroy_name = false; } else { method_name = RvalNew(pp->promiser, RVAL_TYPE_SCALAR); destroy_name = true; } PromiseResult result = VerifyMethod(ctx, method_name, a, pp); if (destroy_name) { RvalDestroy(method_name); } return result; }
static void TestAgentPromises() { Promise pp = { 0 }; pp.conlist = NULL; pp.audit = NULL; printf("%d. Testing promise attribute completeness (with no desired intention)\n", ++NR); GetFilesAttributes(&pp); GetReportsAttributes(&pp); GetExecAttributes(&pp); GetProcessAttributes(&pp); GetStorageAttributes(&pp); GetClassContextAttributes(&pp); GetTopicsAttributes(&pp); GetOccurrenceAttributes(&pp); GetMethodAttributes(&pp); GetInterfacesAttributes(&pp); GetInsertionAttributes(&pp); GetDeletionAttributes(&pp); GetColumnAttributes(&pp); GetReplaceAttributes(&pp); printf(" -> All non-listed items are accounted for\n"); }
void VerifyMethodsPromise(EvalContext *ctx, Promise *pp) { Attributes a = { {0} }; a = GetMethodAttributes(ctx, pp); VerifyMethod(ctx, "usebundle", a, pp); ScopeDeleteSpecial("this", "promiser"); }
void VerifyMethodsPromise(EvalContext *ctx, Promise *pp, const ReportContext *report_context) { Attributes a = { {0} }; a = GetMethodAttributes(ctx, pp); VerifyMethod(ctx, "usebundle", a, pp, report_context); ScopeDeleteSpecialScalar("this", "promiser"); }
void VerifyMethodsPromise(Promise *pp) { Attributes a = { {0} }; a = GetMethodAttributes(pp); VerifyMethod("usebundle", a, pp); DeleteScalar("this", "promiser"); }
PromiseResult VerifyMethodsPromise(EvalContext *ctx, const Promise *pp) { Attributes a = GetMethodAttributes(ctx, pp); PromiseResult result = VerifyMethod(ctx, "usebundle", a, pp); EvalContextVariableRemoveSpecial(ctx, SPECIAL_SCOPE_THIS, "promiser"); return result; }
PromiseResult VerifyMethodsPromise(EvalContext *ctx, const Promise *pp) { Attributes a = GetMethodAttributes(ctx, pp); const Constraint *cp = PromiseGetConstraint(pp, "usebundle"); if (!cp) { Log(LOG_LEVEL_VERBOSE, "Promise had no attribute 'usebundle', cannot call method"); return PROMISE_RESULT_FAIL; } PromiseResult result = VerifyMethod(ctx, cp->rval, a, pp); return result; }
PromiseResult VerifyMethodsPromise(EvalContext *ctx, const Promise *pp) { Attributes a = GetMethodAttributes(ctx, pp); const Constraint *cp; Rval method_name; if ((cp = PromiseGetConstraint(pp, "usebundle"))) { method_name = cp->rval; } else { method_name = DefaultBundleConstraint(pp, "method"); } PromiseResult result = VerifyMethod(ctx, method_name, a, pp); return result; }