PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Xlobby plugin development

PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 03, 2008 1:25 am

No its not pussy cat dolls if that is your cup of tea go away and watch MTV. :D But it is pervtalk device for a program called Phoco, which basicly brings your mobile phone to xlobby. Since phoco is going to die a slow death after on going month, this device is clearly targeted only for handful of people who already owns its license and plan to continue using it after march. Cause new licenses are not available for buying anymore.

PCd will provide for your lobby:

-General data from your mobile (operator, call in progress, battery and signal status and so on).
-Contact database based on your phoco contacts (fetched from phone).
-Ability to receive calls.
-Ability to make calls.
-Ability to send SMSes.
-Possibly ability to receive SMSes (totally untested)

I was hoping to implement some more features, but right now i cant sacrifice anymore time for this project... so ill possibly get back on the horse after march if my phoco installation is still not dead.

PCd will require to work:

-Before hand configured Phoco installation.
-Installed PervHub and xPerT plugin (look xPErT thread for instructions)
-Connected (BROADCOMM bluetooth) phoco compatible mobile phone (duh!).
-Freelobby (if xPerT works with paylobby, thatll work too, but untested)

Original xPerT wont work with PCd so get atleast somewhat newer version, preferably BHE edition. Im not gonna officially release Beta version of PervHub because of this release cause it appears theres no huge need for this plugin, so ull have to download ZoneSkin by marbles to get your hands on PervHub, also Smart's site might provide direct link, im exactly not sure. Any problems and u can always ask a question from me on this thread. Ill try to document whole program still tonight.

Ok the download link

Remember its BETA, threat it as such. Im not accepting liability about anything it might do or does, beyond what is written in criminal law ofcourse. In other words, im not accepting responsibility of harm (monetary or otherwise) caused to you by using the software, Yet i assure it doesnt contain any purposeful code which is meant to harm you or your privacy in anyway.

So follow the instructions in xPErT thread to set up the pervtalk environment. Copy the above file your pervware folder. U can generate the contacts database by executing the file with -phoco2lobby attribute:

Code: Select all
PCd -phoco2lobby destination_path_and_file target_path_and_file


where destination file points to your phoco phonebook and and target file is to be written xl contacts database. be warned that software will overwrite the target file. Both files and paths can be omitted. If neither file is given software will use defaults. default file in xl side is contacts.xml.

U can amend your pervtalk autorun.ini file with following line to have PCd launched whenever pervhub is launched. This will also run phoco, if its not already running.

Code: Select all
PCd alias frontend


where "alias" is name given to phoco device, this can be anything, u can use this later in pervtalk infrastructure to point that particular device. And "frontend" is name used to refer software, from which PCd fetches user input, if xlobby is used this can simply be "XLobby", notice the case.

Im not going to give any instruction how to set up your phoco. that is rather complex task :) and these instructions will assume u have it up and running already.

More to follow shortly...
Attachments
Image(147).jpg
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 03, 2008 3:23 am

As u can see above picture of sharkskin prototype GSM main page... my real life friends have been swapped in contact database with my virtual ones, to protect their identities. All the virtual friends have phone numbers starting 555 and ending made up, so dont u guys worry its not p3rv teasing u with those crank calls :D

But lets try to figure out all the general features first with the help of that pic. Firstly cat is simply a cat made of contact database generated by PCd with -phoco2lobby attribute. Well actually its two tier cat, i figured out that people could use possibility to group their contacts within contact database, so all phoco contacts will be created under subitem "phone". i think people are more likely to use subcats like "Friends", "Family", "Work", "Virtual" but what the hell, people can sort them out later as they wish... for now everything from phoco is just put to "phone" subcat.

So that means where the actual contacts appear is actually 2-tier cat called "phonebookdetails" as the small header cat above it is "phonebook" which is directly based on contact.xml base. As i stated before u have to have your phoco setup, but just to mention there are several ways to get your contacts into phoco, from somephones phoco can fetch directly, and also from MS outlook. But for rest of us without access to either one there are two programs which come with phoco, for the purpose: vcard converter and csv converter. i used vcard converter in conjuction with my Nokia 9500 and allthough there are plenty of data stored within vcard, phoco only stores several types of phone numbers and email adress of the user along with the name. So i only get these contact data with -phoco2lobby attribute to the lobby base, if somebody wants to do more complete vcard converter for lobby, then go ahead :D

