BMLTiOSLibDelegate

@objc
public protocol BMLTiOSLibDelegate

This protocol is required for any class that wants to control an instance of BMLTiOSLib.

Only 2 of these functions are required:

  • func bmltLibInstance(_ inLibInstance: BMLTiOSLib, serverIsValid: Bool)
  • func bmltLibInstance(_ inLibInstance: BMLTiOSLib, errorOccurred error: Error)

All the rest are optional.

These are all called in the main thread.

  • REQUIRED

    Indicates whether or not the server pointed to via the URI is a valid server (the connection was successful).

    This will be called after the Root Server connection sequence has completed.

    This connection sequence consists of:

    • Determining the fundamental validity of the URI (Connects to a Root Server). The Root Server MUST run SSL (HTTPS).
    • Determining the fundamental validity of the Root Server (Correct version, supports the proper set of default keys).
    • Loading the full set of available formats (They may not all be in actual use by meetings).
    • Loading the entire set of Service bodies.
    • Loading the entire set of languages available on the Root Server.

    By the time this method has been called with serverIsValid as true, the BMLTiOSLib has the following properties set and valid:

    • searchCriteria (This will be empty and clear, but available for access).
    • distanceUnits and distanceUnitsString
    • availableMeetingValueKeys (This contains the Dictionary key strings that can access various meeting properties).
    • emailMeetingContactsEnabled (True, if the Server is set to allow emails to be sent to meeting contacts).
    • emailServiceBodyAdminsEnabled (True, if these emails will CC the Service Body Admin for that Service body, as well as the meeting contact -They may be the same email address).
    • changeDepth (The number of changes saved per meeting).
    • googleAPIKey (The API key for the Root Server -May not be useful for most other Servers).
    • delegate (That will be the object that was passed in as delegate when the instance was created).
    • rootServerURI
    • versionAsString and versionAInt
    • isAdminAvailable (True, if Semantic Administration is available).
    • defaultLocation (The Root Server’s default central location).
    • serviceBodies (This is a “flat” Array of the Service bodies, with no hierarchy).
    • hierarchicalServiceBodies (This maps out the Service bodies in the hierarchy they occupy on the Root Server, and this is just one node with children only -no parents or Service body).\ The children are all the top-level (sb_owner == 0, or “parentless”) Service bodies. The hierarchy is designed to be “crawled.”
    • allPossibleFormats (an Array of format objects available -May not all be used by the meetings).
    • availableServerLanguages (an Array of language objects).

    You can’t call any of the BMLTiOSLib communication instance methods until this callback has been invoked with a serverIsValid value of true.

    Declaration

    Swift

    func bmltLibInstance(_ inLibInstance: BMLTiOSLib, serverIsValid: Bool)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    inServerIsValid

    A Bool, true, if the server was successfully connected. If false, you must reinstantiate BMLTiOSLib. You can’t re-use the same instance.

  • REQUIRED

    Called if there is an error.

    The error String will be a key for localization, and will be pretty much worthless on its own.

    Declaration

    Swift

    func bmltLibInstance(_ inLibInstance: BMLTiOSLib, errorOccurred error: Error)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    error

    The error that occurred.

  • OPTIONAL

    Returns the result of a meeting search.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, meetingSearchResults: [BMLTiOSLibMeetingNode])

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    meetingSearchResults

    An array of meeting objects, representing the results of a search.

  • OPTIONAL

    Returns the result of a format search.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, formatSearchResults: [BMLTiOSLibFormatNode], isAllUsedFormats: Bool)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    formatSearchResults

    An array of format objects.

    isAllUsedFormats

    This is true, if this is the “all used formats” call, where we generate objects that reflect the formats actually used by any meetings in the entire database (as opposed to simply “available, but not used”).

  • OPTIONAL

    Returns the result of a change list request.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, changeListResults: [BMLTiOSLibChangeNode])

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    changeListResults

    An array of change objects.

  • OPTIONAL

    Returns the result of a change list request for deleted-only meetings.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, deletedChangeListResults: [BMLTiOSLibChangeNode])

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    deletedChangeListResults

    An array of change objects.

  • OPTIONAL

    Indicates whether or not a Semantic Admin log in or out occurred.

    This actually is called when the login state changes (or doesn’t change when change is expected). This is called in response to a login or logout. It is always called, even if the login state did not change.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, loginChangedTo: Bool)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    loginChangedTo

    A Bool, true, if the session is currently connected.

  • OPTIONAL

    Called when a new meeting has been added, or a deleted meeting has been restored.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, newMeetingAdded: BMLTiOSLibEditableMeetingNode)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    newMeetingAdded

    Meeting object.

  • OPTIONAL

    Called when a meeting has been rolled back to a previous version.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, meetingRolledback: BMLTiOSLibEditableMeetingNode)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    meetingRolledback

    Meeting object.

  • OPTIONAL

    Called when a meeting has been edited.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, adminMeetingChangeComplete: BMLTiOSLibChangedMeeting!)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    adminMeetingChangeComplete

    If successful, this will be the changes made to the meeting. nil, if failed.

  • OPTIONAL

    Called when a new meeting has been deleted.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, deleteMeetingSuccessful: Bool)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    deleteMeetingSuccessful

    true, if the operation was successful.

  • OPTIONAL

    Called when a message has been sent to a meeting contact.

    Declaration

    Swift

    @objc
    optional func bmltLibInstance(_ inLibInstance: BMLTiOSLib, sendMessageSuccessful: Bool)

    Parameters

    inLibInstance

    the BMLTiOSLib instance.

    sendMessageSuccessful

    true, if the operation was successful.