📄 sendsms.h
字号:
/* * gsms - threading code - calles the plugins * * Authors: Michael Jochum <e9725005@stud3.tuwien.ac.at> * Gerhard Khueny <e9625d@student.tuwien.ac.at> * TODO: * * Fixes: * * For license terms, see the file COPYING in the project directory. */#ifndef __SENDSMS_H__#define __SENDSMS_H__#include <glib.h>typedef struct { gchar *text;/* text of the message - length < 160 */ gchar *num; /* the phone number to send to */ /* format: "+<country><prov><rest>" */ gint sent; /* 0 ... not sent ; >0... ok; <0 faild */ /* it is impurtant to initalize send to 0 !!! */ gpointer user_data;} GSmsMessage;/* WARNING: Callbacks are called from threads - all gdk/gtk function calls * have to be sorrounded by gdk_threads_enter(); and * gdk_threads_leave(); * * Exactly one of the parametzers is != NULL * * messages is != NULL after the last thread finished sending * message is != NULL for each sent message. */typedef void (*GSmsSentFunc) (GSmsMessage *message, GSList *messages);/* messages is a list of GSmsMessage structures containing all sms to be sent */gpointer send_sms(GSList *messages, gint maxthreads, GSmsSentFunc callback);/* send_sms_end must be called to free used resources if no Callbacks are used break = FALSE: send_sms_end waits for all threads to finish. break = TRUE: send_sms_end aborts the sending of sms messages return: List of all messages*/GSList *send_sms_end(gpointer handle, gboolean abort);#endif /* __SENDSMS_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -