summaryrefslogtreecommitdiffstats
path: root/gatchat/gatserver.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-24Refactor: Simplify parsing logicDenis Kenzior1-14/+1
It isn't actually necessary to check the basic command prefixes, if the extended prefix doesn't match we try to parse it like a basic command. That one does the same exact check anyway. If that fails, then this is not a recognized command line anyway.
2010-03-24Refactor basic command parsingDenis Kenzior1-59/+46
Make more bullet proof and efficient
2010-03-24Style: foo[0] is preferable to *fooDenis Kenzior1-2/+2
2010-03-24Fix: Be more paranoid in basic command parsingDenis Kenzior1-6/+21
2010-03-24Add basic command parsingZhenhua Zhang1-1/+111
2010-03-22Fix: extract line should use S3, not hardcode CRDenis Kenzior1-3/+4
2010-03-22Refactor: Command line extractionDenis Kenzior1-4/+10
2010-03-22Refactor: Extended command parsingDenis Kenzior1-114/+93
Make the code more bullet proof and easier to follow
2010-03-22Add g_at_server_register and unregister callbackZhenhua Zhang1-0/+48
2010-03-22Add notify at command callbackZhenhua Zhang1-0/+48
2010-03-22Add server at command data structureZhenhua Zhang1-0/+27
2010-03-22Add extended command parsingZhenhua Zhang1-2/+69
2010-03-22Add framework of server parserZhenhua Zhang1-20/+26
a. The parser fetch and parse one command per loop. The prefix is the command prefix without parameter. For example, the prefix of "AT+CLIP=1" is "+CLIP". b. Search registered notification node in command_list. Invoke the callback if found. c. Termiate the execution if the result is an error. Otherwise, parse next command.
2010-03-18Fix: Echo everything as soon as receivedDenis Kenzior1-4/+5
2010-03-18Refactor add is_basic_command_prefix functionZhenhua Zhang1-2/+13
2010-03-18Rename parse_v250_settingsZhenhua Zhang1-2/+2
To parse_basic_command
2010-03-18Rename parse_at_commandZhenhua Zhang1-2/+2
To parse_extended_command
2010-03-18Rename is_at_command_prefixZhenhua Zhang1-2/+2
To is_extended_command_prefix
2010-03-18Rename g_at_server_send_resultZhenhua Zhang1-8/+8
To g_at_server_send_final
2010-03-03Fix: Use the proper enum typeDenis Kenzior1-1/+1
2010-03-03Add command echo back if ATE=1Zhenhua Zhang1-0/+3
2010-02-26Fix: Simplify write-again logicDenis Kenzior1-6/+3
2010-02-26Fix: Don't allocate buffers if we don't need toDenis Kenzior1-1/+6
2010-02-26Add write server response into non-blocking IOZhenhua Zhang1-0/+66
Write server response into non-blocking GIOChannel when we have G_IO_OUT signal.
2010-02-26Add write buffer queue for non-blocking writeZhenhua Zhang1-10/+95
The head of the queue is the data to be written, the tail is the free buffer to cache data into. If the tail of queue is full, allocate a new free buffer and append it at the tail.
2010-02-26Add define for read and write buffer sizeZhenhua Zhang1-1/+3
2010-02-26Do not trigger user disconnect at g_at_shutdownZhenhua Zhang1-14/+28
Similar to gatchat, introduce read_watcher_destroy_notify and do not trigger user disconnect at g_at_shutdown. Delay destroy of gatserver until read_watcher is destroyed.
2010-02-10Rename server_io to channelZhenhua Zhang1-6/+6
To make it consistent with GAtChat.
2010-02-10Replace sprintf with snprintfZhenhua Zhang1-2/+3
2010-02-10Rename buf to read_buf in GAtServerZhenhua Zhang1-27/+27
Because we may introduce write_buf for sever response buffer.
2010-02-02Fix change state immediately when meet the slashZhenhua Zhang1-15/+5
According to V.250 spec section 5.2.4 Repeating a command line, if the prefix "A/" or "a/" is received, we should execute the last command immediately. No need to meet \r.
2010-02-01Fix: Remove unused labelDenis Kenzior1-1/+0
2010-02-01Fix: Skip whitespace in AT command lineDenis Kenzior1-5/+33
2010-02-01Refactor: Use more flexible parser frameworkDenis Kenzior1-101/+165
2010-02-01Fix: Don't set variables to NULL/0Denis Kenzior1-7/+1
These were already set to 0 by g_try_new0
2010-02-01Refactor: Support max_read attempts like GAtChatDenis Kenzior1-6/+14
2010-02-01Fix: Use a function instead of a tableDenis Kenzior1-32/+30
2010-02-01Fix: Make compileDenis Kenzior1-7/+7
2010-02-01Add GAtServer basic parsing supportZhenhua Zhang1-0/+486
It's the basic skeleton of GAtServer, including new/shutdown, ref/ unref, received_data/parse_buffer and set_discuss/set_debug. GAtServer is to emulate the server side of AT conversation. It complies with V.250 and 27.007 spec to accept AT command like ATV1, ATE0 and extended command like AT+CLCC. Upper layer could create customize server to expose TTY, tcp or unix socket to client side application.