Package twisted :: Package protocols :: Module oscar :: Class BOSConnection
[frames | no frames]

Class BOSConnection

BaseProtocol --+            
               |            
        Protocol --+        
                   |        
     OscarConnection --+    
                       |    
               SNACBased --+
                           |
                          BOSConnection


Method Summary
  __init__(self, username, cookie)
  _cbConnectService(self, snac, d)
  _cbGetAway(self, snac)
  _cbGetChatInfoForInvite(self, info, user, message)
  _cbGetInfo(self, snac)
  _cbInitSSI(self, snac, d)
  _cbJoinChat(self, chat)
  _cbRequestSelfInfo(self, snac, d)
  _cbRequestSSI(self, snac, args)
  _cbSendMessageAck(self, snac, user, message)
  _cbWarnUser(self, snac)
  activateSSI(self)
active the data stored on the server (use buddy list, permit deny settings, etc.)
  addItemSSI(self, item, groupID, buddyID)
add an item to the SSI server.
  chatMemberJoined(self, chat, member)
called when a member joins the chat
  chatMemberLeft(self, chat, member)
called when a member leaves the chat
  chatReceiveMessage(self, chat, user, message)
called when someone in a chatroom sends us a message in the chat
  connectService(self, service, wantCallback, extraData)
connect to another service if wantCallback, we return a Deferred that gets called back when the service is online.
  createChat(self, shortName)
create a chat room
  delItemSSI(self, item, groupID, buddyID)
  endModifySSI(self)
  getAway(self, user)
  getInfo(self, user)
  initDone(self)
called when we get the rate information, which means we should do other init.
  initSSI(self)
this sends the rate request for family 0x13 (Server Side Information) so we can then use it
  joinChat(self, exchange, fullName, instance)
join a chat room
  modifyItemSSI(self, item, groupID, buddyID)
  offlineBuddy(self, user)
called when a buddy goes offline
  oscar_01_05(self, snac, d)
data for a new service connection d might be a deferred to be called back when the service is ready
  oscar_01_07(self, snac)
rate paramaters
  oscar_01_10(self, snac)
we've been warned
  oscar_01_13(self, snac)
MOTD
  oscar_02_03(self, snac)
location rights response
  oscar_03_03(self, snac)
buddy list rights response
  oscar_03_0B(self, snac)
buddy update
  oscar_03_0C(self, snac)
buddy offline
  oscar_04_05(self, snac)
ICBM parms response
  oscar_04_07(self, snac)
ICBM message (instant message)
  oscar_09_03(self, snac)
BOS rights response
  oscar_0B_02(self, snac)
stats reporting interval
  oscar_13_03(self, snac)
SSI rights response
  parseUser(self, data, count)
  receiveChatInvite(self, user, message, exchange, fullName, instance, shortName, inviteTime)
called when someone invites us to a chat room
  receiveMessage(self, user, multiparts, flags)
called when someone sends us a message
  receiveSendFileRequest(self, user, file, description, cookie)
called when someone tries to send a file to us
  receiveWarning(self, newLevel, user)
called when someone warns us.
  requestSelfInfo(self)
ask for the OSCARUser for ourselves
  requestSSI(self, timestamp, revision)
request the server side information if the deferred gets None, it means the SSI is the same
  sendMessage(self, user, message, wantAck, autoResponse, offline)
send a message to user (not an OSCARUseR).
  setAway(self, away)
set the away message, or return (if away == None)
  setIdleTime(self, idleTime)
set our idle time.
  setProfile(self, profile)
set the profile.
  startModifySSI(self)
tell the OSCAR server to be on the lookout for SSI modifications
  updateBuddy(self, user)
called when a buddy changes status, with the OSCARUser for that buddy.
  warnUser(self, user, anon)
    Inherited from SNACBased
  _ebDeferredError(self, error, fam, sub, data)
  clientReady(self)
called when the client is ready to be online
  oscar_(self, data)
  oscar_01_03(self, snac)
  oscar_01_0A(self, snac)
change of rate information.
  oscar_01_18(self, snac)
host versions, in the same format as we sent
  oscar_Data(self, data)
  oscar_unknown(self, snac)
  sendSNAC(self, fam, sub, data, flags)
send a snac and wait for the response by returning a Deferred.
  sendSNACnr(self, fam, sub, data, flags)
send a snac, but don't bother adding a deferred, we don't care.
    Inherited from OscarConnection
  connectionLost(self, reason)
  connectionMade(self)
Called when a connection is made.
  dataReceived(self, data)
