Mail-Transport-Dbx

 view release on metacpan or  search on metacpan

Dbx.xs  view on Meta::CPAN

    CODE:
        RETVAL = self->dbx->indexCount;
    OUTPUT:
        RETVAL

void
emails (object)
        SV *object;
    PREINIT:
        DBX_BOX *self;
    PPCODE:
        self = (DBX_BOX*)SvIV((SV*)SvRV(object));
        if (GIMME_V == G_SCALAR) {
            if (self->dbx->type == DBX_TYPE_EMAIL) 
                XSRETURN_YES;
            else
                XSRETURN_NO;
        }
        if (GIMME_V == G_ARRAY) {
            int i;
            if (self->dbx->type != DBX_TYPE_EMAIL || self->dbx->indexCount == 0)

Dbx.xs  view on Meta::CPAN

                XPUSHs(o);
            }
            XSRETURN(i);
        }

void
subfolders (object)
        SV *object;
    PREINIT:
        DBX_BOX *self;
    PPCODE:
        self = (DBX_BOX*)SvIV((SV*)SvRV(object));

        if (GIMME_V == G_SCALAR) { 
            if (self->dbx->type == DBX_TYPE_FOLDER) 
                XSRETURN_YES;
            else
                XSRETURN_NO;
        }

        if (GIMME_V == G_ARRAY) {

Dbx.xs  view on Meta::CPAN

fetched_server (self)
        DBX_EMAIL *self;
    CODE:
        RETVAL = self->email->fetched_server;
    OUTPUT:
        RETVAL

void
rcvd_localtime (self)
        DBX_EMAIL *self;
    PPCODE:
        XSRETURN(datify(aTHX_ &(self->email->date), 0));

void
rcvd_gmtime (self)
        DBX_EMAIL *self;
    PPCODE:
        XSRETURN(datify(aTHX_ &(self->email->date), 1));

char *
date_received (self, ...)
        DBX_EMAIL *self;
    PREINIT:
        char *format = "%a %b %e %H:%M:%S %Y";
        STRLEN n_a;
        size_t max_len = 25;
        time_t time;

fallback/const-xs.inc  view on Meta::CPAN

	dTARGET;
#endif
	STRLEN		len;
        int		type;
	IV		iv;
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv = sv_2mortal(newSVpvf("%s is not a valid Mail::Transport::Dbx macro", s));
          PUSHs(sv);
          break;



( run in 0.638 second using v1.01-cache-2.11-cpan-5511b514fd6 )