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

πŸ’– CMCIClientFT.enumInstanceNames() πŸ’–

okay so bestie, welcome to manual section 3 🫢 this is the page for CMCIClientFT.enumInstanceNames(), dated 2005-06-09 (yes she's an elder but she still serves πŸ’…). grab a strawberry πŸ“ and let's get into it.


✨ NAME ✨

CMCIClientFT.enumInstanceNames() β€” enumerate instance names of a class πŸ‘‘


🌸 SYNOPSIS 🌸

#include <cmci.h>

CMPIEnumeration*
CMCIClientFT.enumInstanceNames(CMCIClient*cl,
               CMPIObjectPath*op,
               CMPIStatus*rc);

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does is enumerate the Instance Names of the class (and its subclasses) that op defines. that's the whole gig. she's a name-dropper, not a full-detail-dumper.

the arguments, one by one, no skipping:

  • cl β€” the client object pointer. your connection baddie.
  • op β€” an ObjectPath object pointer, and the reference inside it carries the namespace and classname components. so that's where she learns who you're asking about.
  • rc β€” this is where the operation status lands. and listen: it gets suppressed when NULL, so if you pass NULL you simply do not get a status back. your call, bestie πŸ™ˆ

⭐ RETURN VALUE ⭐

When it works out: CMCIClientFT.enumInstanceNames() hands you back a pointer to a CMPIEnumeration object, and that object contains strings for each instance name found for the class. she also sets a successful operation status code in rc. slay ✨

When it does not work out: she returns a NULL pointer and sets the operation status error code plus the corresponding error string in rc. not her finest moment but she's honest about it 😭


πŸ’€ ERRORS πŸ’€

...literally nothing here. the section exists and it is empty. no cap. πŸ«₯


πŸŽ€ EXAMPLES πŸŽ€

here's the whole vibe, verbatim, typos and all (they're part of her charm, do not touch them πŸ™ˆ):

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

if (!status.rc) {      fprintf(stderr, "operation error code %d
description %s0,                status.rc, status.msg->hdl);
  abort();
}

so: connect, build an object path for root/cimv2, call the function, and if status.rc is falsy she bails with abort(). main character energy only πŸ”₯


🌈 CONFORMING TO 🌈

also empty. nothing listed. we move πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

go read those if you want the full lore, iykyk 🧚


that's the whole page, bestie β€” you ate it. this little gem came to you from the SFCBroker Client Library, sfcc edition, page 3 dated 2005-06-09. mwah πŸ’…πŸ’–