3(2005-06-09)

πŸ“¦
version 2.2.9~rc1 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

CMCIClientFT.enumInstances() β€” bestie, this is the one that enumerates instances of a class. That's the whole vibe. ✨


🌸 SYNOPSIS 🌸

#include <cmci.h>

CMPIEnumeration*
CMCIClientFT.enumInstances(CMCIClient*cl,
               CMPIObjectPath*op,
               CMPIFlagsflags,
               char**properties,
               CMPIStatus*rc);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, what this does: it enumerates the Instances of the class (and subclasses, yes, the whole family tree) that's defined by op. And the way the instance structure and the inheritance scope come out can be controled using the flags argument. like you literally get to steer it. πŸ‘‘

Now the arguments, one by one, no skips:

  • the client object pointer, cl
  • an ObjectPath object pointer op, holding the reference that contains the namespace and classname components
  • flags, which affect the content of the returned class instance structures
  • a properties array
  • and rc, which returns the operation status β€” and it gets suppressed when NULL, so if you pass NULL don't go looking for it πŸ’€

The flags argument is a bit mask that can contains the following flags:

  • CMPI_FLAG_LocalOnly
  • CMPI_FLAG_DeepInheritance
  • CMPI_FLAG_IncludeQualifiers
  • CMPI_FLAG_IncludeClassOrigin
that's four flags, all of them, counted and accounted for. no crumbs left behind πŸ“

⭐ RETURN VALUE ⭐

When it slays (successful): CMCIClientFT.enumInstances() returns a pointer to a CMPIEnumeration object that contains the class instances found for the class, and it sets a successful operation status code in rc. iconic behavior. 🫢

When it does not slay (unsuccessful): it returns a NULL pointer and sets the operation status error code plus the corresponding error string in rc. not the moment we wanted, but at least rc tells you why. 😭


πŸ’€ ERRORS πŸ’€

nothing here bestie. the section exists, the section is empty. we move. πŸ™ˆ


πŸŽ€ EXAMPLES πŸŽ€

okay this is the part where you actually see it, no cap:

          CMCIClient *cc;
          CMPIObjectPath * objectpath;
          CMPIInstance * instance;
          CMPIEnumeration * enumeration;
          CMPIStatus status;

          /* Setup a conncetion to the CIMOM */
          cc = cmciConnect("localhost", NULL, NULL, NULL, NULL, NULL);

          objectpath = newCMPIObjectPath("root/cimv2", NULL, NULL);
          enumeration = cc->ft->enumInstances(cc, objectpath, 0, NULL,
       &status);

          if (!status.rc) {      fprintf(stderr, "operation error code %d
       description %s0,                status.rc, status.msg->hdl);
            abort();
          }
copied verbatim, typos and all, because that's the assignment and I don't play with your facts πŸ’…

🌈 CONFORMING TO 🌈

also empty. also fine. also we move on. 🧚


πŸ”₯ SEE ALSO πŸ”₯


and that's the page, bestie 🫢 this came to you from the SFCBroker Client Library, version tag sfcc, dated 3(2005-06-09). yes it's from 2005 and yes it still ate. periodt. πŸ’–βœ¨