Source: kalcatel/alcasync/sms.h


Annotated List
Files
Globals
Hierarchy
Index
/*
 * alcasync/sms.h
 *
 * sms reading/writing functions
 *
 * Copyright (c) 2002-2003 by Michal Cihar 
 *
 * 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 code 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.
 *
 * In addition to GNU GPL this code may be used also in non GPL programs but
 * if and only if programmer/distributor of that code receives written
 * permission from author of this code.
 *
 */
/* $Id: sms.h,v 1.12 2003/05/09 16:52:46 michal Exp $ */
#ifndef SMS_H
#define SMS_H
#include 

#define MESSAGE_UNREAD  0
#define MESSAGE_READ    1
#define MESSAGE_UNSENT  2
#define MESSAGE_SENT    3
#define MESSAGE_ALL     4

/** Structure for storing messages
  */
struct MessageData {
    /** position
      */
    int pos;
    /** status
      */
    int stat;
    /** length of raw data
      */
    int len;
    /** raw T-PDU data
      */
    char *raw;
    /** sender/receiver phone
      */
    char *sendr;
    /** date + time of sending
      */
    time_t date;
    /** latin1 text
      */
    char *ascii;
    /** SMSC (Short Message Service Centre)
      */
    char *smsc;
};

/** Deletes message
  */
int delete_message(int which);

/** Reads mssage
  */
MessageData *get_message(int which);

/** Reads mssages
  */
MessageData *get_messages(int state = MESSAGE_ALL);

/** Sends message
  */
int send_message(const char *pdu);

/** Sends message allready stored in mobile
  */
int send_message(int position);

/** Store message
  */
int put_message(const char *pdu, int state);

/** Returns SMSC (Short Messages Service Centre)
  */
char *get_smsc(void);

/** Sets SMSC (Short Messages Service Centre)
  */
void set_smsc(char *smsc);

#endif

Generated by: michal on quirk.cic on Fri May 9 19:34:14 2003, using kdoc 2.0a54.