D.I.T. ( Do It Tizen! )  1.0.0
Samsung Software Membership
 All Data Structures Files Functions Macros Pages
Data Structures | Functions
OngoingNotification.h File Reference

Ongoing Notification API 를 사용하기 위해 포함해야 하는 헤더이다. More...

#include <stdbool.h>
#include <stdalign.h>
#include "dit.h"
#include <notification.h>
Include dependency graph for OngoingNotification.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  OngoingNotification
 OngoingNotification 모듈에 대한 구조체이다. OngoingNotification 모듈은 다양한 방식으로 알림을 설정 할 수 있다. More...
 
struct  OngoingNotificationExtend
 

Functions

const char * OngoingNotificationErrorCheck (int errCode)
 Ongoing Notification API에서 발생하는 Error Code들을 확인 해준다. More...
 
OngoingNotification NewOngoingNotification (void)
 새로운 OngoingNotification 객체를 생성한다. More...
 
void DestroyOngoingNotification (OngoingNotification this_gen)
 생성한 OngoingNotification 객체를 소멸 시킨다. More...
 
bool OngoingNotificationShow (OngoingNotification this_gen)
 생성한 OngoingNotification을 Notification 바에 등록한다. More...
 
bool OngoingNotificationHide (OngoingNotification this_gen)
 Notification 바에 등록되어 있는 OngoingNotification을 삭제한다. More...
 
bool setOngoingNotificationTitle (OngoingNotification this_gen, String title)
 OngoingNotification 객체의 title을 설정 한다. More...
 
bool setOngoingNotificationText (OngoingNotification this_gen, String text)
 OngoingNotification 객체의 text를 설정 한다. More...
 
bool setOngoingNotificationIcon (OngoingNotification this_gen, String imagePath)
 OngoingNotification 객체의 아이콘 이미지를 설정 한다. More...
 
bool setOngoingNotificationSound (OngoingNotification this_gen, String soundPath)
 OngoingNotification 객체의 알림음을 설정 한다. More...
 
bool setOngoingNotificationProgress (OngoingNotification this_gen, double progress)
 OngoingNotification 객체의 진행률을 설정 한다. More...
 
bool updateOngoingNotification (OngoingNotification this_gen)
 새로 설정한 OngoingNotification 객체의 정보들을 새로 적용 한다. More...
 

Detailed Description

Ongoing Notification API 를 사용하기 위해 포함해야 하는 헤더이다.

Note
Ongoing Notification의 Show / Hide / setTitle / setText / setIcon / setSound / setProgress / update Notification API를 제공한다.
See Also
Tizen Native API

Data Structure Documentation

struct OngoingNotificationExtend
Collaboration diagram for OngoingNotificationExtend:
Collaboration graph
Data Fields
String imagePath
struct _OngoingNotification Ongoingnotification
notification_h ongoingnotification_handle
String soundPath
String text
String title
bool visible

Function Documentation

void DestroyOngoingNotification ( OngoingNotification  this_gen)

생성한 OngoingNotification 객체를 소멸 시킨다.

Parameters
[in]this_gen소멸시킬 OngoingNotification 객체
[out]null
Return values
void
Note
생성한 OngoingNotification 객체를 소멸 시킨다.
OngoingNotification 객체를 사용한 후 반드시 호출해야 한다.
See Also
NewOngoingNotification
Precondition
privilege
OngoingNotification NewOngoingNotification ( void  )

새로운 OngoingNotification 객체를 생성한다.