Now there are few kinks with a vcard converter ive noticed, first it doesnt seem to save mobile number as such but insist to save it as work number, since i feel that this is bug within vcard converter itself i didnt fix it later in phoco2lobby, but instead im using WorkNumber within skin instead of MobileNumber. This workaround might work us who use vcard converter but might not work for people using csv converter which prolly works ok. Second thing to note about is that vcard converted for some non obvious reason insist putting 2 spaces between first and lastname, again this is not very big thing but u have to notice it when saving contacts pics to phocos photos folder. As pics have to be saved as name of the contact, there have to be two spaces in picture filename too. But the rule is whenever it shows up in phoco it will show up in XL after use of phoco2lobby. But as good rules always so does this have exceptions phoco2lobby only aproves photos with extension ".jpg", that is why we dont see avatar of dgem above.

Ok as it turns out this post only contains data about contact DB, we get to other general features shortly.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 03, 2008 5:15 am

So there is theres network operator on text field of the phone "screen", this is quite nice feature when u r driving, can see which network u just roamed to, and u achieve it with variable:

Code: Select all
plugin>xPerT>Variable>op>phoco>operator


Where "op" is ID of the text field. IT doesnt have to literally be "op" but can be anything u chooge as long as it appears on ID too.

Dont know how well u can see but there is also signal strength indicator and battery bar in that small phone window. The bar in small battery icon is implemented as xPerT bars u might have seen in kXd:

Code: Select all
plugin>xPerT>!0!present>progress bar>[!0!xPerT>Variable>batt>phoco>battery]>vertical>skin:/buttons/blackbar.png>skin:/buttons/alphabar.png


it might seem bit complex at first glance, i give u that. But once u have got a hold how xPerT work it comes relatively easy to understan what it means... lets look the innermost of those statements first (one inside square brackets)

Code: Select all
!0!xPerT>Variable>batt>phoco>battery


So "Variable" jut tells xPerT this is value which is going to change over time and we should keep taps on it, it translates to PervTalk command Subscribe which means that subscriber is kept updated on changes of the value, next thing "batt" just tells to xPerT which XL element to update, and it have to be same as ID of the text field. "phoco" is simply the pervtalk name of the PCd and "battery" tells to PCd which value we r interested in. As u can see the inner statement is almost same as earlier statement for operator... aaah its becoming clear now. right?... riiight? :)

So outer statement is simply a presenter, and in this case presentor of certain type: progress bar. presentor takes a value in range [0-1000] which is fetched by our inner statement, followed is direction of the bar and graphics used to present it.

For signal icon we have prepared six different pictures, which filenames differ only by one digit, namely SignalBarX.png, where X stand for the digit. Heres what we type to that textfield:

Code: Select all
plugin>xPerT>loadpic>normal>skin:/buttons/SignalBar[plugin>xPerT>Variable>palkit>phoco>bars].png


Again we can quickly see that innner statement is now familiar kind. Once again "palkit" stands for ID of this item. So when the inner statement translated to certain digit the outer statement becomes a simple loadpic variable which we saw plenty already in tutorials of xPerT. Normal simply stands for the fact that picture can be cached and doesnt need to reloaded everytime.

There are also 4 on/off indicators on upper part of the screen, u can now only see the blutooth logo which stands for the fact that phones is connected to phoco. But there are also three others: one for low battery, other for the fact that phone is charging and last one is shown when theres on going call. I plan to make some system for these kinda of status indicators so they can all be collected and stored into one cat "alert" which is displayed to user all the time, kinda analogic to the warning lights in cars dashes into xPerT. But so far these arent cat up, but are just simple text fields making use of loadpic and if variables, heres one used for charging but theyre all essentially the same:

Code: Select all
plugin>xPerT>loadpic>normal>[plugin>xPerT>!0!if>[!0!plugin>xPerT>Variable>lataa>phoco>charging]>skin:/buttons/schuko.png]


