Compare commits
3 Commits
64a5ed449a
...
trunk
Author | SHA1 | Date | |
---|---|---|---|
6b2cde0db0 | |||
5626112780 | |||
a156c26c96 |
@@ -1,2 +1,3 @@
|
||||
# pyoscar
|
||||
### a modern python binding for the classic OSCAR messaging protocol
|
||||
> a modern python binding for the classic OSCAR messaging protocol
|
||||
|
||||
|
32
src/pyoscar/proto/flap/skel.py
Normal file
32
src/pyoscar/proto/flap/skel.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# Copyright © 2024 Nicole O'Connor
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FLAP__MARKER = b"*"
|
||||
FLAP__FRAME_SIGNON = 0x1
|
||||
FLAP__FRAME_DATA = 0x2
|
||||
FLAP__FRAME_ERROR = 0x3
|
||||
FLAP__FRAME_SIGNOFF = 0x4
|
||||
FLAP__FRAME_KEEP_ALIVE = 0x5
|
||||
|
||||
FLAP__SEQUENCE = -1
|
||||
|
||||
class FlapFrame:
|
||||
payload: bytes = None
|
||||
|
||||
# str() or bytes() should return the raw frame data
|
||||
def __bytes__(self):
|
||||
return self.payload
|
||||
def __str__(self):
|
||||
return self.payload.decode()
|
||||
|
@@ -108,4 +108,44 @@ OSERVICE__PROBE_REQ = 0x1F # ping
|
||||
OSERVICE__PROBE_ACK = 0x20 # pong
|
||||
OSERVICE__BART_REPLY = 0x21 # bad buddy art item?
|
||||
OSERVICE__BART_QUERY2 = 0x22 # get own buddy art?
|
||||
OSERVICE__BART_REPLY2 = 0x23 # response to above (also sent on login)
|
||||
OSERVICE__BART_REPLY2 = 0x23 # response to above (also sent on login)
|
||||
|
||||
## locate
|
||||
LOCATE__ERR = GLOBAL__ERR
|
||||
LOCATE__RIGHTS_QUERY = 0x2 # hey server, what's my permissions?
|
||||
LOCATE__RIGHTS_REPLY = 0x3 # response to above
|
||||
LOCATE__SET_INFO = 0x4 # sets profile data/online status
|
||||
LOCATE__USER_INFO_QUERY = 0x5 # get profile/away msg/etc
|
||||
LOCATE__USER_INFO_REPLY = 0x6 # reply
|
||||
LOCATE__WATCHER_SUB_REQUEST = 0x7 # watcher subscription (like IRC /notify?)
|
||||
LOCATE__WATCHER_NOTIFICATION = 0x8 # notification in existing subscription
|
||||
LOCATE__SET_DIR_INFO = 0x9 # set directory info
|
||||
LOCATE__SET_DIR_REPLY = 0xA
|
||||
LOCATE__GET_DIR_INFO = 0xB # get directory info for user
|
||||
LOCATE__GET_DIR_REPLY = 0xC
|
||||
LOCATE__GROUP_CAPABILITY_QUERY = 0xD # not yet understood
|
||||
LOCATE__GROUP_CAPABILITY_REPLY = 0xE
|
||||
LOCATE__SET_KEYWORD_INFO = 0xF # set user profile keywords, such as interests
|
||||
LOCATE__SET_KEYWORD_REPLY = 0x10
|
||||
LOCATE__GET_KEYWORD_INFO = 0x11 # get " " " "
|
||||
LOCATE__GET_KEYWORD_REPLY = 0x12
|
||||
LOCATE__FIND_LIST_BY_EMAIL = 0x13 # email lookup
|
||||
LOCATE__FIND_LIST_REPLY = 0x14
|
||||
LOCATE__USER_INFO_QUERY2 = 0x15
|
||||
|
||||
## buddy
|
||||
BUDDY__ERR = GLOBAL__ERR
|
||||
BUDDY__RIGHTS_QUERY = 0x2 # optional buddy list perms check
|
||||
BUDDY__RIGHTS_REPLY = 0x3
|
||||
BUDDY__ADD_BUDDIES = 0x4
|
||||
BUDDY__DEL_BUDDIES = 0x5
|
||||
BUDDY__WATCHER_LIST_QUERY = 0x6 # who's watching me
|
||||
BUDDY__WATCHER_LIST_RESPONSE = 0x7
|
||||
BUDDY__WATCHER_SUB_REQUEST = 0x8
|
||||
BUDDY__WATCHER_NOTIFICATION = 0x9
|
||||
BUDDY__REJECT_NOTIFICATION = 0xA # sent if a user has too many watchers
|
||||
BUDDY__ARRIVED = 0xB # your friend is online
|
||||
BUDDY__DEPARTED = 0xC # your friend is offline
|
||||
BUDDY__ADD_TEMP_BUDDIES = 0xF # temporary buddy list
|
||||
BUDDY__DEL_TEMP_BUDDIES = 0x10
|
||||
|
||||
|
Reference in New Issue
Block a user