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

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

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

Data Structures

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

Functions

const char * NotificationErrorCheck (int errCode)
 Notification API에서 발생하는 Error Code들을 확인 해준다. More...
 
Notification NewNotification (void)
 새로운 Notification 객체를 생성한다. More...
 
void DestroyNotification (Notification this_gen)
 생성한 Notification 객체를 소멸 시킨다. More...
 
bool NotificationShow (Notification this_gen)
 생성한 Notification을 Notification 바에 등록한다. More...
 
bool NotificationHide (Notification this_gen)
 Notification 바에 등록되어 있는 Notification을 삭제한다. More...
 
bool setNotificationTitle (Notification this_gen, String title)
 Notification 객체의 title을 설정 한다. More...
 
bool setNotificationText (Notification this_gen, String text)
 Notification 객체의 text를 설정 한다. More...
 
bool setNotificationIcon (Notification this_gen, String imagePath)
 Notification 객체의 아이콘 이미지를 설정 한다. More...
 
bool setNotificationSound (Notification this_gen, String soundPath)
 Notification 객체의 알림음을 설정 한다. More...
 
bool updateNotification (Notification this_gen)
 새로 설정한 Notification 객체의 정보들을 새로 적용 한다. More...
 

Detailed Description

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

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

Data Structure Documentation

struct NotificationExtend
Collaboration diagram for NotificationExtend:
Collaboration graph
Data Fields
String imagePath
struct _Notification notification
notification_h notification_handle
String soundPath
String text
String title
bool visible

Function Documentation

void DestroyNotification ( Notification  this_gen)

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

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

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

Parameters
[in]void
[out]null
Return values
Notification
Note
새로운 Notification 객체를 생성한다.
Notification 객체를 사용하기 전에 반드시 호출해야 한다.
See Also
DestroyNotification
NotificationShow
NotificationHide
setNotificationTitle
setNotificationText
setNotificationIcon
setNotificationSound
updateNotification
Precondition
privilege
Warning
사용이 끝났을 때 DestroyNotification() 함수를 꼭 사용해야 한다.
Notification NewNotification (void)
{
this = (NotificationExtend *)malloc (sizeof (NotificationExtend));
this->notification.Show = NotificationShow;
this->notification.Hide = NotificationHide;
this->notification.setTitle = setNotificationTitle;
this->notification.setText = setNotificationText;
this->notification.setIcon = setNotificationIcon;
this->notification.setSound = setNotificationSound;
this->notification.update = updateNotification;
this->notification_handle = notification_create (NOTIFICATION_TYPE_NOTI);
this->title = NULL;
this->text = NULL;
this->imagePath = NULL;
this->soundPath = NULL;
this->visible = false;
return &this->notification;
}

Here is the call graph for this function:

const char * NotificationErrorCheck ( int  errCode)

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
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 NotificationHide ( Notification  this_gen)

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

Parameters
[in]this_genNotification 바에서 삭제할 Notification 객체
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
NotificationShow()를 통해 Notification 바에 등록 되어 있는 Notification을 삭제한다.
See Also
NewNotification
DestroyNotification
NotificationShow
setNotificationTitle
setNotificationIcon
setNotificationSound
updateNotification
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function:

bool NotificationShow ( Notification  this_gen)

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool setNotificationIcon ( Notification  this_gen,
String  imagePath 
)

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool setNotificationSound ( Notification  this_gen,
String  soundPath 
)

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool setNotificationText ( Notification  this_gen,
String  text 
)

Notification 객체의 text를 설정 한다.

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool setNotificationTitle ( Notification  this_gen,
String  title 
)

Notification 객체의 title을 설정 한다.

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool updateNotification ( Notification  this_gen)

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

Parameters
[in]this_gen정보를 새로 적용 할 Notification 객체
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
새로 설정한 Notification 객체의 정보들을 새로 적용 한다.
현재 Notification 바에 등록되어 있는 Notification의 정보를 갱신할 때 사용한다.
See Also
NewNotification
DestroyNotification
NotificationShow
NotificationHide
setNotificationTitle
setNotificationText
setNotificationIcon
setNotificationSound
Precondition
privilege

Here is the call graph for this function:

Here is the caller graph for this function: