void linphone_friend_write_to_config_file(LpConfig *config, LinphoneFriend *lf, int index){ char key[50]; char *tmp; const char *refkey; sprintf(key,"friend_%i",index); if (lf==NULL){ lp_config_clean_section(config,key); return; } if (lf->uri!=NULL){ tmp=linphone_address_as_string(lf->uri); if (tmp==NULL) { return; } lp_config_set_string(config,key,"url",tmp); ms_free(tmp); } lp_config_set_string(config,key,"pol",__policy_enum_to_str(lf->pol)); lp_config_set_int(config,key,"subscribe",lf->subscribe); lp_config_set_int(config, key, "presence_received", lf->presence_received); refkey=linphone_friend_get_ref_key(lf); if (refkey){ lp_config_set_string(config,key,"refkey",refkey); } }
StringPtr FriendAPI::getRefKey() const { CORE_MUTEX FBLOG_DEBUG("FriendAPI::getRefKey", "this=" << this); return CHARPTR_TO_STRING(linphone_friend_get_ref_key(mFriend)); }