Ok this is easy innermost statement we seen enough already, this time ID seems to be lataa and magic codeword for PCd is charging. Other three keywords are btw: "lowjuice", "call" and "connection". Outermost is simply a loadpic variable we just saw too... middle statement or if variable is the most interesting on this one. And it is real simple, if the condition (first parameter) holds (value) it will become the second parameter (filename of the german plug) otherwise itll be just empty string, which mean loadpic will not load anything.

Ok now that we have all suporting features dealt with i can get into real phone functions, meaning calls and SMS but that have to wait tomorrow though... im way too tired to go on now...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby sharp_1 on Mon Mar 03, 2008 5:09 pm

I also have a copy of xpert.dll and pervhub plugin on my help pages if anyone needs them and doesn't want to have to load Marbles_00 skin feel free to do so.

http://xlobby.help.googlepages.com/plugins#P

Bear: Please let me know if me hosting these files is a problem. By the way...nice work on the plugin!!
sharp_1
 
Posts: 630
Joined: Tue Jan 31, 2006 1:01 am
Location: Wisconsin

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 03, 2008 5:29 pm

sharp_1 wrote:Bear: Please let me know if me hosting these files is a problem. By the way...nice work on the plugin!!



No prob what so ever...im glad u can do it. BTW awesome site there keep it going and growing.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 03, 2008 10:46 pm

Ok i took quite a while but let me explain calls now... lets start with receiving calls cause it is rather easy. U just need to make sure u have "questdialog" screen made for your skin, u can find instructions how to make one on xPerT thread. Questdialog is presented at event of incoming call, depending how user replies to dialog call is either taken or terminated.

Thats it all there is to except calls, except hangup button might become handy unless u r the most talkative party. In my skin i have hangup button placed within phone graphics and it uses event with single command:

Code: Select all

xPerT

Delegate

phoco;hangup



Now placing the phonecall or dialling is almost as easy:

Code: Select all

xPerT

Delegate

phoco;dial;PHONENUMBER



Where PHONENUMBER is number to be dialed.

Now what makes situation bit more complicated in my skin is that i chose to have possibility for both contact cat oriented dialing and manual dialing. For manual dialing buttons of phone work as input buttons. And i have a variable called manual dial which is set true if user last touched phoonebuttons and to empty if user last touched contacts cat. then i use bit of xPerT branching on that variable to decide whether "dial manual" event or "dial phonebook" is called, both of these events have only single command and i give them both here fore reference:

Dial manual:

Code: Select all

xPerT

Delegate

phoco;dial;[%button>input%]



As u can see this uses "button>input" variable for phone number so it will call to number user has typed in, funny notation with square brackets is because this command will be used as one called by xPerT so xlobby has no change to convert the variable automaticly like it usually does with commands. If u would simply use this command directly with Xlobby without any branching provided by xPerT ull be better of ditching the brackets.

Dial phonebook:

Code: Select all

xPerT

Delegate

phoco;dial;[%phonebookdetails>WorkTelephone%]



So this will use variable from cat to place the call. Notice that i use "WorkTelephone" instead of "MobileTelephone" cause translation back within vcard coverter causes this weird shift. Other fields stored to cat are: "HomeTelephone", "OtherTelephone", "Fax" and "Email".

Then i also have dial event this is the one which decides which of the call events get called based on variable mention earlier, this event has to commands, one for each branch:


Code: Select all

xPerT

If

%variable>manualdial%|xPerT>Call SKIN>phoco>dial manual



and

Code: Select all

xPerT

Ifnot

%variable>manualdial%|xPerT>Call Skin>phoco>dial phonebook



so if variable manual dial has a value dial manual event is called otherwise dial phonebook gets called. notice the | character this is separator in if commands and separates the condition from the command which is launched incase condition holds value. In this case we use Call command built in xPerT to run Xlobby events, notice the space after Call and before its parameter this is needed, then rest of the statement, the parameter just specifies called event, which is under SKIN and phoco eventgroup.

That is pretty much all u need to know to handle calls with PCd.
Attachments
Image(144).jpg
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 03, 2008 11:28 pm

Above u can see my SMS screen, theres input keys and also repeated battery and signal status from phone screen. Difference with placing calls here is that, i ve been bit lazy so far and made skin yet only accommodate SMSs to contact database, in otherwords sending SMS to manually entered number is not yet possibility in my skin, but nothing says u cant do it with similar kinda branching than was presented with making calls in your skin.

