Developer Services
Developer services allows a programmer using the C and C++ languages to easily transfer information through the internet between Windows, Macintosh and Palm OS devices via usernames. This data gateway is gauranteed to always be up and running with real-time performance and encrypted end to end for the strongest security. We also offer a simple data packing mechansim that takes care of big endian little endian formats should your data move between different types of devices, from Macintosh PowerPC to Windows for example.To start using the developer services you can open an account with us by using one of the payment buttons for our Bronze, Silver or Gold packages listed below. The differences between packages are number of usernames allowed and maximum bandwidth usage. Once your account is created it is associated with a developer AstroCity username for managing the different features. This is found under the "Developer..." menuitem under the "Login" menu. You can then create usernames from this menu and also see various statistics regarding bandwidth usage with each username. These developer created usernames are identical to regular AstroCity usernames with the added benefit of being able to send and receive data through the developer API. Regular AstroCity usernames can not receive data through the developer API and this is done for security purposes and to avoid possible network flood situations to unexpected AstroCity users. The developer API is as follows:
-
void *connectToAstroCity(long vendorCode,char *vendorPassword,char *loginName,char *loginPassword);
- The vendorCode is a 4 byte code that you get when subcribing to our developer services.
- The vendorPassword is a password used for security so that you can be sure only you send data using your vendorCode. This password is changed by using our developers management extensions under the "Developer..." menu after logging into AstroCity.
- The loginName is an AstroCity username.
- The loginPassword is the password associated with the loginName.
- This function returns an interfacePointer used as the first parameter to the rest of the developer API functions.
- This function returns -1 when an error occurs and calling getAstroCityError() returns the last error generated.
- The toUserName is the destination user who is to recieve this data through their dataRecievedCallBackPtr callback.
- the toObjectNumber specifies which object is to receive the data.
- The data is a pointer to the data to be sent.
- The dataSize is the size of the data to be sent and must be less than or equal to 200K.
- This function returns 0 for success and -1 when an error occurs at which time calling getAstroCityError() returns the last error generated.
- This function allows you specify a function to be called when data arrives from a given user and objectNumber.
- This function returns 0 for success and -1 when an error occurs at which time calling getAstroCityError() returns the last error generated.
- This is how you define one of many callback functions for receiving data from another user.
- The fromUserName is the user where this data came from.
- The vendorCode is the vender who is sending the data.
- The objectNumber specifies the object number and can be ignored if you register only one oject number per callback function.
- The data is a pointer to the incoming data.
- The dataSize is the size of the incoming data.
- This function lets you know if data can be sent or not. Use this function before calling sendDataToUser to avoid a BUFFER_FULL error.
- This function returns 1 for data is able to be sent and 0 for not.
- This function returns -1 when an error occurs and calling getAstroCityError() returns the last error generated.
- This function lets you know if data can be sent or not. Use this function before calling sendDataToUser to avoid a USER_NOT_ONLINE error.
- This function returns 1 for user is online and 0 if they are not.
- This function returns -1 when an error occurs and calling getAstroCityError() returns the last error generated.
- This function processes all reading and writing queued up in the internal buffers. It also dispatches all incoming data to your dataRecievedCallBack functions. Call this function at least once per iteration of your main program loop.
- This function returns 0 for success and -1 when an error occurs at which time calling getAstroCityError() returns the last error generated.
-
This function lets you know what caused the previous error as follows:
- NO_INTERNET - Could not connect to AstroCity because it appeaers there is no valid internet connection.
- INVALID_USERNAME_PASSORD - Could not connect to AstroCity because either the username or password is invalid or because the username is not flagged as a developer services username.
- NOT_CONNECTED - The connection to AstroCity does not exist. You must use connectToAstroCity to re-establish connection.
- USER_NOT_ONLINE - The user you are trying to send data to is either not online or is not flagged as a developer services username.
- BUFFER_FULL - The send buffer is full. You should try sending again later or use dataCanBeSent to test for the ability to send without error.
- DATA_SIZE_ERROR - You are trying to send more then 200K with a single sendDataToUser call.
- NOT_VALID_INTERFACE - The interface pointer you used is not valid. You need to call connectToAstroCity to obtain a valid pointer.
- RESUBSCRIPTION_REQUIRED - Your developer services account has expired or has run out of bandwidth.
Developer Services Packages
- Bronze - 10 usernames with 500 Megabytes transfer to/from AstroCity. Service goes through 6 months.
- Silver - 1000 usernames with 50 Gigabytes transfer to/from AstroCity. Service goes through 6 months.
- Gold - up to 1 million usernames with 750 Gigabytes transfer to/from AstroCity. Service goes through 6 months.
- *Note* Each account can be toggled to have a bandwidth safety mechanism turned should you go over your allocated bytes. This cost is 10 cents per megabyte. This can be turned on inside the developer services extention of your AstroCity developer account.
| Bronze Developer - $250 | Silver Developer - $1200 | Gold Developer - $4500 |