Class: Skype::Group

Inherits:
AbstractObject show all
Defined in:
lib/skype/group.rb

Constant Summary collapse

OBJECT_NAME =
"GROUP"

Instance Attribute Summary

Attributes included from AbstractObject::Get

#property2callback, #property2symbol

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractObject

inherited, #initialize, new, notified, #to_s

Methods included from AbstractObject::Notify

#delNotify, #notified, #notify, #setNotify

Methods included from AbstractObject::Get

#def_parser, #notice

Methods included from AbstractObject::Invokers

#invoke_alter, #invoke_echo, #invoke_get, #invoke_one, #invoke_set

Constructor Details

This class inherits a constructor from Skype::AbstractObject

Class Method Details

.create(displayName) ⇒ Object

FASdfklasjidfojsdlkjljfaslkdjf!!!!!!!!!!!!!!!!!!!!



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/skype/group.rb', line 6

def self.create displayName
  Skype.invoke("CREATE GROUP #{displayName}")
  group = nil
  tmp = nil
  if Skype::Group.notify[:displayname] and Skype::Group.notify[:displayname][displayName]
    tmp = Skype::Group.notify[:displayname][displayName]
  end
  Skype::Group.setNotify :DisplayName, displayName do |g|
    group = g
  end
  until group
    Skype.polling
    sleep 0.0123
  end
  if tmp
    Skype::Group.setNotify :DisplayName, displayName, tmp
    tmp.call group
  else
    Skype::Group.notify[:displayname][displayName] = nil
  end
  group
  #ThreadSafe ����ς��낤�Ȃ��B�B�B
end

Instance Method Details

#acceptObject



75
# File 'lib/skype/group.rb', line 75

def accept() invoke_alter "ACCEPT" end

#add_user(user) ⇒ Object Also known as: addUser



67
# File 'lib/skype/group.rb', line 67

def add_user(user) invoke_alter "ADDUSER", user end

#declineObject



77
# File 'lib/skype/group.rb', line 77

def decline() invoke_alter "DECLINE" end

#deleteObject



65
# File 'lib/skype/group.rb', line 65

def delete() invoke_echo "DELETE GROUP #{@id}" end

#get_custom_group_idObject Also known as: getCustomGroupID



34
# File 'lib/skype/group.rb', line 34

def get_custom_group_id() parse :custom_group_id, invoke_get("CUSTOM_GROUP_ID") end

#get_displaynameObject Also known as: getDisplayname



38
# File 'lib/skype/group.rb', line 38

def get_displayname() invoke_get("DISPLAYNAME") end

#get_expandedObject Also known as: getExpanded



58
# File 'lib/skype/group.rb', line 58

def get_expanded() parse :expanded, invoke_get("EXPANDED") end

#get_nrof_usersObject Also known as: getNrofUsers



42
# File 'lib/skype/group.rb', line 42

def get_nrof_users() parse :nrof_users, invoke_get("NROFUSERS") end

#get_nrof_users_onlineObject Also known as: getNrofUsersOnline



46
# File 'lib/skype/group.rb', line 46

def get_nrof_users_online() parse :nrof_users_online, invoke_get("NROFUSERS_ONLINE") end

#get_typeObject Also known as: getType



30
# File 'lib/skype/group.rb', line 30

def get_type() invoke_get("TYPE") end

#get_usersObject Also known as: getUsers



50
# File 'lib/skype/group.rb', line 50

def get_users() parse :users, invoke_get("USERS") end

#get_visibleObject Also known as: getVisible



54
# File 'lib/skype/group.rb', line 54

def get_visible() parse :visible, invoke_get("VISIBLE") end

#remove_user(user) ⇒ Object Also known as: removeUser



70
# File 'lib/skype/group.rb', line 70

def remove_user(user) invoke_alter "REMOVEUSER", user end

#set_displayname(dispname) ⇒ Object Also known as: setDisplayname



62
# File 'lib/skype/group.rb', line 62

def set_displayname(dispname) invoke_set "DISPLAYNAME", dispname end

#share(msg = '') ⇒ Object



73
# File 'lib/skype/group.rb', line 73

def share(msg='') invoke_alter "Share", msg end