Mercurial > pidgin
annotate plugins/perl/perl-common.h @ 9620:c001be3c330e
[gaim-migrate @ 10464]
Changes to those get_alias functions in blist.c from
Christopher (siege) O'Brien:
Renames gaim_get_buddy_alias to gaim_buddy_get_alias
Renames gaim_get_buddy_alias_only to
_gaim_buddy_get_alias_only
Adds function gaim_buddy_get_contact_alias, which looks
up a buddy's appropriate display name by order of:
buddy alias; contact alias; server alias; buddy name.
Note that the buddy alias is still the top-priority.
Changed conversation.c to use _get_contact_alias rather
than _get_alias
The end result of this is that aliasing the contact
will result in conversations with any of that contact's
buddies using the contact alias. This allows people
like myself to no longer have to alias each buddy to
the same alias in order to achieve the same effect.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 31 Jul 2004 21:29:40 +0000 |
parents | 11d05ddf30a3 |
children | 0e9e2b923d09 |
rev | line source |
---|---|
6508 | 1 #ifndef _GAIM_PERL_COMMON_H_ |
2 #define _GAIM_PERL_COMMON_H_ | |
3 | |
6816
5aeba37b303c
[gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6566
diff
changeset
|
4 #include <glib.h> |
5aeba37b303c
[gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6566
diff
changeset
|
5 #ifdef _WIN32 |
5aeba37b303c
[gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6566
diff
changeset
|
6 #undef pipe |
5aeba37b303c
[gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6566
diff
changeset
|
7 #endif |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
8 #include <XSUB.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
9 #include <EXTERN.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
10 #include <perl.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
11 |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
12 #include "value.h" |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
13 |
6508 | 14 #define is_hvref(o) \ |
15 ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) | |
16 | |
17 #define hvref(o) \ | |
18 (is_hvref(o) ? (HV *)SvRV(o) : NULL); | |
19 | |
20 #define GAIM_PERL_BOOT(x) \ | |
21 { \ | |
22 extern void boot_Gaim__##x(pTHX_ CV *cv); \ | |
23 gaim_perl_callXS(boot_Gaim__##x, cv, mark); \ | |
24 } | |
25 | |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
26 SV *newSVGChar(const char *str); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
27 |
6508 | 28 void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); |
29 void gaim_perl_bless_plain(const char *stash, void *object); | |
30 SV *gaim_perl_bless_object(void *object, const char *stash); | |
31 gboolean gaim_perl_is_ref_object(SV *o); | |
32 void *gaim_perl_ref_object(SV *o); | |
33 | |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
34 int execute_perl(const char *function, int argc, char **args); |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
35 |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
36 #if 0 |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
37 gboolean gaim_perl_value_from_sv(GaimValue *value, SV *sv); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
38 SV *gaim_perl_sv_from_value(const GaimValue *value); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
39 #endif |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
40 |
6920
13f78c350cd3
[gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents:
6816
diff
changeset
|
41 void *gaim_perl_data_from_sv(GaimValue *value, SV *sv); |
13f78c350cd3
[gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents:
6816
diff
changeset
|
42 SV *gaim_perl_sv_from_vargs(const GaimValue *value, va_list *args, |
6921
11d05ddf30a3
[gaim-migrate @ 7468]
Christian Hammond <chipx86@chipx86.com>
parents:
6920
diff
changeset
|
43 void ***copy_arg); |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
44 |
6508 | 45 #endif /* _GAIM_PERL_COMMON_H_ */ |