Event for sending SMS contains only one command:

Code: Select all

xPerT

Delegate

phoco;sendSMS;%phonebookdetails>WorkTelephone%>%inputbutton%



So sendSMS is a PCd command for sending them and it takes two parameters, first the number where message is to be sent (in this case fetched from contact cat, again WorkTelephone instead of MobileTelephone because of vcard converter mix up) and the second parameter contains the message itself (in this case typed in by user). Notice the separator between parameters is actually xlobby type '>' instead of pervtalk separator ';'.

As mentioned before receiving SMS is totally untested cause i couldnt make it work within my phoco, but incase it works, all u need to do for preparing it is to add xPerT "infodialog" to your skin. If it works incoming SMS will be presented on infodialog.

This concludes the documentation. Ask if questions come up.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby muzz on Sat Mar 08, 2008 3:14 am

P3rv, I have no idea what you are doing but it looks mega cool and complex

I just find it hilarious that you use the terms "freelobby" and "paylobby" :D

It's a much more honest marketing strategy 8)
muzz
 
Posts: 49
Joined: Wed Nov 22, 2006 9:31 am

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby Marbles_00 on Mon Mar 10, 2008 10:15 am

That is too funny :lol: :
Image

Though I have no use for this plugin (no offence P3rv), but Funnyland will never beat Canada in hockey. Not in my lifetime. Actually maybe your men's team might be able to beat our PeeWee's. Funny, I was going to say our women's team...but they are even more dominant than any men's team right now. You know what else is funny, who coached the Finnish team that last World's...why none other than a Canadian...but wiyhout the pool of Canadian talent...well...let's review who won gold...

I do love the pic though, and made me take a double look at it. :lol:
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Mon Mar 17, 2008 2:20 am

Marbles_00 wrote:Though I have no use for this plugin (no offence P3rv)


None taken, i didnt really expect this to be huge success, considering it makes most sense in-car use only and mother soft is if not dead yet atleast getting buried alive. But since i had to do it for my own use anyway, i thought wont harm if i make it available too... who knows mayby somebody turns out nrrding it later... actually so it went with kXd, no interest for months and now its most talk about plugin... allthough i believe thats not because of popularity but rather its user unfriendlinesh :)

who coached the Finnish team that last World's...why none other than a Canadian...well...let's review who won gold...


I cant quite put my finger on it, put something smells fishy right here :D
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Sun May 11, 2008 4:42 pm

Haa! it seems, Marb, we are gonna have a little friendly practise game for the final tomorrow... u better get a box of tissues ready, cause ull be wiping your eyes a lot, when maple leaves get crushed by angry lions 8)
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby Marbles_00 on Tue May 13, 2008 2:34 pm

Oh please....spare me.

5-4 Victory over a powerful US team
10-1 BLOWOUT on the Germans
6-3 THUMPING of a decent Finn team

The only reason Norway is where it is is because Latvia couldn't beat a dismal German squad. Canada will be looking for a US re-match, or an epic fight against the Russian's...so any team in their way until then, will be crushed.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby P3rv3rt B3ar on Tue May 13, 2008 3:04 pm

Well u gotta admit though, that canadians are not as superior on the ice as that end score of monday match would suggest... lions will have revenge in final. (EDIT: that is ofcourse if u can even beat those damn norwegians)

US team? Marb are u on drugs? theyll be shipped back home all black and bluish tomorrow.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: PCd -- PhoCo (PhoneControl.NET) plugin via PervTalk

Postby Marbles_00 on Tue May 13, 2008 5:18 pm

Oh that's right...my mistake, I got you mixed up with Norway...what am I talking about...we've already trounced you once, I don't think you will have the privalge of facing Canada in the finals, as I doubt you will get there.

The US, though I would like to agree with you ....just because it is the US and they sometimes brag even before they have a right to do so (besides how long can a country hang on to winning a gold medal in an event like 25 years ago and soak it for all it is worth....why the US). I will say this, after loosing once to you guys and getting beat by Canada, they took out all their aggression on Norway (9-1), and it is going to be a good game against Finny tomorrow...most likely the game to watch really (and that's giving both teams too much credit). The other game to watch will be the Czech/Sweden rematch.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada