Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

node.c File Reference

#include "model.h"

Functions

int32_t aw_model_node2groups (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodeid, aw_model_node2group_t *node2group)
 Init itertator to update a node's group association for alerts. Call node2group->iter.next() until <= 0 .

int32_t aw_model_node_create (aw_model_t *model, const aw_model_userhandle_t *handle, const byte_t *name)
 Create a node record with assoc name.

int32_t aw_model_node_list (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t deleted, aw_model_node_listing_t *node_listing)
 Itertator to fill listing with data from node table. Call node_listing->iter.next() until <= 0 .

int32_t aw_model_node_list_by_nodegrp (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodegrpid, u_int32_t deleted, aw_model_node_listing_t *node_listing)
 Itertator to fill listing with data from node table for a nodegrp. Call node_listing->iter.next() until <= 0 .

int32_t aw_model_node_nodegrp_slist (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodegrpid, aw_model_node_slisting_t *node_slisting)
 Init itertator to fill listing with data from node table for nodegrp. Call node_slisting->iter.next() until <= 0 .

int32_t aw_model_node_notnodegrp_slist (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodegrpid, aw_model_node_slisting_t *node_slisting)
 Init itertator to fill listing with data from node table for nodes NOT assoc w/nodegrp. Call node_slisting->iter.next() until <= 0 .

int32_t aw_model_node_outages (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t limit, aw_model_node_listing_t *node_listing)
 Itertator to fill listing with data from node table for thos with outages. Call node_listing->iter.next() until <= 0 .

int32_t aw_model_node_query (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodeid, aw_model_node_detail_t *nodedetail)
 Fill node with data from node table.

int32_t aw_model_node_update (aw_model_t *model, const aw_model_userhandle_t *handle, const aw_model_node_detail_t *updated_nodedetail)
 Update node record.

int32_t aw_model_nodegrp2nodes (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t append, u_int32_t nodegrpid, aw_model_nodegrp2node_t *nodegrp2node)
 Init itertator to update nodegrp membership. Call nodegrp2node->iter.next() until <= 0 .

int32_t aw_model_nodegrp_apply_active (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodegrpid, u_int32_t val)
 Set active indicator for all nodes in nodegrp.

int32_t aw_model_nodegrp_apply_deleted (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodegrpid, u_int32_t val)
 Set deleted indicator for all nodes in nodegrp.

int32_t aw_model_nodegrp_create (aw_model_t *model, const aw_model_userhandle_t *handle, const byte_t *name)
 Create a nodegrp record with assoc name.

int32_t aw_model_nodegrp_list (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t deleted, aw_model_nodegrp_listing_t *nodegrp_listing)
 Itertator to fill listing with data from nodegrp table. Call nodegrp_listing->iter.next() until <= 0 .

int32_t aw_model_nodegrp_query (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t nodegrpid, aw_model_nodegrp_t *nodegrp)
 Fill nodegrp with data from nodegrp table.

int32_t aw_model_nodegrp_update (aw_model_t *model, const aw_model_userhandle_t *handle, const aw_model_nodegrp_t *updated_nodegrp)
 Update nodegrp record.


Function Documentation

int32_t aw_model_node2groups (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodeid,
aw_model_node2group_t *  node2group
) 
 

Init itertator to update a node's group association for alerts. Call node2group->iter.next() until <= 0 .

aw_model_node2groups

Parameters:
model Model object
handle Handle object for current node
groupid Group that we want to associate the nodes
node2group Iterator
Returns:
0 on data and -1 on error

int32_t aw_model_node_create (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
const byte_t *  name
) 
 

Create a node record with assoc name.

aw_model_node_create

Parameters:
model Model object
handle Handle object for current user
name Name of node
Returns:
<=0 on error, else id of node record

int32_t aw_model_node_list (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  deleted,
aw_model_node_listing_t *  node_listing
) 
 

Itertator to fill listing with data from node table. Call node_listing->iter.next() until <= 0 .

aw_model_node_list

Parameters:
model Model object
handle Handle object for current user
deleted If non-zero, then return users marked deleted
node_listing Listing object to be filled
Returns:
0 on data and -1 on error

int32_t aw_model_node_list_by_nodegrp (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodegrpid,
u_int32_t  deleted,
aw_model_node_listing_t *  node_listing
) 
 

Itertator to fill listing with data from node table for a nodegrp. Call node_listing->iter.next() until <= 0 .

aw_model_node_list_by_nodegrp

Parameters:
model Model object
handle Handle object for current user
nodegrpid The id for the nodegrp that we want to get the nodes
deleted If non-zero, then return users marked deleted
node_listing Listing object to be filled
Returns:
0 on data and -1 on error

