View Javadoc
1   /*
2    * To change this template, choose Tools | Templates
3    * and open the template in the editor.
4    */
5   
6   package net.sf.atmodem4j.core;
7   
8   /*
9    * #%L
10   * ATModem4J Core
11   * %%
12   * Copyright (C) 2009 - 2014 atmodem4j
13   * %%
14   * atmodem4j - Drivers for the AT modem - http://atmodem4j.sourceforge.net/
15   * Copyright (C) 2009-2014, atmodem4j.sf.net, and individual contributors as indicated
16   * by the @authors tag. See the copyright.txt in the distribution for a
17   * full listing of individual contributors.
18   * 
19   * This is free software; you can redistribute it and/or modify it
20   * under the terms of the GNU General Public License as
21   * published by the Free Software Foundation; either version 3 of
22   * the License, or (at your option) any later version.
23   * 
24   * This software is distributed in the hope that it will be useful,
25   * but WITHOUT ANY WARRANTY; without even the implied warranty of
26   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27   * Lesser General Public License for more details.
28   * 
29   * You should have received a copy of the GNU Lesser General Public
30   * License along with this software; if not, write to the Free
31   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
32   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
33   * #L%
34   */
35  
36  import java.io.InputStream;
37  import java.io.OutputStream;
38  import net.sf.atmodem4j.core.gsm.DefaultGsmExtention;
39  
40  /**
41   *
42   * @author aploese
43   */
44  public class ModemFactory {
45  
46      public static Modem getDefaultModem(boolean isVoice, boolean isFax, boolean isGsm) {
47          return getAtV250Modem(isVoice, isFax, isGsm);
48      }
49  
50      public static ItuV250Modem getAtV250Modem(boolean isVoice, boolean isFax, boolean isGsm) {
51          ItuV250Modem result = new ItuV250Modem();
52          if (isVoice) {
53  
54          }
55          if (isFax) {
56  
57          }
58          if (isGsm) {
59              result.setGsmExtention(new DefaultGsmExtention());
60          }
61          return result;
62      }
63  
64      public static Modem getModem(InputStream is, OutputStream os) {
65          return null;
66      }
67  
68      public static Modem getModem(String deviceName) {
69          
70          return null;
71      }
72  
73  
74  
75  }