• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ref_release函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ref_release函数的典型用法代码示例。如果您正苦于以下问题:C++ ref_release函数的具体用法?C++ ref_release怎么用?C++ ref_release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ref_release函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: cmyth_proginfo_programid

CStdString MythProgramInfo::ProgramID()
{
    char* progId = cmyth_proginfo_programid(*m_proginfo_t);
    CStdString retval(progId);
    ref_release(progId);
    return retval;
}
开发者ID:ramamadhu,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:MythProgramInfo.cpp


示例2: cmyth_recordingrule_set_subtitle

void
cmyth_recordingrule_set_subtitle(cmyth_recordingrule_t rr, char *subtitle)
{
	if (rr->subtitle)
		ref_release(rr->subtitle);
	rr->subtitle = ref_strdup(subtitle);
}
开发者ID:Alpha13s,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例3: cmyth_recordingrule_set_storagegroup

void
cmyth_recordingrule_set_storagegroup(cmyth_recordingrule_t rr, char *storagegroup)
{
	if (rr->storagegroup)
		ref_release(rr->storagegroup);
	rr->storagegroup = ref_strdup(storagegroup);
}
开发者ID:Alpha13s,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例4: cmyth_recordingrule_set_starttime

void
cmyth_recordingrule_set_starttime(cmyth_recordingrule_t rr, time_t starttime)
{
	if (rr->starttime)
		ref_release(rr->starttime);
	rr->starttime = cmyth_timestamp_from_unixtime(starttime);
}
开发者ID:Alpha13s,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例5: cmyth_recordingrule_set_description

void
cmyth_recordingrule_set_description(cmyth_recordingrule_t rr, char *description)
{
	if (rr->description)
		ref_release(rr->description);
	rr->description = ref_strdup(description);
}
开发者ID:Alpha13s,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例6: cmyth_recordingrule_callsign

CStdString MythRecordingRule::Callsign() const
{
  char *buf = cmyth_recordingrule_callsign(*m_recordingrule_t);
  CStdString retval(buf);
  ref_release(buf);
  return retval;
}
开发者ID:Alloyed,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:MythRecordingRule.cpp


示例7: run

void run(char *conf_file) {
  struct running rr;
  struct event *sig1_ev,*sig2_ev,*sig_hup;

  evthread_use_pthreads();
  setup_running(&rr);
  register_interface_types(&rr);
  register_source_types(&rr);
  run_config(&rr,conf_file);
  start_stats_timer(&rr);
  
  ref_release(&(rr.ic_running));

  event_add(sq_consumer(rr.sq),0);
  event_add(si_consumer(rr.si),0);
  sq_release(rr.sq);
  evsignal_add(sig1_ev=evsignal_new(rr.eb,SIGINT,user_quit,&rr),0);
  evsignal_add(sig2_ev=evsignal_new(rr.eb,SIGTERM,user_quit,&rr),0);
  evsignal_add(sig_hup=evsignal_new(rr.eb,SIGHUP,hupev,&rr),0);
  rr.sigkill_timer = event_new(rr.eb,-1,EV_PERSIST,sigkill_self,&rr);
  log_info(("Starting event loop"));
  event_base_loop(rr.eb,0);
  log_info(("Event loop finished"));
  event_del(sig1_ev);
  event_del(sig2_ev);
  event_del(sig_hup);
  event_free(sig1_ev);
  event_free(sig2_ev);
  event_free(sig_hup);
  closedown(&rr);
  log_info(("Bye!"));
  config_finished();
}
开发者ID:ens-ds23,项目名称:fuse8,代码行数:33,代码来源:running.c


示例8: cmyth_mysql_query_create

/**
 * Allocate a dynamic query string to have parameters added to it
 * \param db database connection object
 * \param query_string Query string with ? placemarks for all dynamic
 * 			parameters, this is NOT copied and must therefore
 * 			remain valid for the life of the query.
 */
