C# 클래스 Aura.Msgr.Database.MsgrDb

파일 보기 프로젝트 열기: aura-project/aura

공개 메소드들

메소드 설명
AddGroup ( Aura.Msgr.Database.User user, Aura.Msgr.Database.Group group ) : void

Adds group to database.

AddNote ( string sender, string receiver, string message ) : void

Adds note to database.

Blacklist ( int userId, int contactId ) : void

Creates friend entry for contact on user with the blacklist status.

ChangeGroup ( Aura.Msgr.Database.User user, int friendContactId, int groupId ) : void

Changes group the friend is in in the database.

CountFriends ( int contactId ) : long

Returns the amount of friends the given contact has.

DeleteFriend ( int contactId1, int contactId2 ) : void

Deletes friend entries between the two users.

DeleteGroup ( Aura.Msgr.Database.User user, int groupId ) : void

Deletes group from database and moves friends in that group to ETC.

DeleteNote ( string receiver, long noteId ) : void

Deletes note from database.

GetFriendFromUser ( string characterName, string server ) : Aura.Msgr.Database.Friend

Returns friend for invitation, or null if the user doesn't exist.

GetFriends ( Aura.Msgr.Database.User user ) : List

Returns list of friends for user.

GetGroups ( Aura.Msgr.Database.User user ) : ICollection

Returns list of all groups in user's friend list.

GetLatestUnreadNote ( string receiver, long noteId ) : Note

Returns first note with an id higher than the given one, or null if none exist.

GetNote ( long noteId ) : Note

Returns note with given id, or null on error.

GetNotes ( Aura.Msgr.Database.User user ) : List

Returns all notes for user.

GetOrCreateContact ( string accountId, long characterEntityId, string characterName, string server, string channelName ) : Aura.Msgr.Database.User

Returns a user for the given values, either from the db, or by creating a new one.

GetUserByCharacterId ( long characterEntityId ) : Aura.Msgr.Database.User

Returns contact with the given character id from the database or null if it wasn't found.

InviteFriend ( int userId, int friendId ) : void

Creates friend entries for user and friend with status inviting/invited.

IsBlacklisted ( int userId, int contactId ) : bool

Returns true if user blacklisted contact.

RenameGroup ( Aura.Msgr.Database.User user, int groupId, string groupName ) : void

Renames group in database.

SaveOptions ( Aura.Msgr.Database.User user ) : void

Saves user's options to database.

SetFriendshipStatus ( int contactId1, int contactId2, FriendshipStatus status ) : void

Updates friendship status between the two users.

SetFriendshipStatusOneSided ( int contactId1, int contactId2, FriendshipStatus status ) : void

Updates friendship status for contact 1.

SetNoteRead ( long noteId ) : void

Sets read flag for given note.

비공개 메소드들

메소드 설명
ReadNote ( MySqlDataReader reader ) : Note

Reads note from reader, returns null on error.

UpdateLastLogin ( Contact contact ) : void

Updates contact's last login time.

메소드 상세

AddGroup() 공개 메소드

Adds group to database.
public AddGroup ( Aura.Msgr.Database.User user, Aura.Msgr.Database.Group group ) : void
user Aura.Msgr.Database.User
group Aura.Msgr.Database.Group
리턴 void

AddNote() 공개 메소드

Adds note to database.
public AddNote ( string sender, string receiver, string message ) : void
sender string
receiver string
message string
리턴 void

Blacklist() 공개 메소드

Creates friend entry for contact on user with the blacklist status.
public Blacklist ( int userId, int contactId ) : void
userId int
contactId int
리턴 void

ChangeGroup() 공개 메소드

Changes group the friend is in in the database.
public ChangeGroup ( Aura.Msgr.Database.User user, int friendContactId, int groupId ) : void
user Aura.Msgr.Database.User
friendContactId int
groupId int
리턴 void

CountFriends() 공개 메소드

Returns the amount of friends the given contact has.
public CountFriends ( int contactId ) : long
contactId int
리턴 long

