source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/libraries/GSM/src/GSM3MobileVoiceProvider.h @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 2.8 KB
Line 
1/*
2This file is part of the GSM3 communications library for Arduino
3-- Multi-transport communications platform
4-- Fully asynchronous
5-- Includes code for the Arduino-Telefonica GSM/GPRS Shield V1
6-- Voice calls
7-- SMS
8-- TCP/IP connections
9-- HTTP basic clients
10
11This library has been developed by Telefónica Digital - PDI -
12- Physical Internet Lab, as part as its collaboration with
13Arduino and the Open Hardware Community.
14
15September-December 2012
16
17This library is free software; you can redistribute it and/or
18modify it under the terms of the GNU Lesser General Public
19License as published by the Free Software Foundation; either
20version 2.1 of the License, or (at your option) any later version.
21
22This library is distributed in the hope that it will be useful,
23but WITHOUT ANY WARRANTY; without even the implied warranty of
24MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25Lesser General Public License for more details.
26
27You should have received a copy of the GNU Lesser General Public
28License along with this library; if not, write to the Free Software
29Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
30
31The latest version of this library can always be found at
32https://github.com/BlueVia/Official-Arduino
33*/
34#ifndef _GSM3MOBILEVOICEPROVIDER_
35#define _GSM3MOBILEVOICEPROVIDER_
36
37enum GSM3_voiceCall_st { IDLE_CALL, CALLING, RECEIVINGCALL, TALKING};
38
39class GSM3MobileVoiceProvider
40{
41        public:
42               
43                /** Initialize the object relating it to the general infrastructure
44                        @param
45                        @return void
46                */
47                virtual void initialize(){};
48               
49                /** Launch a voice call
50                        @param number           Phone number to be called
51                        @return If asynchronous, returns 0. If synchronous, 1 if success, other if error
52                */
53                virtual int voiceCall(const char* number)=0;
54               
55                /** Answer a voice call
56                        @return If asynchronous, returns 0. If synchronous, 1 if success, other if error
57                */
58                virtual int answerCall()=0;
59               
60                /** Hang a voice call
61                        @return If asynchronous, returns 0. If synchronous, 1 if success, other if error
62                */
63                virtual int hangCall()=0;
64               
65                /** Retrieve phone number of caller
66                        @param buffer           Buffer for copy phone number
67                        @param bufsize          Buffer size
68                        @return If asynchronous, returns 0. If synchronous, 1 if success, other if error
69                */
70                virtual int retrieveCallingNumber(char* buffer, int bufsize)=0;
71
72                /** Returns voice call status
73                        @return voice call status
74                */
75                virtual GSM3_voiceCall_st getvoiceCallStatus()=0;
76               
77                /**     Set voice call status
78                        @param status           New status for voice call
79                */
80                virtual void setvoiceCallStatus(GSM3_voiceCall_st status)=0;
81
82                /** Get last command status
83                        @return Returns 0 if last command is still executing, 1 success, >1 error
84                */
85                virtual int ready()=0;
86};
87
88extern GSM3MobileVoiceProvider* theGSM3MobileVoiceProvider;
89
90#endif
Note: See TracBrowser for help on using the repository browser.