cmyth_mysql_query_t * 
cmyth_mysql_query_create(cmyth_database_t db, const char * query_string)
{
    cmyth_mysql_query_t * out;
    out = ref_alloc(sizeof(*out));
    if(out != NULL)
    {
	ref_set_destroy(out,query_destroy);
	out->source = out->source_pos = query_string;
	out->source_len = strlen(out->source);
	out->buf_size = out->source_len *2;
	out->buf_used = 0;
	out->db = ref_hold(db);
	out->buf = ref_alloc(out->buf_size);
	if(out->buf == NULL)
	{
	    ref_release(out);
	    out = NULL;
	}
	else
	{
	    out->buf[0] = '\0';
	}

    }
    return out;
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:34,代码来源:mysql_query.c


示例9: cmyth_recordingrule_set_profile

void
cmyth_recordingrule_set_profile(cmyth_recordingrule_t rr, char *profile)
{
	if (rr->profile)
		ref_release(rr->profile);
	rr->profile = ref_strdup(profile);
}
开发者ID:FutureCow,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例10: cmyth_mysql_query_result

MYSQL_RES *
cmyth_mysql_query_result(cmyth_mysql_query_t * query)
{
    MYSQL_RES * retval = NULL;
    int ret;
    char * query_str;
    MYSQL *mysql = cmyth_db_get_connection(query->db);
    if(mysql == NULL)
	return NULL;
    query_str = cmyth_mysql_query_string(query);
    if(query_str == NULL)
	return NULL;
    ret = mysql_query(mysql,query_str);
    ref_release(query_str);
    if(ret != 0)
    {
	 cmyth_dbg(CMYTH_DBG_ERROR, "%s: mysql_query(%s) Failed: %s\n",
				__FUNCTION__, query_str, mysql_error(mysql));
	 return NULL;
    }
    retval = mysql_store_result(mysql);
    if(retval == NULL)
    {
	 cmyth_dbg(CMYTH_DBG_ERROR, "%s: mysql_use_result Failed: %s\n",
				__FUNCTION__, query_str, mysql_error(mysql));
    }
    return retval;
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:28,代码来源:mysql_query.c


示例11: query_destroy

/**
 * Internal only! Registered as callback to de-allocate actual buffer if
 * the query is de-allocated
 * \param p pointer to the query data structure
 */
static void
query_destroy(void *p)
{
    cmyth_mysql_query_t * query = (cmyth_mysql_query_t *)p;
    if(query->buf != NULL)
    {
	ref_release(query->buf);
	query->buf = NULL;
	query->buf_size = 0;
    }
    if(query->db != NULL)
    {
	ref_release(query->db);
	query->db = NULL;
    }
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:21,代码来源:mysql_query.c


示例12: get_event

static int
get_event(char *host)
{
	struct timeval tv;
	cmyth_conn_t event;

	if ((event=cmyth_conn_connect_event(host, 6543,
					    16*1024, 4096)) == NULL) {
		return -1;
	}

	tv.tv_sec = 1;
	tv.tv_usec = 0;

	if (cmyth_event_select(event, &tv) > 0) {
		cmyth_event_t e;
		char data[128];

		memset(data, 0, sizeof(data));

		e = cmyth_event_get(event, data, sizeof(data));

		printf("Event: %d '%s'\n", e, data);
	}

	ref_release(event);

	return 0;
}
开发者ID:Ferdiand,项目名称:cmyth,代码行数:29,代码来源:mythping.c


示例13: cmyth_proginfo_pathname

CStdString MythProgramInfo::Path()
{
    char* path = cmyth_proginfo_pathname(*m_proginfo_t);
    CStdString retval(path);
    ref_release(path);
    return retval;
}
开发者ID:ramamadhu,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:MythProgramInfo.cpp


示例14: cmyth_proginfo_subtitle

CStdString MythProgramInfo::Subtitle()
{
    char* subtitle = cmyth_proginfo_subtitle(*m_proginfo_t);
    CStdString retval(subtitle);
    ref_release(subtitle);
    return retval;
}
开发者ID:ramamadhu,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:MythProgramInfo.cpp


示例15: cmyth_recordingrule_storagegroup

CStdString  MythRecordingRule::StorageGroup() const
{
  char *buf = cmyth_recordingrule_storagegroup(*m_recordingrule_t);
  CStdString retval(buf);
  ref_release(buf);
  return retval;
}
开发者ID:Alloyed,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:MythRecordingRule.cpp


示例16: cmyth_recordingrule_set_programid

void
cmyth_recordingrule_set_programid(cmyth_recordingrule_t rr, char *programid)
{
	if (rr->programid)
		ref_release(rr->programid);
	rr->programid = ref_strdup(programid);
}
开发者ID:FutureCow,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例17: cmyth_recordingrule_playgroup

CStdString  MythRecordingRule::PlaybackGroup() const
{
  char *buf = cmyth_recordingrule_playgroup(*m_recordingrule_t);
  CStdString retval(buf);
  ref_release(buf);
  return retval;
}
开发者ID:Alloyed,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:MythRecordingRule.cpp


示例18: cmyth_recordingrule_set_seriesid

void
cmyth_recordingrule_set_seriesid(cmyth_recordingrule_t rr, char *seriesid)
{
	if (rr->seriesid)
		ref_release(rr->seriesid);
	rr->seriesid = ref_strdup(seriesid);
}
开发者ID:FutureCow,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c


示例19: cmyth_chain_set_current

int
cmyth_chain_set_current(cmyth_chain_t chain, cmyth_proginfo_t prog)
{
	unsigned int i;
	int rc = -1;
	void (*callback)(cmyth_proginfo_t prog) = NULL;
	cmyth_proginfo_t cb_prog = NULL;

	if ((chain == NULL) || (prog == NULL)) {
		return -1;
	}

	pthread_mutex_lock(&chain->chain_mutex);

	for (i=0; i<chain->chain_count; i++) {
		if (cmyth_proginfo_compare(prog,
					   chain->chain_list[i]->prog) == 0) {
			chain->chain_current = i;
			callback = chain->chain_callback;
			if (callback) {
				cb_prog = ref_hold(chain->chain_list[i]->prog);
			}
			break;
		}
	}

	pthread_mutex_unlock(&chain->chain_mutex);

	if (callback && cb_prog) {
		callback(cb_prog);
		ref_release(cb_prog);
	}

	return rc;
}
开发者ID:Ferdiand,项目名称:cmyth,代码行数:35,代码来源:chain.c


示例20: cmyth_recordingrule_set_inetref

void
cmyth_recordingrule_set_inetref(cmyth_recordingrule_t rr, char *inetref)
{
	if (rr->inetref)
		ref_release(rr->inetref);
	rr->inetref = ref_strdup(inetref);
}
开发者ID:FutureCow,项目名称:xbmc-pvr-addons,代码行数:7,代码来源:recordingrule.c



注:本文中的ref_release函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ refbuf_new函数代码示例发布时间:2022-05-30
下一篇:
C++ ref_offset函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap