- * Tunes to next channel.
- *
- * Note that deleted channels and service channels will skipped.
- *
- * @return If the operation was sucessful 0 is returned; otherwise negative value is returned
- */
-int tv_channel_next(void)
-{
- TvServiceAntenna antenna_type;
- int service_id, r;
-
- if (!g_tv_info.live_svc) {
- _ERR("failed to get live service");
- return -1;
- }
-
- r = tv_service_live_get_antenna_type(g_tv_info.live_svc, &antenna_type);
- if (r < 0) {
- _ERR("failed to get antenna type");
- return -1;
- }
-
- r = tv_service_live_tune_up(g_tv_info.live_svc,
- TV_SERVICE_CHANNEL_MODE_DIGITAL_ANALOG, antenna_type);
- if (r < 0) {
- _ERR("failed to tune up");
- return -1;
- }
-
- g_tv_info.viewing_locked_channel = -1;
-
- r = tv_service_live_get_service_id(g_tv_info.live_svc, &service_id);
- if (r < 0) {
- _ERR("failed to get service id");
- return -1;
- }
-
- _tv_channel_add_history(service_id);
-
- return 0;
-}
-
-/**
- * Tunes to previous channel.
- *
- * Note that deleted channels and service channels will skipped.
- *
- * @return If the operation was sucessful 0 is returned; otherwise negative value is returned
- */
-int tv_channel_prev(void)
-{
- TvServiceAntenna antenna_type;
- int service_id, r;
-
- if (!g_tv_info.live_svc) {
- _ERR("failed to get live service");
- return -1;
- }
-
- r = tv_service_live_get_antenna_type(g_tv_info.live_svc, &antenna_type);
- if (r < 0) {
- _ERR("failed to get antenna type");
- return -1;
- }
-
- r = tv_service_live_tune_down(g_tv_info.live_svc,
- TV_SERVICE_CHANNEL_MODE_DIGITAL_ANALOG, antenna_type);
- if (r < 0) {
- _ERR("failed to tune down");
- return -1;
- }
-
- g_tv_info.viewing_locked_channel = -1;
-
- r = tv_service_live_get_service_id(g_tv_info.live_svc, &service_id);
- if (r < 0) {
- _ERR("failed to get service id");
- return -1;
- }
-
- _tv_channel_add_history(service_id);
-
- return 0;
-}
-
-/**