Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

attn_dml_prv.h File Reference


Detailed Description

ALP Attention DML private definitions.

#include <hiker/syspaths.h>

Go to the source code of this file.

Data Structures

struct  _AlpAttnDmlStatementType
struct  _AlpAttnBaseType
struct  _AlpAttnPropType
struct  _AlpAttnPropListType
struct  _AlpAttnAlertType

Defines

#define kAttnRootDirectory   "/"
#define kAttnDefDBDirectory   ALP_SYSPATH_SYSTEM_CACHE "attnmgr"
#define kAttnDefDBFileName   "attn_mgr.db"
#define kAttnResourceDirectory   ALP_SYSPATH_ETC "attnmgr"
#define kAttnSchemaResourceFileName   "AttnSchema.sql"
#define kAttnDefPriority   3
#define kAttnDefDuration   0
#define kAttnDefUserId   65534
#define kAttnDefGroupId   65534
#define kAttnDefPending   true
#define kAttnDefAttributes   0
#define kAttnDefAlertLuid   0
#define kAttnDefTimestamp   0
#define kAttnDefPropType   G_TYPE_NONE
#define kAttnTimestampFormat   "%Y-%m-%d %H:%M:%S"
#define kAttnAlertsTableName   "ALERTS"
#define kAttnPropsTableName   "PROPERTIES"
#define kAttnAlertNameAlertLuid   "AlertLUID"
#define kAttnAlertNameSource   "Source"
#define kAttnAlertNameName   "Name"
#define kAttnAlertNameHandle   "Handle"
#define kAttnAlertNamePriority   "Priority"
#define kAttnAlertNameDuration   "Duration"
#define kAttnAlertNamePending   "Pending"
#define kAttnAlertNameAttributes   "Attributes"
#define kAttnAlertNameUserId   "UserID"
#define kAttnAlertNameGroupId   "GroupID"
#define kAttnAlertNameCreated   "Created"
#define kAttnAlertNameUpdated   "Updated"
#define kAttnAlertFields
#define kAttnAlertColAlertLuid   0
#define kAttnAlertColSource   1
#define kAttnAlertColName   2
#define kAttnAlertColHandle   3
#define kAttnAlertColPriority   4
#define kAttnAlertColDuration   5
#define kAttnAlertColPending   6
#define kAttnAlertColAttributes   7
#define kAttnAlertColUserId   8
#define kAttnAlertColGroupId   9
#define kAttnAlertColCreated   10
#define kAttnAlertColUpdated   11
#define kAttnPropNamePropLuid   "PropLUID"
#define kAttnPropNameAlertLuid   "AlertLUID"
#define kAttnPropNameName   "Name"
#define kAttnPropNameType   "Type"
#define kAttnPropNameValue   "Value"
#define kAttnPropFields
#define kAttnPropColPropLuid   0
#define kAttnPropColAlertLuid   1
#define kAttnPropColName   2
#define kAttnPropColType   3
#define kAttnPropColValue   4

Typedefs

typedef _AlpAttnDmlStatementType AlpAttnDmlStatementType
typedef _AlpAttnBaseType AlpAttnBaseType
 base type for all other item types
typedef _AlpAttnPropType AlpAttnPropType
 for attention PROPERTIES table
typedef _AlpAttnPropListType AlpAttnPropListType
 for attention PROPERTY LIST
typedef _AlpAttnAlertType AlpAttnAlertType
 for attention ALERT table

Functions

alp_status_t alp_prv_attn_dml_create_database (const char *dbpath)
 Create attention database.
alp_status_t alp_prv_attn_dml_init_database (const char *dbpath)
 Initialize attention manager database.
alp_status_t alp_prv_attn_dml_convert_sal_error (alp_status_t salError)
 Translate SAL errors to Attention error codes.
alp_status_t alp_prv_attn_dml_validate_luid (AlpDmlH dmlH, AlpAttnDmlItemType itemType, AlpLuid luid)
 Verify that the specified LUID exists as an alertLUID in the ALERTS table.
char * alp_prv_attn_dml_get_order_string (AlpAttnDmlOrderByType orderBy)


Define Documentation

#define kAttnAlertColAlertLuid   0
 

#define kAttnAlertColAttributes   7
 

#define kAttnAlertColCreated   10
 

#define kAttnAlertColDuration   5
 

#define kAttnAlertColGroupId   9
 

#define kAttnAlertColHandle   3
 

