tv-service  0.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tv_service_add_delete_channel_test.c

This is an example of how to use TV Service's interface to add and delete channel.

Author
Jiang Minmin min86.nosp@m..jia.nosp@m.ng@sa.nosp@m.msun.nosp@m.g.com
/* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <glib-object.h>
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include <string.h>
#include "tv_service_logger.h"
int main(int argc, char *argv[])
{
gint rc = 0;
gint service_id = 10000;
if(rc != TVS_ERROR_OK)
{
printf("tv_service_channel_info_create error %d\n",rc);
return rc;
}
rc = tv_service_add_channel(service_id);
if(rc != TVS_ERROR_OK){
printf("tv_service_add_channel is error %d\n",rc);
return rc;
}
rc = tv_service_delete_channel(service_id);
if(rc != TVS_ERROR_OK){
printf("tv_service_delete_channel is error %d\n",rc);
return rc;
}
return 0;
}