|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.skype.tutorial.step8.Tutorial_8
public class Tutorial_8
Getting Started With SkypeKit: Tutorial Application, Step 8. In this example, we'll write a command-line utility for adding, deleting, and listing PSTN (telephone number) contacts. This example illustrates a simple SkypeKit-based program that:
| Field Summary | |
|---|---|
static int |
ACCOUNT_NAME_IDX
Index of the account name in the command line argument list. |
static int |
ACCOUNT_PWORD_IDX
Index of the account password in the command line argument list. |
static java.lang.String |
ADD_CONTACT
Command option string for adding a Contact. |
static int |
COMMAND_OPT_IDX
Index of the command option key in the command line argument list. |
private static java.lang.String |
commandOpt
What to do with my Contacts |
static java.lang.String |
DELETE_CONTACT
Command option string for deleting a Contact. |
static int |
DISPLAY_NAME_IDX
Index of the "optional" Contact display name in the command line argument list. |
private static java.lang.String |
displayName
Display name for the PSTN Contact |
static java.lang.String |
LIST_CONTACTS
Command option string for listing Contact. |
static java.lang.String |
MY_CLASS_TAG
Info/Debug console output message prefix/identifier tag. |
private static AppToken |
myAppToken
|
private static MySession |
mySession
|
private static Tutorial_8 |
myTutorial
"Extraneous" instance of this tutorial so we can invoke our business logic method from main(String[]) without having to declare it as being "static". |
private static java.lang.String |
newPstn
Phone number for the PSTN Contact |
static int |
OPT_ARG_CNT
Number of optional arguments in the command line argument list. |
static int |
PSTN_IDX
Index of the "optional" phone number in the command line argument list. |
static int |
REQ_ARG_CNT
Number of required arguments in the command line argument list. |
| Constructor Summary | |
|---|---|
Tutorial_8()
|
|
| Method Summary | |
|---|---|
(package private) void |
doPstnContact(MySession mySession,
java.lang.String pstn,
java.lang.String displayName,
java.lang.String commandOpt)
List, add, or delete Contacts. |
static void |
main(java.lang.String[] args)
Main loop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ADD_CONTACT
public static final java.lang.String DELETE_CONTACT
public static final java.lang.String LIST_CONTACTS
public static final java.lang.String MY_CLASS_TAG
public static final int ACCOUNT_NAME_IDX
public static final int ACCOUNT_PWORD_IDX
public static final int COMMAND_OPT_IDX
public static final int REQ_ARG_CNT
public static final int PSTN_IDX
COMMAND_OPT_IDX specified as -a or -d.
public static final int DISPLAY_NAME_IDX
COMMAND_OPT_IDX specified as -a.
public static final int OPT_ARG_CNT
private static java.lang.String commandOpt
private static java.lang.String newPstn
private static java.lang.String displayName
private static AppToken myAppToken
private static MySession mySession
private static Tutorial_8 myTutorial
main(String[]) without having to declare it as being "static".
| Constructor Detail |
|---|
public Tutorial_8()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args -
void doPstnContact(MySession mySession,
java.lang.String pstn,
java.lang.String displayName,
java.lang.String commandOpt)
mySession - Populated session object.pstn - Properly formatted phone number of the target PSTN Contact.displayName - Display name of the target PSTN Contact (used by add only).commandOpt - Command string, which must be one of:
MySkype.GetNormalizationStr(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||