int32_t aw_model_node_nodegrp_slist (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodegrpid,
aw_model_node_slisting_t *  node_slisting
) 
 

Init itertator to fill listing with data from node table for nodegrp. Call node_slisting->iter.next() until <= 0 .

aw_model_node_nodegrp_slist

Parameters:
model Model object
handle Handle object for current user
nodegrpid Group whose users we want to find
node_slisting Short listing object to be filled
Returns:
0 on data and -1 on error

int32_t aw_model_node_notnodegrp_slist (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodegrpid,
aw_model_node_slisting_t *  node_slisting
) 
 

Init itertator to fill listing with data from node table for nodes NOT assoc w/nodegrp. Call node_slisting->iter.next() until <= 0 .

aw_model_node_notnodegrp_slist

Parameters:
model Model object
handle Handle object for current user
nodegrpid Group that we want to find users exclusive from
node_slisting Short listing object to be filled
Returns:
0 on data and -1 on error

int32_t aw_model_node_outages (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  limit,
aw_model_node_listing_t *  node_listing
) 
 

Itertator to fill listing with data from node table for thos with outages. Call node_listing->iter.next() until <= 0 .

aw_model_node_outages

Parameters:
model Model object
handle Handle object for current user
limit Max number of rows
node_listing Listing object to be filled
Returns:
0 on data and -1 on error

int32_t aw_model_node_query (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodeid,
aw_model_node_detail_t *  nodedetail
) 
 

Fill node with data from node table.

aw_model_node_query

Parameters:
model Model object
handle Handle object for current user
nodeid Node id of record to look up
nodedetail Node object to be filled
Returns:
Non-zero on error

int32_t aw_model_node_update (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
const aw_model_node_detail_t *  updated_nodedetail
) 
 

Update node record.

aw_model_node_update

Parameters:
model Model object
handle Handle object for current user
updated_nodedetail Node object used to update record
Returns:
Non-zero on error

int32_t aw_model_nodegrp2nodes (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  append,
u_int32_t  nodegrpid,
aw_model_nodegrp2node_t *  nodegrp2node
) 
 

Init itertator to update nodegrp membership. Call nodegrp2node->iter.next() until <= 0 .

aw_model_nodegrp2nodes

Parameters:
model Model object
handle Handle object for current user
append If non-zero just append the association rather then replacing all
nodegrpid Nodegrp that we want to associate the nodes
nodegrp2node Iterator
Returns:
0 on data and -1 on error

int32_t aw_model_nodegrp_apply_active (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodegrpid,
u_int32_t  val
) 
 

Set active indicator for all nodes in nodegrp.

aw_model_nodegrp_apply_active

Parameters:
model Model object
handle Handle object for current user
nodegrpid Nodegrp id
val 1 or 0
Returns:
Non-zero on error

int32_t aw_model_nodegrp_apply_deleted (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodegrpid,
u_int32_t  val
) 
 

Set deleted indicator for all nodes in nodegrp.

aw_model_nodegrp_apply_deleted

Parameters:
model Model object
handle Handle object for current user
nodegrpid Nodegrp id
val 1 or 0
Returns:
Non-zero on error

int32_t aw_model_nodegrp_create (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
const byte_t *  name
) 
 

Create a nodegrp record with assoc name.

aw_model_nodegrp_create

Parameters:
model Model object
handle Handle object for current user
name Name of nodegrp
Returns:
<=0 on error, else id of nodegrp record

int32_t aw_model_nodegrp_list (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  deleted,
aw_model_nodegrp_listing_t *  nodegrp_listing
) 
 

Itertator to fill listing with data from nodegrp table. Call nodegrp_listing->iter.next() until <= 0 .

aw_model_nodegrp_list

Parameters:
model Model object
handle Handle object for current user
deleted If non-zero, then return users marked deleted
nodegrp_listing Listing object to be filled
Returns:
0 on data and -1 on error

int32_t aw_model_nodegrp_query (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
u_int32_t  nodegrpid,
aw_model_nodegrp_t *  nodegrp
) 
 

Fill nodegrp with data from nodegrp table.

aw_model_nodegrp_query

Parameters:
model Model object
handle Handle object for current user
nodegrpid Nodegrp id of record to look up
nodegrp Nodegrp object to be filled
Returns:
Non-zero on error

int32_t aw_model_nodegrp_update (  aw_model_t *  model,
const aw_model_userhandle_t *  handle,
const aw_model_nodegrp_t *  updated_nodegrp
) 
 

Update nodegrp record.

aw_model_nodegrp_update

Parameters:
model Model object
handle Handle object for current user
updated_nodegrp Nodegrp object used to update record
Returns:
Non-zero on error

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)