26#if defined(H2CORE_HAVE_OSC) || _DOXYGEN_
146 static void linkDrumkit( std::shared_ptr<H2Core::Song> pSong );
173 static void replaceDrumkitPath( std::shared_ptr<H2Core::Song> pSong,
const QString& sDrumkitPath );
280 static int OpenCallback(
const char* name,
const char* displayName,
281 const char* clientID,
char** outMsg,
294 static int SaveCallback(
char** outMsg,
void* userData );
Non session manager client implementation.
void setIsNewSession(bool bNew)
void setSessionFolderPath(const QString &sPath)
static int dereferenceDrumkit(std::shared_ptr< H2Core::Song > pSong)
Replaces a path in Song::m_sLastLoadedDrumkitPath pointing to the session folder with one pointing to...
void sendDirtyState(const bool isDirty)
Informs the NSM server whether the current H2Core::Song is modified or not.
static int OpenCallback(const char *name, const char *displayName, const char *clientID, char **outMsg, void *userData)
Callback function for the NSM server to tell Hydrogen to open a H2Core::Song.
static void printError(const QString &msg)
Custom function to print a colored error message.
static NsmClient * get_instance()
static void loadDrumkit()
Checks whether there is a drumkit present in the session folder and loads it into the H2Core::SoundLi...
static NsmClient * __instance
Object holding the current NsmClient singleton.
static void create_instance()
If __instance equals nullptr, a new NsmClient singleton will be created and stored in it.
void shutdown()
Causes the NSM client to not process events anymore.
static void copyPreferences(const char *name)
Part of OpenCallback() responsible for copying and loading the preferences.
QString getSessionFolderPath() const
nsm_client_t * m_pNsm
Stores the current instance of the NSM client.
static void linkDrumkit(std::shared_ptr< H2Core::Song > pSong)
Responsible for linking a drumkit on user or system level into the session folder and updating all co...
bool getUnderSessionManagement() const
bool getIsNewSession() const
static void replaceDrumkitPath(std::shared_ptr< H2Core::Song > pSong, const QString &sDrumkitPath)
Replaces @H2Core::Song::m_sLastLoadedDrumkitPath as well as all @H2Core::Instrument::__drumkit_path b...
static bool bNsmShutdown
Indicates whether the NsmClient::NsmProcessEvent() function should continue processing events.
void createInitialClient()
Actual setup, initialization, and registration of the NSM client.
static int SaveCallback(char **outMsg, void *userData)
Callback function for the NSM server to tell Hydrogen to save the current session.
static void printMessage(const QString &msg)
Custom function to print a colored message.
QString m_sSessionFolderPath
Folder all the content of the current session will be stored in.
bool m_bIsNewSession
Indicates whether a song file was already found in the session folder and successfully loaded or the ...
bool m_bUnderSessionManagement
To determine whether Hydrogen is under NON session management, it is not sufficient to check whether ...
pthread_t m_NsmThread
Thread the NSM client will run in.
NsmClient()
Private constructor to allow construction only via create_instance().
static void * ProcessEvent(void *data)
Event handling function of the NSM client.