Parameters
[in]void
[out]null
Return values
OngoingNotification
Note
새로운 OngoingNotification 객체를 생성한다.
OngoingNotification 객체를 사용하기 전에 반드시 호출해야 한다.
See Also
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationSound
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege
Warning
사용이 끝났을 때 DestroyOngoingNotification() 함수를 꼭 사용해야 한다.
OngoingNotification NewOngoingNotification (void)
{
this->Ongoingnotification.Show = OngoingNotificationShow;
this->Ongoingnotification.Hide = OngoingNotificationHide;
this->Ongoingnotification.setTitle = setOngoingNotificationTitle;
this->Ongoingnotification.setText = setOngoingNotificationText;
this->Ongoingnotification.setIcon = setOngoingNotificationIcon;
this->Ongoingnotification.setSound = setOngoingNotificationSound;
this->Ongoingnotification.setProgress = setOngoingNotificationProgress;
this->Ongoingnotification.update = updateOngoingNotification;
this->ongoingnotification_handle = notification_create (NOTIFICATION_TYPE_ONGOING);
this->title = NULL;
this->text = NULL;
this->imagePath = NULL;
this->soundPath = NULL;
this->visible = false;
notification_set_display_applist (this->ongoingnotification_handle, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
return &this->Ongoingnotification;
}

Here is the call graph for this function:

const char * OngoingNotificationErrorCheck ( int  errCode)

Ongoing Notification API에서 발생하는 Error Code들을 확인 해준다.

Parameters
[in]errCode확인 하고자 하는 Error Code
[out]null
Return values
NOTIFICATION_ERROR_NONE: Success
NOTIFICATION_ERROR_INVALID_PARAMETER: Invalid parameter
NOTIFICATION_ERROR_OUT_OF_MEMORY: Out of memory
NOTIFICATION_ERROR_IO_ERROR: I/O error
NOTIFICATION_ERROR_PERMISSION_DENIED: Permission denied
NOTIFICATION_ERROR_FROM_DB: Error from DB query
NOTIFICATION_ERROR_ALREADY_EXIST_ID: Already exist private ID
NOTIFICATION_ERROR_FROM_DBUS: Error from DBus
NOTIFICATION_ERROR_NOT_EXIST_ID: Not exist private ID
NOTIFICATION_ERROR_SERVICE_NOT_READY: No response from notification service
NOTIFICATION_ERROR_UNKNOWN: Unknown error occurred
Note
Ongoing Notification API에서 발생하는 Error Code들을 확인 해준다.
Error의 내용은 Log를 통해 출력 된다.
11가지의 Error Code들을 확인 가능 하다.
See Also
Tizen Native API Document - Notification part

Here is the caller graph for this function:

bool OngoingNotificationHide ( OngoingNotification  this_gen)

Notification 바에 등록되어 있는 OngoingNotification을 삭제한다.

Parameters
[in]this_genNotification 바에서 삭제할 OngoingNotification 객체
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
OngoingNotificationShow()를 통해 Notification 바에 등록 되어 있는 OngoingNotification을 삭제한다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationSound
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool OngoingNotificationShow ( OngoingNotification  this_gen)

생성한 OngoingNotification을 Notification 바에 등록한다.

Parameters
[in]this_genNotification 바에 등록할 OngoingNotification 객체
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
생성한 OngoingNotification을 Notification 바에 등록한다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationSound
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege
Warning
이제 막 생성한 OngoingNotification은 Icon과 Sound 값에 기본 값이 설정되어 있지만 Title과 Text는 기본 값이 없기 때문에
사용하기 전에 setOngoingNotificationTitle()setOngoingNotificationText() 을 통해 설정을 미리 해야한다.

Here is the call graph for this function:

Here is the caller graph for this function:

bool setOngoingNotificationIcon ( OngoingNotification  this_gen,
String  imagePath 
)

OngoingNotification 객체의 아이콘 이미지를 설정 한다.

Parameters
[in]this_genimage를 설정할 OngoingNotification 객체
[in]imagePathOngoingNotification의 image 파일 경로
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
OngoingNotification 객체의 아이콘 이미지를 설정 한다.
기본으로 설정된 값은 tizen logo이다.
현재 Notification 바에 등록되어 있는 OngoingNotification이라면 updateOngoingNotification()를 통해 업데이트 해야 적용된다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationSound
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool setOngoingNotificationProgress ( OngoingNotification  this_gen,
double  progress 
)

OngoingNotification 객체의 진행률을 설정 한다.

Parameters
[in]this_gen진행률을 설정할 OngoingNotification 객체
[in]progressOngoingNotification의 진행률 (0.0 ~ 1.0)
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
OngoingNotification 객체의 진행률을 설정 한다.
progress은 0.0 ~ 1.0의 값을 가진다.
현재 Notification 바에 등록되어 있는 OngoingNotification이라면 updateOngoingNotification()를 통해 업데이트 해야 적용된다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationSound
updateOngoingNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool setOngoingNotificationSound ( OngoingNotification  this_gen,
String  soundPath 
)

OngoingNotification 객체의 알림음을 설정 한다.

Parameters
[in]this_gen알림음을 설정할 OngoingNotification 객체
[in]soundPathOngoingNotification의 sound 파일 경로
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
OngoingNotification 객체의 알림음을 설정 한다.
기본으로 설정된 값은 tizen 알림 기본음이다.
현재 Notification 바에 등록되어 있는 OngoingNotification이라면 updateOngoingNotification()를 통해 업데이트 해야 적용된다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool setOngoingNotificationText ( OngoingNotification  this_gen,
String  text 
)

OngoingNotification 객체의 text를 설정 한다.

Parameters
[in]this_gentext를 설정할 OngoingNotification 객체
[in]textOngoingNotification의 text
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
OngoingNotification 객체의 text을 설정 한다.
기본으로 설정된 값은 없다.
현재 Notification 바에 등록되어 있는 OngoingNotification이라면 updateOngoingNotification()를 통해 업데이트 해야 적용된다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationIcon
setOngoingNotificationSound
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool setOngoingNotificationTitle ( OngoingNotification  this_gen,
String  title 
)

OngoingNotification 객체의 title을 설정 한다.

Parameters
[in]this_gentitle을 설정할 OngoingNotification 객체
[in]titleOngoingNotification의 title
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
OngoingNotification 객체의 title을 설정 한다.
기본으로 설정된 값은 없다.
현재 Notification 바에 등록되어 있는 OngoingNotification이라면 updateOngoingNotification()를 통해 업데이트 해야 적용된다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationSound
setOngoingNotificationProgress
updateOngoingNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool updateOngoingNotification ( OngoingNotification  this_gen)

새로 설정한 OngoingNotification 객체의 정보들을 새로 적용 한다.

Parameters
[in]this_gen정보를 새로 적용 할 OngoingNotsification 객체
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
새로 설정한 OngoingNotification 객체의 정보들을 새로 적용 한다.
현재 Notification 바에 등록되어 있는 OngoingNotification의 정보를 갱신할 때 사용한다.
See Also
NewOngoingNotification
DestroyOngoingNotification
OngoingNotificationShow
OngoingNotificationHide
setOngoingNotificationTitle
setOngoingNotificationText
setOngoingNotificationIcon
setOngoingNotificationSound
setOngoingNotificationProgress
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function: