src/providers.c File Reference

billiger-telefonieren.de parsing functions More...

#include "../include/billigertelefonieren.h"

Include dependency graph for providers.c:


Functions

int collectProviders (int *preselection, PROVIDERARRAY *providers, char *bigbuffer, int *count, int *length)
 download provider overview and collect provider ids.
int readRateInformation (int type, int weekend, char *providers[PR_TYPES-1])
 read rate information from config file
int updateRateInformation (struct sockaddr_in *serveraddr, int type, int weekend, int preselection, PROVIDERARRAY *providerids, int count, int length, char *providers[PR_TYPES-1], int bVerbose)
 get rate information and save it into a config file

Detailed Description

billiger-telefonieren.de parsing functions

contains several functions to determine the rates from billiger-telefonieren.de (c) 2005-2007 Markus Drescher last change: 28.11.07

---------------------------------------------------------------------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ----------------------------------------------------------------------------


Function Documentation

int collectProviders ( int *  preselection,
PROVIDERARRAY *  providers,
char *  bigbuffer,
int *  count,
int *  length 
)

download provider overview and collect provider ids.

collectProviders

Parameters:
preselection pointer to an integer that will be filled with the preselection id
providers pointer to an PROVIDERARRAY struct that will be filled with the provider ids
bigbuffer result from httpRequest
count pointer to an integer that will contain the count of providers
length pointer to an integer that will contain the total length of provider ids
Returns:
-1 on failure, 0 if successful

int readRateInformation ( int  type,
int  weekend,
char *  providers[PR_TYPES-1] 
)

read rate information from config file

readRateInformation

Parameters:
type which rates should be read
weekend TRUE: rates for weekend
providers the providers for the current time
Returns:
PR_RR_ERR_SUCCESS on success
Todo:
include costs as well

int updateRateInformation ( struct sockaddr_in *  serveraddr,
int  type,
int  weekend,
int  preselection,
PROVIDERARRAY *  providerids,
int  count,
int  length,
char *  providers[PR_TYPES-1],
int  bVerbose 
)

get rate information and save it into a config file

updateRateInformation

Parameters:
serveraddr internet address of billigertelefonieren
type which rates should be updated
weekend TRUE: rates for weekend
preselection the preselected preselection rate
providerids pointer to an providerarray containing provider ids
count provider count
length total length of the provider ids
providers the wanted providers
bVerbose be verbose
Returns:
PR_UR_ERR_SUCCESS on success, errors see billigertelefonieren.h
Todo:
include costs as well

SourceForge.net Logo