📄 cservice.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_02) on Mon Jun 20 13:41:43 EEST 2005 -->
<TITLE>
CService (jSMSEngine API)
</TITLE>
<META NAME="keywords" CONTENT="org.jsmsengine.CService class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CService (jSMSEngine API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../org/jsmsengine/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../org/jsmsengine/CSerialDriver.html" title="class in org.jsmsengine"><B>PREV CLASS</B></A>
<A HREF="../../org/jsmsengine/CService.CReceiveThread.html" title="class in org.jsmsengine"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?org/jsmsengine/CService.html" target="_top"><B>FRAMES</B></A>
<A HREF="CService.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.jsmsengine</FONT>
<BR>
Class CService</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>org.jsmsengine.CService</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>CService</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
This class provides all the functionality of jSMSEngine API to the developer. <br><br> The class CService provides all the interface routines to jSMSEngine. It is responsible for initialization of the communication with the GSM device, reading and sending messages, setting the phonebook. <br><br> The sequence of actions that need to be done are: <ul> <li>Call initialize() to setup the service.</li> <li>Call connect() to connect with the GSM device.</li> <li>Call sendMessage(), or readMessages() to send or receive messages from the device. Call deleteMessage() to delete a message from the device's memory.</li> <li>Call refreshDeviceInfo() to get updated GSM device specific information.</li> <li>Call disconnect() to disconnect from the GSM device.</li> </ul> <br>
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.CReceiveThread.html" title="class in org.jsmsengine">CService.CReceiveThread</A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#_name">_name</A></B></CODE>
<BR>
Internal Software Name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#_reldate">_reldate</A></B></CODE>
<BR>
Release Date.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#_SYNC_">_SYNC_</A></B></CODE>
<BR>
Synchronization object for critical sections of the API.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#_version">_version</A></B></CODE>
<BR>
Version.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#cacheDir">cacheDir</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#connected">connected</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#DEFAULT_VALUE_NOT_REPORTED">DEFAULT_VALUE_NOT_REPORTED</A></B></CODE>
<BR>
Default value for information that is not reported by the GSM device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private <A HREF="../../org/jsmsengine/CDeviceInfo.html" title="class in org.jsmsengine">CDeviceInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#deviceInfo">deviceInfo</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_CANNOT_DISABLE_INDICATIONS">ERR_CANNOT_DISABLE_INDICATIONS</A></B></CODE>
<BR>
This error value is returned when the GSM device does not support the AT+CNMI command for disabling indications to TE.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_CHARSET_HEX_NOT_SUPPORTED">ERR_CHARSET_HEX_NOT_SUPPORTED</A></B></CODE>
<BR>
This error value is returned when the GSM device does not support HEX mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_COMM_NOT_SUPPORTED">ERR_COMM_NOT_SUPPORTED</A></B></CODE>
<BR>
This error value is returned when the GSM device does not support ASCII or PDU mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_GENERIC_ERROR">ERR_GENERIC_ERROR</A></B></CODE>
<BR>
This is a generic error, which is not classified yet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_INVALID_DIR">ERR_INVALID_DIR</A></B></CODE>
<BR>
This error value is returned when the given directory is invalid.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_MESSAGE_NOT_FOUND">ERR_MESSAGE_NOT_FOUND</A></B></CODE>
<BR>
This error value is returned when the specific message was not found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_NO_CACHE">ERR_NO_CACHE</A></B></CODE>
<BR>
This error value on attempting to connect to the GSM device without first having defined the cache directories.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_NOT_CONNECTED">ERR_NOT_CONNECTED</A></B></CODE>
<BR>
This error value is returned when the service is not connected to the GSM device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_NOT_INITIALIZED">ERR_NOT_INITIALIZED</A></B></CODE>
<BR>
This error value is returned when the service is not initialized yet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_NOT_SUPPORTED">ERR_NOT_SUPPORTED</A></B></CODE>
<BR>
This error value is returned when the specified operation is not supported by jSMSEngine API.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_OK">ERR_OK</A></B></CODE>
<BR>
This error value is returned when the operation was succesfull.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_PHONEBOOK_NOT_LOADED">ERR_PHONEBOOK_NOT_LOADED</A></B></CODE>
<BR>
This error value is returned when the specified phonebook file did not load.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_SEND_FAILED">ERR_SEND_FAILED</A></B></CODE>
<BR>
This error value is returned when a send-message operation failed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#ERR_SIM_PIN_ERROR">ERR_SIM_PIN_ERROR</A></B></CODE>
<BR>
This error value is returned when the GSM device asks for a PIN number, however the PIN given is invalid.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/jsmsengine/CService.html#initialized">initialized</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -