+ // send the alert to all clients
+ for (vector<CCECClient *>::iterator it = m_clients.begin(); it != m_clients.end(); it++)
+ (*it)->Alert(type, param);
+}
+
+CCECClient *CLibCEC::RegisterClient(libcec_configuration &configuration)
+{
+ if (!m_cec)
+ return NULL;
+
+ // create a new client instance
+ CCECClient *newClient = new CCECClient(m_cec, configuration);
+ if (!newClient)
+ return NULL;
+ m_clients.push_back(newClient);
+
+ // if the default client isn't set, set it
+ if (!m_client)
+ m_client = newClient;
+
+ // register the new client
+ if (m_cec->CECInitialised())
+ m_cec->RegisterClient(newClient);
+
+ return newClient;