Called whenever data is received.
  disconnect(self)
send the disconnect flap, and sever the connection
  readFlap(self)
  sendFLAP(self, data, channel)
  sendKeepAlive(self)
  setKeepAlive(self, t)
  stopKeepAlive(self)
    Inherited from Protocol
  connectionFailed(self)
(Deprecated)
    Inherited from BaseProtocol
  makeConnection(self, transport)
Make a connection to a transport and a server.

Class Variable Summary
NoneType capabilities = None                                                                  
dict snacFamilies = {1: (3, 272, 1435), 2: (1, 272, 1435), 3:...
    Inherited from Protocol
tuple __implements__ = (<class twisted.internet.interfaces.IPr...
    Inherited from BaseProtocol
int connected = 0                                                                     
NoneType transport = None                                                                  

Method Details

activateSSI(self)

active the data stored on the server (use buddy list, permit deny settings, etc.)

addItemSSI(self, item, groupID=None, buddyID=None)

add an item to the SSI server. if buddyID == 0, then this should be a group. this gets a callback when it's finished, but you can probably ignore it.

chatMemberJoined(self, chat, member)

called when a member joins the chat

chatMemberLeft(self, chat, member)

called when a member leaves the chat

chatReceiveMessage(self, chat, user, message)

called when someone in a chatroom sends us a message in the chat

connectService(self, service, wantCallback=0, extraData='')

connect to another service if wantCallback, we return a Deferred that gets called back when the service is online. if extraData, append that to our request.

createChat(self, shortName)

create a chat room

initDone(self)

called when we get the rate information, which means we should do other init. stuff.

initSSI(self)

this sends the rate request for family 0x13 (Server Side Information) so we can then use it

joinChat(self, exchange, fullName, instance)

join a chat room

offlineBuddy(self, user)

called when a buddy goes offline

oscar_01_05(self, snac, d=None)

data for a new service connection d might be a deferred to be called back when the service is ready

oscar_01_07(self, snac)

rate paramaters

oscar_01_10(self, snac)

we've been warned

oscar_01_13(self, snac)

MOTD

oscar_02_03(self, snac)

location rights response

oscar_03_03(self, snac)

buddy list rights response

oscar_03_0B(self, snac)

buddy update

oscar_03_0C(self, snac)

buddy offline

oscar_04_05(self, snac)

ICBM parms response

oscar_04_07(self, snac)

ICBM message (instant message)

oscar_09_03(self, snac)

BOS rights response

oscar_0B_02(self, snac)

stats reporting interval

oscar_13_03(self, snac)

SSI rights response

receiveChatInvite(self, user, message, exchange, fullName, instance, shortName, inviteTime)

called when someone invites us to a chat room

receiveMessage(self, user, multiparts, flags)

called when someone sends us a message

receiveSendFileRequest(self, user, file, description, cookie)

called when someone tries to send a file to us

receiveWarning(self, newLevel, user)

called when someone warns us. user is either None (if it was anonymous) or an OSCARUser

requestSelfInfo(self)

ask for the OSCARUser for ourselves

requestSSI(self, timestamp=0, revision=0)

request the server side information if the deferred gets None, it means the SSI is the same

sendMessage(self, user, message, wantAck=0, autoResponse=0, offline=0)

send a message to user (not an OSCARUseR). message can be a string, or a multipart tuple. if wantAck, we return a Deferred that gets a callback when the message is sent. if autoResponse, this message is an autoResponse, as if from an away message. if offline, this is an offline message (ICQ only, I think)

setAway(self, away=None)

set the away message, or return (if away == None)

setIdleTime(self, idleTime)

set our idle time. don't call more than once with a non-0 idle time.

setProfile(self, profile)

set the profile. send None to not set a profile (different from '' for a blank one)

startModifySSI(self)

tell the OSCAR server to be on the lookout for SSI modifications

updateBuddy(self, user)

called when a buddy changes status, with the OSCARUser for that buddy.

Class Variable Details

capabilities

Type:
NoneType
Value:
None                                                                  

snacFamilies

Type:
dict
Value:
{1: (3, 272, 1435),
 2: (1, 272, 1435),
 3: (1, 272, 1435),
 4: (1, 272, 1435),
 6: (1, 272, 1435),
 8: (1, 260, 1),
 9: (1, 272, 1435),
 10: (1, 272, 1435),
...                                                                    

Generated by Epydoc 2.0 on Sat May 15 20:08:11 2004 http://epydoc.sf.net