//! Returns TRUE if the Client Controller Interface is connected, else returns FALSE public static bool isConnected() { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.isConnected()); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.isConnected()); } return(false); }
/** * Dispatch an event with a username and message * * @param string username dispatch to the peer with string username * @param string message ddispatch to the peer with string message * @return zero upon success, otherwise an error code is returned. */ public static int dispatchEvent(string username, string message) { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.dispatchEvent(username, message)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.dispatchEvent(username, message)); } return(-1); }
/** * Stop the Client Controller Interface * * @return zero upon success, otherwise an error code is returned. */ public static int stopInterface() { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.stopInterface()); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.stopInterface()); } return(-1); }
/** * Collect the unique machine identifier * * @param StringBuilder id buffer to load unique identifier into * @param uint idCapacity size of the id buffer * @return zero upon success, otherwise an error code is returned. */ public static int getUniqueDeviceIdenifier(StringBuilder id, uint idCapacity) { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.getUniqueDeviceIdenifier(id, idCapacity)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.getUniqueDeviceIdenifier(id, idCapacity)); } return(-1); }
//! Returns TRUE if there are more status changes, else returns FALSE public static bool hasMoreStatusChanges() { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.hasMoreStatusChanges()); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.hasMoreStatusChanges()); } return(false); }
/** * Returns the next event username and message string by reference using the buffers * supplied as arguments. * * @param StringBuilder username the name of the user * @param uint usernameCapacity the unsigned integer string capacity * @param StringBuilder message the message from the user * @param uint messageCapacity the unsigned integer string capacity * @return zero upon success, otherwise an error code is returned. */ public static int getNextEvent(StringBuilder username, uint usernameCapacity, StringBuilder message, uint messageCapacity) { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.getNextEvent(username, usernameCapacity, message, messageCapacity)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.getNextEvent(username, usernameCapacity, message, messageCapacity)); } return(-1); }
public static int accessWindow(StringBuilder id, uint idCapacity) { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.accessWindow(id, idCapacity)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.accessWindow(id, idCapacity)); } return(-1); }
/** * Get the next status change * * @param int status pass the status integer value by reference * @return zero upon success, otherwise an error code is returned. */ public static int getNextStatusChange(out int status) { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.getNextStatusChange(out status)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.getNextStatusChange(out status)); } status = -1; return(-1); }
/** * Get the next Presence event * * @param StringBuilder username the name of the user * @param uint usernameCapacity the unsigned integer string capacity * @param StringBuilder message the message from the user * @param int presence pass the presence integer value by reference * @return zero upon success, otherwise an error code is returned. */ public static int getNextPresenceEvent(StringBuilder username, uint usernameCapacity, out int presence) { if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.getNextPresenceEvent(username, usernameCapacity, out presence)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.getNextPresenceEvent(username, usernameCapacity, out presence)); } presence = -1; return(-1); }
/** * Start the Client Controller Interface with the given host name * * @return zero upon success, otherwise an error code is returned. */ public static int startClientInterface(string hostname = "") { if (hostname.Equals("")) { hostname = "esc-game-server.local"; } if (RuntimePlatform.OSXEditor == Application.platform || RuntimePlatform.OSXPlayer == Application.platform) { return(ControllerInterface_desktop.startClientInterface(hostname)); } else if (RuntimePlatform.IPhonePlayer == Application.platform) { return(ControllerInterface_mobile.startClientInterface(hostname)); } return(-1); }