COSNOTIFYFILTER_FILTERADMIN(3erl)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– CosNotifyFilter_FilterAdmin πŸ’–

okay bestie, this is the Erlang module CosNotifyFilter_FilterAdmin, from the CosNotifyF...FilterAdmin(3) page of the Erlang Module Definition manual. she's giving "the friend who manages who gets to be in the group chat" energy and honestly? iconic. πŸŽ€


✨ NAME ✨

CosNotifyFilter_FilterAdmin β€” this module implements the OMG CosNotifyFilter::FilterAdmin interface. periodt. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so to actually get access to the record definitions for the structures, you're gonna do this:

-include_lib("cosNotification/include/*.hrl").

that's the magic little include that unlocks everything, no cap. πŸ”‘

and here's the vibe: all objects that inherit this interface export the functions described in this module. every single one. it's giving inheritance, it's giving main character energy, it's giving "the whole family shares the same skill set." 🌸


πŸ‘‘ EXPORTS πŸ‘‘

add_filter(Object, Filter) -> FilterID

Types:

Object = #objref
Filter = #objref
FilterID = long()

this operation connects a new Filter to the target object. 🫢 and listen, this Filter will β€” together with all the other associated Filters β€” be used to select events to forward. so she's part of the team now.

a unique Id gets returned, and bestie you should hold onto it, because that's the only way to say "okay we're done consulting this specific Filter" later. it's literally the Filter's little name tag. 🏷️✨


remove_filter(Object, FilterID) -> ok

Types:

Object = #objref
FilterID = long()

if a certain Filter should no longer be associated with the target object, this is the operation you must use. not optional, bestie, must. πŸ’€

after this, events will no longer be tested against the Filter associated with the given Id. she's out of the group chat. bye. πŸ‘‹


get_filter(Object, FilterID) -> Reply

Types:

Object = #objref
FilterID = long()
Reply = Filter | {'EXCEPTION',
#'CosNotifyFilter_FilterNotFound'{}}
Filter = #objref

if the target object is associated with a Filter matching the given Id, then the reference gets returned to you. cute. πŸŽ€

but if no such Filter is known by the target object? an exception is raised. 😭 it's giving "who?? never heard of her." be ready for it.


get_all_filters(Object) -> FilterIDSeq

Types:

Object = #objref
FilterIDSeq = [FilterID]
FilterID = long()

this operation returns the Id's for all Filter objects associated with the target object. the whole roster. the full lineup. the entire friend group, listed out. 🌈⭐


remove_all_filters(Object) -> ok

Types:

Object = #objref

if you want to remove all Filters associated with the target object, you can use this function. one call, everyone gone. it's giving spring cleaning, it's giving "new year new me", it's giving nuke the whole list. 🧹πŸ’₯


ngl this interface is lowkey just "add, remove, look up, and mass-remove" and that's the whole thing. but every function matters, fr fr. πŸ™ˆ

and that's the page, bestie!! πŸ’œ this one came from Ericsson AB, part of cosNotification version 5.2.2 β€” mwah, slay, tysm for reading, ily, go forth and filter responsibly. βœ¨πŸ¦‹πŸŽ€πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from