7 bool rv = ptr->get_item_description(index, out);
18 TRACK_CALL_TEXT(
"menu_helpers::run_command(), by GUID");
19 ptr->item_execute_simple(index, p_subcommand, data, caller);
46 unsigned displayflags = 0;
48 if (!ptr->item_get_display_data(dummystring,displayflags,index,p_subcommand,data,caller))
return false;
62 api->activeplaylist_get_selected_items(temp);
76 api->activeplaylist_get_selected_items(temp);
95 unsigned n, m = ptr->get_num_items();
98 ptr->get_item_name(n,nametemp);
99 if (!
strcmp_ex(nametemp,~0,p_name,p_name_len))
101 p_out = ptr->get_item_guid(n);
112 ptr->get_item_name(index, p_out);
123 ret += ptr->get_num_items();
140 unsigned n, m = ptr->get_num_items();
143 assert(dataptr <
m_data.get_size());
145 ptr->get_item_name(n,nametemp);
146 m_data[dataptr].m_name = _strdup(nametemp);
147 m_data[dataptr].m_guid = ptr->get_item_guid(n);
151 assert(dataptr ==
m_data.get_size());
158 return m_data[index].m_name;
181 for(n=0;n<m;n++) free(
m_data[n].m_name);
208 unsigned n, m = ptr->get_num_items();
211 assert(dataptr <
m_data.get_size());
213 ptr->get_item_name(n,nametemp);
214 m_data[dataptr].m_name = _strdup(nametemp);
215 m_data[dataptr].m_guid = ptr->get_item_guid(n);
219 assert(dataptr ==
m_data.get_size());
228 p_out =
m_data[index].m_guid;
243 for(n=0;n<m;n++) free(
m_data[n].m_name);
252 if (e.
first(ptr))
do {
255 unsigned action,num_actions = ptr->get_num_items();
256 for(action=0;action<num_actions;action++)
258 ptr->get_item_default_path(action,path); ptr->get_item_name(action,name);
259 if (!path.is_empty()) path +=
"/";
269 }
while(e.
next(ptr));
279 if (ret) p_command = item->get_item_guid(index);
286 mainmenu_commands::ptr ptr;
int SHARED_EXPORT stricmp_utf8_ex(const char *p1, t_size len1, const char *p2, t_size len2)
static bool run_main(const GUID &guid)
bool first(service_ptr_t< t_query > &p_out)
int SHARED_EXPORT stricmp_utf8(const char *p1, const char *p2)
int guid_compare(const GUID &g1, const GUID &g2)
int strcmp_ex(const char *p1, t_size n1, const char *p2, t_size n2)
virtual t_size get_count() const =0
static void sort_t(t_container &p_data, t_compare p_compare, t_size p_count)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
bool next(service_ptr_t< t_query > &p_out)
string8_t< pfc::alloc_fast_aggressive > string8_fastalloc
bool bsearch_t(t_size p_count, const t_container &p_container, t_compare p_compare, const t_param &p_param, t_size &p_index)