summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-12-08 14:02:33 +0900
committerCedric Bail <cedric.bail@free.fr>2013-12-08 14:02:33 +0900
commit75789bcd16ce904ad7ef507814fa12ad6a279e4a (patch)
treea68d68e553941d814f3cbb5f69c035bb360529a4
parent9f5db2d0ba504eca5416637c6d322a47a8de4b8d (diff)
lib: remove code that doesn't make sense and was caught in cross-compilation.
-rw-r--r--src/lib/etrophy.c70
-rw-r--r--src/lib/etrophy_layouts.c8
2 files changed, 31 insertions, 47 deletions
diff --git a/src/lib/etrophy.c b/src/lib/etrophy.c
index 9087134..d6f2fba 100644
--- a/src/lib/etrophy.c
+++ b/src/lib/etrophy.c
@@ -40,10 +40,6 @@
40#endif 40#endif
41#define CRIT(...) EINA_LOG_DOM_CRIT(_etrophy_log_dom, __VA_ARGS__) 41#define CRIT(...) EINA_LOG_DOM_CRIT(_etrophy_log_dom, __VA_ARGS__)
42 42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47int _etrophy_log_dom = -1; 43int _etrophy_log_dom = -1;
48static int _etrophy_init_count = 0; 44static int _etrophy_init_count = 0;
49 45
@@ -161,28 +157,28 @@ etrophy_trophy_free(Etrophy_Trophy *trophy)
161 free(trophy); 157 free(trophy);
162} 158}
163 159
164EAPI inline const char * 160EAPI const char *
165etrophy_trophy_name_get(const Etrophy_Trophy *trophy) 161etrophy_trophy_name_get(const Etrophy_Trophy *trophy)
166{ 162{
167 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, NULL); 163 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, NULL);
168 return trophy->name; 164 return trophy->name;
169} 165}
170 166
171EAPI inline const char * 167EAPI const char *
172etrophy_trophy_description_get(const Etrophy_Trophy *trophy) 168etrophy_trophy_description_get(const Etrophy_Trophy *trophy)
173{ 169{
174 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, NULL); 170 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, NULL);
175 return trophy->description; 171 return trophy->description;
176} 172}
177 173
178EAPI inline Etrophy_Trophy_Visibility 174EAPI Etrophy_Trophy_Visibility
179etrophy_trophy_visibility_get(const Etrophy_Trophy *trophy) 175etrophy_trophy_visibility_get(const Etrophy_Trophy *trophy)
180{ 176{
181 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, 0); 177 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, 0);
182 return trophy->visibility; 178 return trophy->visibility;
183} 179}
184 180
185EAPI inline void 181EAPI void
186etrophy_trophy_goal_get(const Etrophy_Trophy *trophy, unsigned int *goal, 182etrophy_trophy_goal_get(const Etrophy_Trophy *trophy, unsigned int *goal,
187 unsigned int *counter) 183 unsigned int *counter)
188{ 184{
@@ -191,14 +187,14 @@ etrophy_trophy_goal_get(const Etrophy_Trophy *trophy, unsigned int *goal,
191 if (counter) *counter = trophy->counter; 187 if (counter) *counter = trophy->counter;
192} 188}
193 189
194EAPI inline unsigned int 190EAPI unsigned int
195etrophy_trophy_points_get(const Etrophy_Trophy *trophy) 191etrophy_trophy_points_get(const Etrophy_Trophy *trophy)
196{ 192{
197 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, 0); 193 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, 0);
198 return trophy->points; 194 return trophy->points;
199} 195}
200 196
201EAPI inline void 197EAPI void
202etrophy_trophy_counter_set(Etrophy_Trophy *trophy, unsigned int value) 198etrophy_trophy_counter_set(Etrophy_Trophy *trophy, unsigned int value)
203{ 199{
204 EINA_SAFETY_ON_NULL_RETURN(trophy); 200 EINA_SAFETY_ON_NULL_RETURN(trophy);
@@ -213,7 +209,7 @@ etrophy_trophy_counter_set(Etrophy_Trophy *trophy, unsigned int value)
213 trophy->date = (unsigned int)ecore_time_unix_get(); 209 trophy->date = (unsigned int)ecore_time_unix_get();
214} 210}
215 211
216EAPI inline void 212EAPI void
217etrophy_trophy_counter_increment(Etrophy_Trophy *trophy, unsigned int value) 213etrophy_trophy_counter_increment(Etrophy_Trophy *trophy, unsigned int value)
218{ 214{
219 EINA_SAFETY_ON_NULL_RETURN(trophy); 215 EINA_SAFETY_ON_NULL_RETURN(trophy);
@@ -227,14 +223,14 @@ etrophy_trophy_counter_increment(Etrophy_Trophy *trophy, unsigned int value)
227 trophy->date = (unsigned int)ecore_time_unix_get(); 223 trophy->date = (unsigned int)ecore_time_unix_get();
228} 224}
229 225
230EAPI inline Eina_Bool 226EAPI Eina_Bool
231etrophy_trophy_earned_get(const Etrophy_Trophy *trophy) 227etrophy_trophy_earned_get(const Etrophy_Trophy *trophy)
232{ 228{
233 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, EINA_FALSE); 229 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, EINA_FALSE);
234 return trophy->goal == trophy->counter; 230 return trophy->goal == trophy->counter;
235} 231}
236 232
237EAPI inline unsigned int 233EAPI unsigned int
238etrophy_trophy_date_get(const Etrophy_Trophy *trophy) 234etrophy_trophy_date_get(const Etrophy_Trophy *trophy)
239{ 235{
240 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, 0); 236 EINA_SAFETY_ON_NULL_RETURN_VAL(trophy, 0);
@@ -296,21 +292,21 @@ etrophy_lock_free(Etrophy_Lock *lock)
296 free(lock); 292 free(lock);
297} 293}
298 294
299EAPI inline const char * 295EAPI const char *
300etrophy_lock_name_get(const Etrophy_Lock *lock) 296etrophy_lock_name_get(const Etrophy_Lock *lock)
301{ 297{
302 EINA_SAFETY_ON_NULL_RETURN_VAL(lock, NULL); 298 EINA_SAFETY_ON_NULL_RETURN_VAL(lock, NULL);
303 return lock->name; 299 return lock->name;
304} 300}
305 301
306EAPI inline Etrophy_Lock_State 302EAPI Etrophy_Lock_State
307etrophy_lock_state_get(const Etrophy_Lock *lock) 303etrophy_lock_state_get(const Etrophy_Lock *lock)
308{ 304{
309 EINA_SAFETY_ON_NULL_RETURN_VAL(lock, 0); 305 EINA_SAFETY_ON_NULL_RETURN_VAL(lock, 0);
310 return lock->state; 306 return lock->state;
311} 307}
312 308
313EAPI inline void 309EAPI void
314etrophy_lock_state_set(Etrophy_Lock *lock, Etrophy_Lock_State state) 310etrophy_lock_state_set(Etrophy_Lock *lock, Etrophy_Lock_State state)
315{ 311{
316 EINA_SAFETY_ON_NULL_RETURN(lock); 312 EINA_SAFETY_ON_NULL_RETURN(lock);
@@ -319,7 +315,7 @@ etrophy_lock_state_set(Etrophy_Lock *lock, Etrophy_Lock_State state)
319 lock->date = (unsigned int)ecore_time_unix_get(); 315 lock->date = (unsigned int)ecore_time_unix_get();
320} 316}
321 317
322EAPI inline unsigned int 318EAPI unsigned int
323etrophy_lock_date_get(const Etrophy_Lock *lock) 319etrophy_lock_date_get(const Etrophy_Lock *lock)
324{ 320{
325 EINA_SAFETY_ON_NULL_RETURN_VAL(lock, 0); 321 EINA_SAFETY_ON_NULL_RETURN_VAL(lock, 0);
@@ -380,21 +376,21 @@ etrophy_score_free(Etrophy_Score *escore)
380 free(escore); 376 free(escore);
381} 377}
382 378
383EAPI inline const char * 379EAPI const char *
384etrophy_score_player_name_get(const Etrophy_Score *escore) 380etrophy_score_player_name_get(const Etrophy_Score *escore)
385{ 381{
386 EINA_SAFETY_ON_NULL_RETURN_VAL(escore, NULL); 382 EINA_SAFETY_ON_NULL_RETURN_VAL(escore, NULL);
387 return escore->player_name; 383 return escore->player_name;
388} 384}
389 385
390EAPI inline int 386EAPI int
391etrophy_score_score_get(const Etrophy_Score *escore) 387etrophy_score_score_get(const Etrophy_Score *escore)
392{ 388{
393 EINA_SAFETY_ON_NULL_RETURN_VAL(escore, 0); 389 EINA_SAFETY_ON_NULL_RETURN_VAL(escore, 0);
394 return escore->score; 390 return escore->score;
395} 391}
396 392
397EAPI inline unsigned int 393EAPI unsigned int
398etrophy_score_date_get(const Etrophy_Score *escore) 394etrophy_score_date_get(const Etrophy_Score *escore)
399{ 395{
400 EINA_SAFETY_ON_NULL_RETURN_VAL(escore, 0); 396 EINA_SAFETY_ON_NULL_RETURN_VAL(escore, 0);
@@ -459,7 +455,7 @@ etrophy_level_free(Etrophy_Level *level)
459 free(level); 455 free(level);
460} 456}
461 457
462EAPI inline const char * 458EAPI const char *
463etrophy_level_name_get(const Etrophy_Level *level) 459etrophy_level_name_get(const Etrophy_Level *level)
464{ 460{
465 EINA_SAFETY_ON_NULL_RETURN_VAL(level, NULL); 461 EINA_SAFETY_ON_NULL_RETURN_VAL(level, NULL);
@@ -474,7 +470,7 @@ _score_cmp(const void *data1, const void *data2)
474 return escore2->score - escore1->score; 470 return escore2->score - escore1->score;
475} 471}
476 472
477EAPI inline void 473EAPI void
478etrophy_level_score_add(Etrophy_Level *level, Etrophy_Score *escore) 474etrophy_level_score_add(Etrophy_Level *level, Etrophy_Score *escore)
479{ 475{
480 EINA_SAFETY_ON_NULL_RETURN(level); 476 EINA_SAFETY_ON_NULL_RETURN(level);
@@ -482,7 +478,7 @@ etrophy_level_score_add(Etrophy_Level *level, Etrophy_Score *escore)
482 level->scores = eina_list_sorted_insert(level->scores, _score_cmp, escore); 478 level->scores = eina_list_sorted_insert(level->scores, _score_cmp, escore);
483} 479}
484 480
485EAPI inline void 481EAPI void
486etrophy_level_score_del(Etrophy_Level *level, Etrophy_Score *escore) 482etrophy_level_score_del(Etrophy_Level *level, Etrophy_Score *escore)
487{ 483{
488 EINA_SAFETY_ON_NULL_RETURN(level); 484 EINA_SAFETY_ON_NULL_RETURN(level);
@@ -499,7 +495,7 @@ etrophy_level_scores_list_clear(Etrophy_Level *level)
499 etrophy_score_free(data); 495 etrophy_score_free(data);
500} 496}
501 497
502EAPI inline const Eina_List * 498EAPI const Eina_List *
503etrophy_level_scores_list_get(const Etrophy_Level *level) 499etrophy_level_scores_list_get(const Etrophy_Level *level)
504{ 500{
505 EINA_SAFETY_ON_NULL_RETURN_VAL(level, NULL); 501 EINA_SAFETY_ON_NULL_RETURN_VAL(level, NULL);
@@ -604,7 +600,7 @@ etrophy_gamescore_free(Etrophy_Gamescore *gamescore)
604 free(gamescore); 600 free(gamescore);
605} 601}
606 602
607EAPI inline void 603EAPI void
608etrophy_gamescore_level_add(Etrophy_Gamescore *gamescore, Etrophy_Level *level) 604etrophy_gamescore_level_add(Etrophy_Gamescore *gamescore, Etrophy_Level *level)
609{ 605{
610 EINA_SAFETY_ON_NULL_RETURN(gamescore); 606 EINA_SAFETY_ON_NULL_RETURN(gamescore);
@@ -612,7 +608,7 @@ etrophy_gamescore_level_add(Etrophy_Gamescore *gamescore, Etrophy_Level *level)
612 gamescore->levels = eina_list_append(gamescore->levels, level); 608 gamescore->levels = eina_list_append(gamescore->levels, level);
613} 609}
614 610
615EAPI inline void 611EAPI void
616etrophy_gamescore_level_del(Etrophy_Gamescore *gamescore, Etrophy_Level *level) 612etrophy_gamescore_level_del(Etrophy_Gamescore *gamescore, Etrophy_Level *level)
617{ 613{
618 EINA_SAFETY_ON_NULL_RETURN(gamescore); 614 EINA_SAFETY_ON_NULL_RETURN(gamescore);
@@ -645,14 +641,14 @@ etrophy_gamescore_levels_list_clear(Etrophy_Gamescore *gamescore)
645 etrophy_level_free(data); 641 etrophy_level_free(data);
646} 642}
647 643
648EAPI inline const Eina_List * 644EAPI const Eina_List *
649etrophy_gamescore_levels_list_get(const Etrophy_Gamescore *gamescore) 645etrophy_gamescore_levels_list_get(const Etrophy_Gamescore *gamescore)
650{ 646{
651 EINA_SAFETY_ON_NULL_RETURN_VAL(gamescore, NULL); 647 EINA_SAFETY_ON_NULL_RETURN_VAL(gamescore, NULL);
652 return gamescore->levels; 648 return gamescore->levels;
653} 649}
654 650
655EAPI inline void 651EAPI void
656etrophy_gamescore_trophy_add(Etrophy_Gamescore *gamescore, Etrophy_Trophy *trophy) 652etrophy_gamescore_trophy_add(Etrophy_Gamescore *gamescore, Etrophy_Trophy *trophy)
657{ 653{
658 EINA_SAFETY_ON_NULL_RETURN(gamescore); 654 EINA_SAFETY_ON_NULL_RETURN(gamescore);
@@ -660,7 +656,7 @@ etrophy_gamescore_trophy_add(Etrophy_Gamescore *gamescore, Etrophy_Trophy *troph
660 gamescore->trophies = eina_list_append(gamescore->trophies, trophy); 656 gamescore->trophies = eina_list_append(gamescore->trophies, trophy);
661} 657}
662 658
663EAPI inline void 659EAPI void
664etrophy_gamescore_trophy_del(Etrophy_Gamescore *gamescore, Etrophy_Trophy *trophy) 660etrophy_gamescore_trophy_del(Etrophy_Gamescore *gamescore, Etrophy_Trophy *trophy)
665{ 661{
666 EINA_SAFETY_ON_NULL_RETURN(gamescore); 662 EINA_SAFETY_ON_NULL_RETURN(gamescore);
@@ -693,14 +689,14 @@ etrophy_gamescore_trophies_list_clear(Etrophy_Gamescore *gamescore)
693 etrophy_trophy_free(data); 689 etrophy_trophy_free(data);
694} 690}
695 691
696EAPI inline const Eina_List * 692EAPI const Eina_List *
697etrophy_gamescore_trophies_list_get(const Etrophy_Gamescore *gamescore) 693etrophy_gamescore_trophies_list_get(const Etrophy_Gamescore *gamescore)
698{ 694{
699 EINA_SAFETY_ON_NULL_RETURN_VAL(gamescore, NULL); 695 EINA_SAFETY_ON_NULL_RETURN_VAL(gamescore, NULL);
700 return gamescore->trophies; 696 return gamescore->trophies;
701} 697}
702 698
703EAPI inline void 699EAPI void
704etrophy_gamescore_lock_add(Etrophy_Gamescore *gamescore, Etrophy_Lock *lock) 700etrophy_gamescore_lock_add(Etrophy_Gamescore *gamescore, Etrophy_Lock *lock)
705{ 701{
706 EINA_SAFETY_ON_NULL_RETURN(gamescore); 702 EINA_SAFETY_ON_NULL_RETURN(gamescore);
@@ -708,7 +704,7 @@ etrophy_gamescore_lock_add(Etrophy_Gamescore *gamescore, Etrophy_Lock *lock)
708 gamescore->locks = eina_list_append(gamescore->locks, lock); 704 gamescore->locks = eina_list_append(gamescore->locks, lock);
709} 705}
710 706
711EAPI inline void 707EAPI void
712etrophy_gamescore_lock_del(Etrophy_Gamescore *gamescore, Etrophy_Lock *lock) 708etrophy_gamescore_lock_del(Etrophy_Gamescore *gamescore, Etrophy_Lock *lock)
713{ 709{
714 EINA_SAFETY_ON_NULL_RETURN(gamescore); 710 EINA_SAFETY_ON_NULL_RETURN(gamescore);
@@ -750,7 +746,7 @@ etrophy_gamescore_clear(Etrophy_Gamescore *gamescore)
750 etrophy_gamescore_trophies_list_clear(gamescore); 746 etrophy_gamescore_trophies_list_clear(gamescore);
751} 747}
752 748
753EAPI inline const Eina_List * 749EAPI const Eina_List *
754etrophy_gamescore_locks_list_get(const Etrophy_Gamescore *gamescore) 750etrophy_gamescore_locks_list_get(const Etrophy_Gamescore *gamescore)
755{ 751{
756 EINA_SAFETY_ON_NULL_RETURN_VAL(gamescore, NULL); 752 EINA_SAFETY_ON_NULL_RETURN_VAL(gamescore, NULL);
@@ -839,7 +835,7 @@ etrophy_gamescore_level_score_add(Etrophy_Gamescore *gamescore, const char *leve
839 return escore; 835 return escore;
840} 836}
841 837
842EAPI inline unsigned int 838EAPI unsigned int
843etrophy_gamescore_trophies_points_get(const Etrophy_Gamescore *gamescore) 839etrophy_gamescore_trophies_points_get(const Etrophy_Gamescore *gamescore)
844{ 840{
845 unsigned int points = 0; 841 unsigned int points = 0;
@@ -857,7 +853,7 @@ etrophy_gamescore_trophies_points_get(const Etrophy_Gamescore *gamescore)
857 return points; 853 return points;
858} 854}
859 855
860EAPI inline unsigned int 856EAPI unsigned int
861etrophy_gamescore_trophies_total_points_get(const Etrophy_Gamescore *gamescore) 857etrophy_gamescore_trophies_total_points_get(const Etrophy_Gamescore *gamescore)
862{ 858{
863 unsigned int points = 0; 859 unsigned int points = 0;
@@ -1042,7 +1038,3 @@ etrophy_shutdown(void)
1042 1038
1043 return _etrophy_init_count; 1039 return _etrophy_init_count;
1044} 1040}
1045
1046#ifdef __cplusplus
1047}
1048#endif
diff --git a/src/lib/etrophy_layouts.c b/src/lib/etrophy_layouts.c
index 881b8c4..28932d7 100644
--- a/src/lib/etrophy_layouts.c
+++ b/src/lib/etrophy_layouts.c
@@ -6,10 +6,6 @@
6 6
7#include "Etrophy.h" 7#include "Etrophy.h"
8 8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13static Elm_Genlist_Item_Class itc_group; 9static Elm_Genlist_Item_Class itc_group;
14static Elm_Genlist_Item_Class itc; 10static Elm_Genlist_Item_Class itc;
15 11
@@ -148,7 +144,3 @@ etrophy_locks_layout_add(Evas_Object *parent __UNUSED__, Etrophy_Gamescore *game
148 /* TODO */ 144 /* TODO */
149 return NULL; 145 return NULL;
150} 146}
151
152#ifdef __cplusplus
153}
154#endif