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

✨ 3 β€” CMCIClientFT.enumClasses() ✨

okay bestie, welcome to manual page 3, section 3 (dated 2005-06-09, we love a vintage moment πŸ’…). This is the one about enumerating classes and, uh, "subclasss" β€” that's a typo in the original and we're keeping it, it's iconic now πŸŽ€


🌸 NAME 🌸

CMCIClientFT.enumClasses() β€” Enumerate classes and subclasss πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <cmci.h>

CMPIEnumeration*
CMCIClientFT.enumClasses(CMCIClient*cl,
                        CMPIObjectPath* op,
                        CMPIFlags flags,
                        CMPIStatus* rc);

πŸ‘‘ DESCRIPTION πŸ‘‘

So basically: you're enumerating Classies using op as the reference. The content of the returned classes can be controled using the flags parameter. ("controled" β€” yes, one L, that's how the original rolls, we don't gatekeep spelling here 😌)

The arguments are:

  • cl β€” the client object pointer, your main character 🫢
  • op β€” the ObjectPath object pointer, and it's carrying the namespace and classname components
  • flags β€” affects the content of the returned class structure
  • rc β€” the CMPI return status, and heads up: it gets suppressed when NULL πŸ™ˆ

Now the flags argument is a bit mask, and it can contain:

  • CMPI_FLAG_LocalOnly
  • CMPI_FLAG_DeepInheritance
  • CMPI_FLAG_IncludeQualifiers
  • CMPI_FLAG_IncludeClassOrigin

four flags, no more no less, periodt ✨


πŸ”₯ RETURN VALUE πŸ”₯

When it slays (successful πŸ’…): CMCIClientFT.enumClasses() returns a pointer to a CMPIEnumeration object that contains each enumerated class, and it sets a successful status code in rc. πŸ’–

When it does not slay (unsuccessful 😭): it returns NULL and sets the rc argument with the error code and and corresponding error string. (Yes β€” "and and". It's in the source. We're preserving the and and. 🫠)


πŸ’€ ERRORS πŸ’€

nothing here bestie, this section is literally empty. no cap. it's giving mystery. πŸ•³οΈβœ¨


🌈 EXAMPLES 🌈

okay here's the whole vibe, verbatim, because code is sacred:

   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->enumClasses(cc, objectpath, 0, &status);

   if (!status.rc) {      fprintf(stderr, "operation error code %d
description %s0,                status.rc, status.msg->hdl);
     abort();
   }
ngl the formatting in that last block is doing its own thing β€” the line break inside the fprintf string and that %s0, are exactly how the original prints it, so don't come for me, come for the 2005 source πŸ˜­πŸ’€

also yes, conncetion is spelled like that up there. it's giving typo, it's giving authentic, we leave it πŸŽ€


🧚 CONFORMING TO 🧚

also empty!! the void is voiding 🫧


⭐ SEE ALSO ⭐


and that's the whole page, bestie 🫢 it came from the SFCBroker Client Library, source/version sfcc, dated 2005-06-09 β€” go forth and enumerate, you absolute icon πŸ‘‘πŸ’–βœ¨