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.associators() β€” the manual, but make it make sense πŸ’–

okay bestie, welcome to section 3 of the manual (dated 2005-06-09, yes she's vintage, she's still iconic). this is the page for CMCIClientFT.associators(), and honestly? she's giving "let me find everyone your object is connected to" energy. let's get into it πŸ’…


✨ NAME ✨

CMCIClientFT.associators() β€” Enumerate instances associated with an Instance

like, you have an Instance. you want to know who it's associated with. that's the whole gig. main character energy fr fr 🌸


✨ SYNOPSIS ✨

#include <cmci.h>

CMPIEnumeration*
CMCIClientFT.associators(CMCIClient*cl,
               CMPIObjectPath*op,
               constchar*assocClass,
               constchar*resultClass,
               constchar*role,
               constchar*resultRole,
               CMPIFlagsflags,
               char**properties,
               CMPIStatus*rc);

nine arguments. NINE. she's high maintenance but she delivers 🫢


✨ DESCRIPTION ✨

Enumerate instances associated with the Instance defined by op reference.

that's the mission statement. now let's meet the cast πŸŽ€

Arguments are:

  • the client object pointer cl β€” your ticket into the whole thing, no cap
  • an ObjectPath object pointer op with the reference that contains namespace and classname components β€” this is the Instance, the one we're finding friends for
  • assocClass β€” when it's not NULL, it's an association class name, and it's used to filter the returned set of instance objects by eliminating objects that aren't associated to the source object by an instance of this class or one of its subclasses. basically: "only keep the ones linked through this kind of association or its descendants"
  • resultClass β€” when it's not NULL, it's a valid class name, used to filter the returned set of Objects by eliminating objects that aren't an Instance of this Class or one of its subclasses. i.e. "only the ones that are this class (or a subclass) may stay βœ‹"
  • role β€” when it's not NULL, it's a valid property name, used to filter the returned set of instance objects by eliminating objects that aren't associated to the source object by an association where the source object plays the specified role, i.e. the name of the property in the association class that refers to the source object has to match the value of this parameter. so like, "the source object is playing this role in the relationship, keep only those"
  • resultRole β€” when it's not NULL, it's a valid property name, used to filter the returned set of instance objects by eliminating objects that aren't associated to the source object by an association where the returned object plays the specified role, i.e. the name of the property in the association class that refers to the returned object has to match the value of this parameter. same idea but for the object coming back out πŸ’«
  • flags β€” they affect the content of the returned class instance structures
  • a properties array β€” yep, exactly what it sounds like
  • rc β€” returns the operation status, and it's suppressed when NULL (so pass it if you want the receipts)
lowkey important: the flags argument is a bit mask that can contains the following flags β€” CMPI_FLAG_IncludeQualifiers and CMPI_FLAG_IncludeClassOrigin.

(if you're sitting there like "bestie why is that its own paragraph", because it's a bit mask and bit masks deserve their own moment, that's why πŸ’…)


✨ RETURN VALUE ✨

When successful, the CMCIClientFT.associators() function returns a pointer to a CMPIEnumeration object that contains the class instances found for the class that match the association criteria, and sets a successful operation status code in rc. slay, we ate πŸ“

When unsuccessful it returns a NULL pointer and sets the operation status error code and corresponding error string in rc. not slay. check rc, always check rc 😭


✨ ERRORS ✨

(nothing here in the original, bestie β€” the section exists, the content does not. she's mysterious like that πŸ™ˆ)


✨ EXAMPLES ✨

(also empty in the original β€” no examples were given, so i'm not gonna invent any. no cap, no guessing πŸ”₯)


✨ CONFORMING TO ✨

(the original leaves this one blank too. iconic minimalism πŸ’€)


✨ SEE ALSO ✨

go read those next, bestie, that's the syllabus πŸ“šβœ¨


and that's the page!! this one shipped as part of the SFCBroker Client Library (sfcc), and it's the section 3 entry dated 2005-06-09 β€” vintage but valid, periodt. mwah πŸ’–