This commit is contained in:
e2002
2024-12-04 17:58:28 +03:00
parent fd6c1eafd0
commit 001fcb4b93
26 changed files with 679 additions and 110 deletions

View File

@@ -0,0 +1,62 @@
/**
* Example of a plugin.
* To connect the plugin, copy its folder to the src/plugins directory.
*/
#include "helloworld.h"
#include "../../core/options.h"
helloWorld hellow;
helloWorld::helloWorld() {
registerPlugin();
log_i("Plugin is registered");
}
void helloWorld::on_setup(){
log_i("%s called", __func__ );
}
void helloWorld::on_end_setup(){
log_i("%s called", __func__ );
}
void helloWorld::on_connect(){
log_i("%s called", __func__ );
}
void helloWorld::on_start_play(){
log_i("%s called", __func__ );
}
void helloWorld::on_stop_play(){
log_i("%s called", __func__ );
}
void helloWorld::on_track_change(){
log_i("%s called", __func__ );
}
void helloWorld::on_station_change(){
log_i("%s called", __func__ );
}
void helloWorld::on_display_queue(requestParams_t &request, bool& result){
result = true;
log_i("%s called, type=%d, payload=%d ", __func__ , request.type, request.payload);
}
void helloWorld::on_display_player(){
log_i("%s called", __func__ );
}
void helloWorld::on_ticker(){
log_i("%s called", __func__ );
}
void helloWorld::on_btn_click(controlEvt_e &btnid){
log_i("%s called, btnid=%d", __func__ , btnid);
}

View File

@@ -0,0 +1,31 @@
/**
* Example of a plugin.
* To connect the plugin, copy its folder to the src/plugins directory.
*/
#ifndef HELLOWORLD_H
#define HELLOWORLD_H
#include "../../pluginsManager/pluginsManager.h"
class helloWorld : public Plugin {
public:
helloWorld();
/**
* See src/pluginsManager/pluginsManager.h for available events
*/
void on_setup();
void on_end_setup();
void on_connect();
void on_start_play();
void on_stop_play();
void on_track_change();
void on_station_change();
void on_display_queue(requestParams_t &request, bool& result);
void on_display_player();
void on_ticker();
void on_btn_click(controlEvt_e &btnid);
};
#endif // HELLOWORLD_H