DeleteFriend() 공개 메소드

Deletes friend entries between the two users.
public DeleteFriend ( int contactId1, int contactId2 ) : void
contactId1 int
contactId2 int
리턴 void

DeleteGroup() 공개 메소드

Deletes group from database and moves friends in that group to ETC.
public DeleteGroup ( Aura.Msgr.Database.User user, int groupId ) : void
user Aura.Msgr.Database.User
groupId int
리턴 void

DeleteNote() 공개 메소드

Deletes note from database.
public DeleteNote ( string receiver, long noteId ) : void
receiver string
noteId long
리턴 void

GetFriendFromUser() 공개 메소드

Returns friend for invitation, or null if the user doesn't exist.
public GetFriendFromUser ( string characterName, string server ) : Aura.Msgr.Database.Friend
characterName string
server string
리턴 Aura.Msgr.Database.Friend

GetFriends() 공개 메소드

Returns list of friends for user.
public GetFriends ( Aura.Msgr.Database.User user ) : List
user Aura.Msgr.Database.User
리턴 List

GetGroups() 공개 메소드

Returns list of all groups in user's friend list.
public GetGroups ( Aura.Msgr.Database.User user ) : ICollection
user Aura.Msgr.Database.User
리턴 ICollection

GetLatestUnreadNote() 공개 메소드

Returns first note with an id higher than the given one, or null if none exist.
public GetLatestUnreadNote ( string receiver, long noteId ) : Note
receiver string
noteId long
리턴 Note

GetNote() 공개 메소드

Returns note with given id, or null on error.
public GetNote ( long noteId ) : Note
noteId long
리턴 Note

GetNotes() 공개 메소드

Returns all notes for user.
public GetNotes ( Aura.Msgr.Database.User user ) : List
user Aura.Msgr.Database.User
리턴 List

GetOrCreateContact() 공개 메소드

Returns a user for the given values, either from the db, or by creating a new one.
public GetOrCreateContact ( string accountId, long characterEntityId, string characterName, string server, string channelName ) : Aura.Msgr.Database.User
accountId string
characterEntityId long
characterName string
server string
channelName string
리턴 Aura.Msgr.Database.User

GetUserByCharacterId() 공개 메소드

Returns contact with the given character id from the database or null if it wasn't found.
public GetUserByCharacterId ( long characterEntityId ) : Aura.Msgr.Database.User
characterEntityId long
리턴 Aura.Msgr.Database.User

InviteFriend() 공개 메소드

Creates friend entries for user and friend with status inviting/invited.
public InviteFriend ( int userId, int friendId ) : void
userId int
friendId int
리턴 void

IsBlacklisted() 공개 메소드

Returns true if user blacklisted contact.
public IsBlacklisted ( int userId, int contactId ) : bool
userId int
contactId int
리턴 bool

RenameGroup() 공개 메소드

Renames group in database.
public RenameGroup ( Aura.Msgr.Database.User user, int groupId, string groupName ) : void
user Aura.Msgr.Database.User
groupId int
groupName string
리턴 void

SaveOptions() 공개 메소드

Saves user's options to database.
public SaveOptions ( Aura.Msgr.Database.User user ) : void
user Aura.Msgr.Database.User
리턴 void

SetFriendshipStatus() 공개 메소드

Updates friendship status between the two users.
public SetFriendshipStatus ( int contactId1, int contactId2, FriendshipStatus status ) : void
contactId1 int
contactId2 int
status FriendshipStatus
리턴 void

SetFriendshipStatusOneSided() 공개 메소드

Updates friendship status for contact 1.
public SetFriendshipStatusOneSided ( int contactId1, int contactId2, FriendshipStatus status ) : void
contactId1 int
contactId2 int
status FriendshipStatus
리턴 void

SetNoteRead() 공개 메소드

Sets read flag for given note.
public SetNoteRead ( long noteId ) : void
noteId long
리턴 void