How can I get my Photon application to behave like a resource manager with attachments while still handling the user interface?
I’ve created an image processing platform based on collections of ResMgrs, therefore very flexible. Start the proper ResMgs, hook them up based on a resource manager attachment naming scheme and pump images through by writting to the first ResMgrs.
I would like to make some of these have a GUI and built in Photon. My ResMgs are built with the following snipet:
// Allocate a resource manager internal context block.
if ((g_sGlobals.g_psContext = resmgr_context_alloc (g_sGlobals.g_psDispatch)) == NULL)
// Main message loop
// Blocking on message receive
if ((g_sGlobals.g_psContext = resmgr_block(g_sGlobals.g_psContext)) == NULL)
slogf (_SLOG_SETCODE (_SLOG_SYSLOG, 0), _SLOG_ERROR,
“%s:resmgr_block - failed: %s”,
g_sGlobals.g_pcRootName, strerror (errno));
// Handle path name request
My Photon app calls PtMainLoop() for it’s message loop.