#include <stdlib.h>
#include <string.h>
+#include <AppCommon.h>
#include "dbg.h"
#include "i18n.h"
#include "album_info.h"
bool CAlbumInfo::Create()
{
- if (m)
- return false;
+ ASSERT(!m);
m = new SAlbumInfo();
if (!m) {
void CAlbumInfo::Destroy()
{
- if (!m)
- return;
+ ASSERT(m);
CExtNameInfo::Destroy();
char *CAlbumInfo::Artist()
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->artist;
}
char *CAlbumInfo::Genre()
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->genre;
}
int CAlbumInfo::SongCount()
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->songCount;
}
int CAlbumInfo::AlbumId()
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->albumId;
}
bool CAlbumInfo::SetArtist(const char *artist)
{
- if (!m)
- return false;
+ ASSERT(m);
delete[] m->artist;
m->artist = NULL;
bool CAlbumInfo::SetGenre(const char *genre)
{
- if (!m)
- return false;
+ ASSERT(m);
delete[] m->genre;
m->genre = NULL;
bool CAlbumInfo::SetSongCount(int songCount)
{
- if (!m)
- return false;
+ ASSERT(m);
m->songCount = songCount;
bool CAlbumInfo::SetAlbumId(int albumId)
{
- if (!m)
- return false;
+ ASSERT(m);
m->albumId = albumId;
bool CAlbumInfo::Duplicate(CNameInfo *obj)
{
- if (!m)
- return false;
+ ASSERT(m);
CAlbumInfo* dst = (CAlbumInfo*)obj;
#include <stdlib.h>
#include <string.h>
#include <Eina.h>
+#include <AppCommon.h>
#include "dbg.h"
#include "i18n.h"
#include "define.h"
bool CCategoryInfo::Create(void)
{
- if (m)
- return false;
+ ASSERT(!m);
m = new SCategoryInfo();
if (!m) {
void CCategoryInfo::Destroy(void)
{
+ ASSERT(m);
+
CListMember *item;
void *obj;
- if (!m)
- return;
-
CExtNameInfo::Destroy();
eina_list_free(m->albumList);
int CCategoryInfo::CategoryId(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->categoryId;
}
int CCategoryInfo::AlbumCount(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->albumCount;
}
int CCategoryInfo::SongCount(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->songCount;
}
Eina_List *CCategoryInfo::AlbumList(void)
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->albumList;
}
Eina_List *CCategoryInfo::MemberList(void)
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->memberList;
}
bool CCategoryInfo::SetCategoryId(int categoryId)
{
- if (!m)
- return false;
+ ASSERT(m);
m->categoryId = categoryId;
bool CCategoryInfo::SetAlbumCount(int albumCount)
{
- if (!m)
- return false;
+ ASSERT(m);
m->albumCount = albumCount;
bool CCategoryInfo::SetSongCount(int songCount)
{
- if (!m)
- return false;
+ ASSERT(m);
m->songCount = songCount;
bool CCategoryInfo::SetAlbumInfo(CAlbumInfo *albumInfo)
{
- if (!m)
- return false;
+ ASSERT(m);
m->albumList = eina_list_append(m->albumList, albumInfo);
bool CCategoryInfo::SetMember(CListMember *member)
{
- if (!m)
- return false;
+ ASSERT(m);
m->memberList = eina_list_append(m->memberList, member);
bool CCategoryInfo::Duplicate(CNameInfo *obj)
{
- if (!m)
- return false;
+ ASSERT(m);
CCategoryInfo* dst = (CCategoryInfo*)obj;
#include <stdlib.h>
#include <string.h>
+#include <AppCommon.h>
#include "dbg.h"
#include "i18n.h"
#include <NameInfo.h>
bool CFolderInfo::Create(void)
{
- if (m)
- return false;
+ ASSERT(!m);
m = new SFolderInfo();
if (!m) {
void CFolderInfo::Destroy(void)
{
- if (!m)
- return;
+ ASSERT(m);
CNameInfo::Destroy();
delete m;
int CFolderInfo::Count(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->count;
}
int CFolderInfo::Duration(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->duration;
}
bool CFolderInfo::SetCount(int count)
{
- if (!m)
- return false;
+ ASSERT(m);
m->count = count;
bool CFolderInfo::SetDuration(int duration)
{
- if (!m)
- return false;
+ ASSERT(m);
m->duration = duration;
bool CFolderInfo::Duplicate(CNameInfo *obj)
{
- if (!m)
- return false;
+ ASSERT(m);
CFolderInfo* dst = (CFolderInfo*)obj;
bool CSongInfo::Create(void)
{
- if (m)
- return false;
+ ASSERT(!m);
m = new SSongInfo();
if (!m) {
void CSongInfo::Destroy(void)
{
- if (!m)
- return;
+ ASSERT(m);
CExtNameInfo::Destroy();
int CSongInfo::MemberId(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->memberId;
}
char *CSongInfo::Artist(void)
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->artist;
}
char *CSongInfo::Genre(void)
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->genre;
}
char *CSongInfo::Album(void)
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->album;
}
char *CSongInfo::Composer(void)
{
- if (!m)
- return NULL;
+ ASSERT(m);
return m->composer;
}
int CSongInfo::Type(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->type;
}
int CSongInfo::Duration(void)
{
- if (!m)
- return 0;
+ ASSERT(m);
return m->duration;
}
bool CSongInfo::SetMemberId(int memberId)
{
- if (!m)
- return false;
+ ASSERT(m);
m->memberId = memberId;
bool CSongInfo::SetArtist(const char *artist)
{
- if (!m)
- return false;
+ ASSERT(m);
delete[] m->artist;
m->artist = NULL;
bool CSongInfo::SetGenre(const char *genre)
{
- if (!m)
- return false;
+ ASSERT(m);
delete[] m->genre;
m->genre = NULL;
bool CSongInfo::SetAlbum(const char *album)
{
- if (!m)
- return false;
+ ASSERT(m);
delete[] m->album;
m->album = NULL;
bool CSongInfo::SetComposer(const char *composer)
{
- if (!m)
- return false;
+ ASSERT(m);
delete[] m->composer;
m->composer = NULL;
bool CSongInfo::SetType(int type)
{
- if (!m)
- return false;
+ ASSERT(m);
m->type = type;
bool CSongInfo::SetDuration(int duration)
{
- if (!m)
- return false;
+ ASSERT(m);
m->duration = duration;
bool CSongInfo::Duplicate(CNameInfo *obj)
{
- if (!m)
- return false;
+ ASSERT(m);
CSongInfo* dst = (CSongInfo*)obj;
Evas_Object *group_btn[TOTAL_GROUP_BTNS];
Evas_Object *srcbtn;
Evas_Object *sortbtn;
- CCtxPopup *ctxpopup;
+ CSortCtxPopup *sortCtxPopup;
+ CSourceCtxPopup *srcCtxPopup;
Evas_Object *popup;
Elm_Transit *transit;
Evas_Object *c_grpbtn;
void CMusicBaseView::m_CreateCtxPopup(int btnType)
{
- CCtxPopup *ctxPopup = NULL;
const char *layout_id = NULL;
CCtxPopup::SCallback cb;
cb.onSelected = sm_CbCtxPopupBtnSelected;
m->btntype = btnType;
srcCtxPopup = new CSourceCtxPopup;
srcCtxPopup->Create(m->base, &cb);
- ctxPopup = srcCtxPopup;
+
+ m->srcCtxPopup = srcCtxPopup;
}
else if (btnType == BTN_SORT) {
CSortCtxPopup *sortCtxPopup = NULL;
}
sortCtxPopup->Create(m->base, &cb, sortBtnType);
- ctxPopup = sortCtxPopup;
+ m->sortCtxPopup = sortCtxPopup;
}
else {
_ERR("MUST NOT BE HERE!!");
ASSERT(0);
return;
}
-
- m->ctxpopup = ctxPopup;
}
void CMusicBaseView::m_DestroyCtxPopup(void)
{
- if (!m->ctxpopup)
- return;
+ if (m->sortCtxPopup && m->sortCtxPopup->FlagCreate())
+ m->sortCtxPopup->Destroy();
+
+ delete m->sortCtxPopup;
+ m->sortCtxPopup = NULL;
- if (m->ctxpopup->FlagCreate())
- m->ctxpopup->Destroy();
+ if (m->srcCtxPopup && m->srcCtxPopup->FlagCreate())
+ m->srcCtxPopup->Destroy();
- delete m->ctxpopup;
- m->ctxpopup = NULL;
+ delete m->srcCtxPopup;
+ m->srcCtxPopup = NULL;
}