Package twisted :: Package protocols :: Module oscar :: Class BOSConnection

[show private | hide private]
[frames | no frames]

## Class BOSConnection

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

Method Summary
| `__init__(self, username, cookie)`
| ``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
| ``clientReady`(self)` called when the client is ready to be online (inherited from `SNACBased`)
| ``connectionFailed`(self)` (Deprecated) (inherited from `Protocol`)
| ``connectionLost`(self, reason)` Called when the connection is shut down. (inherited from `OscarConnection`)
| ``connectionMade`(self)` Called when a connection is made. (inherited from `OscarConnection`)
| ``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
| ``dataReceived`(self, data)` Called whenever data is received. (inherited from `OscarConnection`)
| `delItemSSI(self, item, groupID, buddyID)`
| ``disconnect`(self)` send the disconnect flap, and sever the connection (inherited from `OscarConnection`)
| `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_(self, data)` (inherited from `SNACBased`)
| `oscar_01_03(self, snac)` (inherited from `SNACBased`)
| ``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_0A`(self, snac)` change of rate information. (inherited from `SNACBased`)
| ``oscar_01_10`(self, snac)` we've been warned
| ``oscar_01_13`(self, snac)` MOTD
| ``oscar_01_18`(self, snac)` host versions, in the same format as we sent (inherited from `SNACBased`)
| ``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
| `oscar_Data(self, data)` (inherited from `SNACBased`)
| `oscar_unknown(self, snac)` (inherited from `SNACBased`)
| `parseUser(self, data, count)`
| `readFlap(self)` (inherited from `OscarConnection`)
| ``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
| `sendFLAP(self, data, channel)` (inherited from `OscarConnection`)
| `sendKeepAlive(self)` (inherited from `OscarConnection`)
| ``sendMessage`(self, user, message, wantAck, autoResponse, offline)` send a message to user (not an OSCARUseR).
| ``sendSNAC`(self, fam, sub, data, flags)` send a snac and wait for the response by returning a Deferred. (inherited from `SNACBased`)
| ``sendSNACnr`(self, fam, sub, data, flags)` send a snac, but don't bother adding a deferred, we don't care. (inherited from `SNACBased`)
| ``setAway`(self, away)` set the away message, or return (if away == None)
| ``setIdleTime`(self, idleTime)` set our idle time.
| `setKeepAlive(self, t)` (inherited from `OscarConnection`)
| ``setProfile`(self, profile)` set the profile.
| ``startModifySSI`(self)` tell the OSCAR server to be on the lookout for SSI modifications
| `stopKeepAlive(self)` (inherited from `OscarConnection`)
| ``updateBuddy`(self, user)` called when a buddy changes status, with the OSCARUser for that buddy.
| `warnUser(self, user, anon)`

Class Variable Summary
`None` | `capabilities`
`dictionary` | `snacFamilies`

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:
    `None`
  Value:

        None

### snacFamilies

  Type:
    `dictionary`
  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 1.1 on Sat Feb 15 21:18:02 2003 | http://epydoc.sf.net