#define kAttnAlertColName   2
 

#define kAttnAlertColPending   6
 

#define kAttnAlertColPriority   4
 

#define kAttnAlertColSource   1
 

#define kAttnAlertColUpdated   11
 

#define kAttnAlertColUserId   8
 

#define kAttnAlertFields
 

Value:

#define kAttnAlertNameAlertLuid   "AlertLUID"
 

#define kAttnAlertNameAttributes   "Attributes"
 

#define kAttnAlertNameCreated   "Created"
 

#define kAttnAlertNameDuration   "Duration"
 

#define kAttnAlertNameGroupId   "GroupID"
 

#define kAttnAlertNameHandle   "Handle"
 

#define kAttnAlertNameName   "Name"
 

#define kAttnAlertNamePending   "Pending"
 

#define kAttnAlertNamePriority   "Priority"
 

#define kAttnAlertNameSource   "Source"
 

#define kAttnAlertNameUpdated   "Updated"
 

#define kAttnAlertNameUserId   "UserID"
 

#define kAttnAlertsTableName   "ALERTS"
 

#define kAttnDefAlertLuid   0
 

#define kAttnDefAttributes   0
 

#define kAttnDefDBDirectory   ALP_SYSPATH_SYSTEM_CACHE "attnmgr"
 

#define kAttnDefDBFileName   "attn_mgr.db"
 

#define kAttnDefDuration   0
 

#define kAttnDefGroupId   65534
 

#define kAttnDefPending   true
 

#define kAttnDefPriority   3
 

#define kAttnDefPropType   G_TYPE_NONE
 

#define kAttnDefTimestamp   0
 

#define kAttnDefUserId   65534
 

#define kAttnPropColAlertLuid   1
 

#define kAttnPropColName   2
 

#define kAttnPropColPropLuid   0
 

#define kAttnPropColType   3
 

#define kAttnPropColValue   4
 

#define kAttnPropFields
 

Value:

#define kAttnPropNameAlertLuid   "AlertLUID"
 

#define kAttnPropNameName   "Name"
 

#define kAttnPropNamePropLuid   "PropLUID"
 

#define kAttnPropNameType   "Type"
 

#define kAttnPropNameValue   "Value"
 

#define kAttnPropsTableName   "PROPERTIES"
 

#define kAttnResourceDirectory   ALP_SYSPATH_ETC "attnmgr"
 

#define kAttnRootDirectory   "/"
 

#define kAttnSchemaResourceFileName   "AttnSchema.sql"
 

#define kAttnTimestampFormat   "%Y-%m-%d %H:%M:%S"
 


Typedef Documentation

typedef struct _AlpAttnAlertType AlpAttnAlertType
 

for attention ALERT table

typedef struct _AlpAttnBaseType AlpAttnBaseType
 

base type for all other item types

typedef struct _AlpAttnDmlStatementType AlpAttnDmlStatementType
 

typedef struct _AlpAttnPropListType AlpAttnPropListType
 

for attention PROPERTY LIST

typedef struct _AlpAttnPropType AlpAttnPropType
 

for attention PROPERTIES table


Function Documentation

alp_status_t alp_prv_attn_dml_convert_sal_error alp_status_t  salError  ) 
 

Translate SAL errors to Attention error codes.

alp_status_t alp_prv_attn_dml_create_database const char *  db_pathname  ) 
 

Create attention database.

Called by the database initialize routine to (re) create database should it not exist or be corrupted.

Parameters:
[in] db_pathname desired pathname of database

char* alp_prv_attn_dml_get_order_string AlpAttnDmlOrderByType  orderBy  ) 
 

alp_status_t alp_prv_attn_dml_init_database const char *  db_pathname  ) 
 

Initialize attention manager database.

Called by the attention manager daemon to verify the existence and integrity of the database.

Parameters:
[in] db_pathname desired pathname of database
Returns:
ALP_STATUS_OK if database exists and is valid

alp_status_t alp_prv_attn_dml_validate_luid AlpDmlH  dmlH,
AlpAttnDmlItemType  itemType,
AlpLuid  luid
 

Verify that the specified LUID exists as an alertLUID in the ALERTS table.

Parameters:
[in] an AlpDmlH handle for the data model
[in] an AlpLuid for the alertLuid to be verified.
Returns:
alp_status_t


Generated on Sat Dec 16 20:29:48 2006 for hiker-0.9 by  doxygen 1.4.4