settings/src/iLiadTimediDSData.h File Reference

settings - Timed-iDS connection settings data operations More...

#include <liberregxml/erregapi.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void iLiad_timedids_data_init (void)
void iLiad_timedids_data_destroy (void)
void iLiad_timedids_data_store (void)
regTimedIds_tget_current_timedids_settings (void)


Detailed Description

settings - Timed-iDS connection settings data operations

Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

Handling timed-iDS connection settings data.

Definition in file iLiadTimediDSData.h.


Function Documentation

regTimedIds_t* get_current_timedids_settings ( void   ) 

Definition at line 146 of file iLiadTimediDSData.c.

00147 {
00148     return g_timedids_settings;
00149 }

void iLiad_timedids_data_destroy ( void   ) 

Definition at line 73 of file iLiadTimediDSData.c.

00074 {
00075     ST_LOGPRINTF("entry");
00076 
00077     if (g_timedids_settings)
00078     {
00079         erRegFreeTimedIds(g_timedids_settings);
00080         g_timedids_settings = NULL;
00081     }
00082     if (g_stored_settings)
00083     {
00084         erRegFreeTimedIds(g_stored_settings);
00085         g_stored_settings = NULL;
00086     }
00087 }

Here is the call graph for this function:

void iLiad_timedids_data_init ( void   ) 

Definition at line 48 of file iLiadTimediDSData.c.

00049 {
00050     ST_LOGPRINTF("entry");
00051     
00052     iLiad_timedids_data_destroy();
00053     
00054     g_timedids_settings = erRegGetTimedIds();
00055     if (NULL == g_timedids_settings)
00056     {
00057         ST_WARNPRINTF("use default values");
00058         
00059         g_timedids_settings = g_new0(regTimedIds_t, 1);
00060         g_timedids_settings->enable = FALSE;
00061         g_timedids_settings->timeCnt = 0;
00062         g_timedids_settings->timeSet[0] = 46800;
00063         g_timedids_settings->swUpdate = FALSE;
00064         g_timedids_settings->switchOff = FALSE;
00065     }
00066     else
00067     {
00068         g_stored_settings = g_new0(regTimedIds_t, 1);
00069         *g_stored_settings = *g_timedids_settings;
00070     }
00071 }

Here is the call graph for this function:

void iLiad_timedids_data_store ( void   ) 

Definition at line 124 of file iLiadTimediDSData.c.

00125 {
00126     ST_LOGPRINTF("entry");
00127     g_return_if_fail(NULL != g_timedids_settings);
00128     
00129     // Check if anything changed
00130     if (g_stored_settings != NULL && compare_settings(g_stored_settings, g_timedids_settings))
00131     {
00132         // Nothing changed, nothing to save
00133         return;
00134     }
00135 
00136     prepare_registry_write();
00137 
00138     ST_STOREPRINTF("calling erRegSetTimediDS");
00139     erRegSetTimedIds(g_timedids_settings);
00140 
00141     *g_stored_settings = *g_timedids_settings;
00142 
00143     do_registry_write();
00144 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:17:22 2008 by  doxygen 1.5.6