Have we talked to Jan Johnson about this any more? I need to know the scope and estimated expense before we move ahead. I would still like to talk to Jan. I will give her a call next week.
Thanks
-----Original Message-----
From: Baker, Lee
Sent: Wednesday, November 07, 2001 9:47 PM
To: Geaccone, Tracy
Cc: Concklin, Elaine; Lewis, Greg
Subject: Adaytum Consultant Services
Tracy,
As you know Project Sunrise no longer has within its scope the development of a process for bi-directional data flow between Adaytum and the Data Warehouse, at a level sufficient for ETS. Because of this the EST IT group is now exploring solutions that will achieve what is needed. Considering we thought this was being worked on by Sunrise, until a few weeks ago, we have a great deal more work ahead of us than earlier expected.
In Operations we will need Hoang Vo working on our project until the end of April 2002 at a minimum. He is currently scheduled to roll of the project at the end of January. We need to get with Adaytum and reserve this additional time. Do you want to do that or would you rather to go ahead and work with Fred Ali to make the arrangements.
***********
EDRM Enron Email Data Set has been produced in EML, PST and NSF format by ZL Technologies, Inc. This Data Set is licensed under a Creative Commons Attribution 3.0 United States License <http://creativecommons.org/licenses/by/3.0/us/> . To provide attribution, please cite to "ZL Technologies, Inc. (http://www.zlti.com)."
***********
California


{{ title }}
{{ collections.writing | size }} posts since 2007. Show all archives.
-
{% comment %}
liquidjs doesn’t do hoisting the same, so we have to hoist these loop variables ourselves.
{% endcomment %}
{% assign year = "" %}
{% assign currentyear = "" %}
{% assign currentyearpostcount = 0 %}
{% assign listItems = collections.writing %}
{% for post in collections.writing %}
{% include post-list-entry.html %}
{% endfor %}


Hi, I have Emoncms modular version installed on Raspberry Pi with Martin's RF12b module & "raspberrypi_run.php" script it is receiving from multi-emontx nodes for last week no issues. I would like to use Python script instead, only reason because I'm learning Python.
Based on Glyn's https://github.com/openenergymonitor/EmoncmsPythonLink/blob/master/pylink.py and with the serial changed to /dev/ttyAMA0 . The serialtest.py works ok in geany I'm receiving CSV for both emontx and emonglcd, problem is when I try to use pylink.py to post to emoncms localhost, I get NameError: Name 'conn' is not defined.
It has something to do with line 11 below:
conn.request("GET", "/emoncms/input/post?csv="+ser.readline())
tried below as it works in input api test on panel (and many others)
Thanks Peter
Re: Emoncms Serial RF12b
Peter, I'm guessing its actually earlier in the script ( e.g. line 3) as it's basically saying you've not used conn before and therefore I don't know what to do with it.
Perhaps you could post the entire script you are using?
Re: Emoncms Serial RF12b
Hi, Code is based on pyserial https://github.com/openenergymonitor/EmoncmsPythonLink
Script
import serial, sys
import httplib
conn = httplib.HTTPConnection("localhost")
ser = serial.Serial('/dev/ttyAMA0', 9600)
while 1:
sys.stdout.write(ser.readline())
conn.request("GET", "/emoncms/input/post?csv="+ser.readline())
response = conn.getresponse()
In bold is my changes.
Thanks Peter
Re: Emoncms Serial RF12b
LXTerminal after running script in geany
20 196 9
Traceback (most recent call last):
File "pyserial.py", line 12, in <module>
connn.request("GET", "/emoncms/input/post?csv=" +ser.readline())
NameError: name 'connn' is not defined
------------------
(program exited with code: 1)
Press return to continue
Re: Emoncms Serial RF12b
I see the error message states "connn" while the code example declares "conn" (one less 'n'), could that be the reason?
Re: Emoncms Serial RF12b
Thanks again Martin, sorted error and lesson learned. Its running in geany now and shows data in LXTerminal. Not updating as feed yet. Any suggestion on where to start posting to emoncms, can you please share working example if available, I thought link below would show as CSV in emoncms inputs but no luck.
conn.request("GET", "/emoncms/input/post?csv="+ser.readline())
I assume after above hurdle I will need to program in my python how to threat for each node as there is no typedef struct in raspberry pi .
Cheers
Peter
P.S. some additional info
LXTerminal sample for Node10 - emontx (typedef struct { int power1, power2, power3, Vrms, Temperature, powerFactor; }) and Node 20 - emonglcd (Temperature)
10 120 2 1 0 9 0 210 101 150 3 89 0
20 2 10
Re: Emoncms Serial RF12b
Peter,
Glad you found the typo ;)
I use a slightly different way of doing it in python (but the results the same)
opener = urllib.FancyURLopener({})
f = opener.open("http://server/path/api/post?apikey=apikey4&node=" + id1 + id2.zfill(2) + "&json={Temperature:"+ temperature_str +",Humidity:"+ str(int(humidity,16)) + ",Battery:"+ str(battery) + "}")
f.read()
From that you should be able to se how I pass the variables for the node into the string. Its 3 digits long because I wanted to be able to differentiate internal and external temps from the node ID ( I use 1xx for internal and 4xx for external)
(zfill(2) - gives 2 digits and will include leading zeros)
Re: Emoncms Serial RF12b
Hi, Thanks a mil. Before I start to make sense of above. What release of python are you using? I'm using 2.7 and wondering should I upgrade to 3. Second question, are you using latest emontx csv.
Thanks
Peter
Re: Emoncms Serial RF12b
I'm using Python 2.7.3rc2. My thinking was to stick with a version where if I google for an example, the example is likely to work :-).
My setup for the above is actually cheap temperature (433MHz) sensors from Clas Ohlson going to a rfxtrx433 from rfxcom thats hooked up to my RaspPi.
On the RaspPi I have a Python script, that reads the output of the serial splits it up into different variables, and then as per Glyn's script appends them onto the end of a URL and as python "reads" or "gets" the webpage it passes the variables to emoncms.
I'm using the json import, but cannot remember why I chose it!
The code hopefully gives you 1 way of getting data for different nodes into emoncms using python. Good luck!
Re: Emoncms Serial RF12b
@ ukmoose
Hello,
I want to implement emoncms with usb rfxtrx433 and raspberry pi
I see you did the same thing
is it possible to share the python script?
I am not a god of programming
it would help me
thank you in advance
Re: Emoncms Serial RF12b
Galen,
you may want to take a look at this script: https://github.com/Jerome-github/oem_gateway


Default Constructor The default constructor returns a Date object with a date of January 1, 1970. Takes no parameters.
date* HeapDate = new date();
date Stackdate = date();
Copy Constructor The copy constructor performs a member-wise copy of another date object. Pass in an existing date object.
date current = date();
date copied = date(current);
date* copied = new date(current);
String Constructor The string constructor creates a date object based on a mm/dd/yyyy input string. Pass in a std::string. For now, it is possible to create an invalid date e.g. June 31st or February 29th on a non-leap year via this constructor. A fix for this is in the works. If you're not sure if a date is valid, create a date before it that you know is valid and use the date::increment until it is reached or skipped.
date example = date("01/28/1984");
date* example = date("09/13/2084");


WikiLeaks: FARC-EP<EMAIL_ADDRESS>mail archive
This message is part of a particular mailbox provided at WikiLeaks
and it should be discussed here.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HAppy new Year to You!
- Subject: HAppy new Year to You!
- From: Robert Nadin<EMAIL_ADDRESS>- Date: Thu, 3 Jan 2008 08:31:51 -0800 (PST)
- Authentication-results: mta536.mail.mud.yahoo.com from=yahoo.com; domainkeys=pass (ok)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2zrYEZJtR2B9FKRx9k9/QKX7Y1otts4hQNB5LCrWKKVaH0LMv6/zbeE4kP9nfiRlus8nDc8WB8mcCreMPZrNoHLhXzIiQo/PT09fclSm7UKTparlv4dh9TqB50MMECdvEklI7JVkeEAsrG/atAUzlJo588mbPUntvCyv+Eqe4f0=;
- Reply-to<EMAIL_ADDRESS>Dear Friend,
Happy new year to you. I know this letter will come to
you as a surprise because you do not know me before;
my name is Mr.Robert Nadin Director Cargo Department,
Bank of Ghana.During the airlift of some presidential
luggages outside the country, I and my colleagues in
the above department unanimously decided to include
additional luggage containing USD$18M (Eighteen
Million United States Dollars) only for our own
benefit though it was labeled "Photographic Equipment"
for security reasons.
I am obliged to contact you to assist us on getting
the luggage cleared from the agent and delivered to
you. As we have agreed on the following terms.
(1) All relevant documents to claim the luggage will
be procure in your name to enable the agent deliver
the luggage to your mailing address.
(2) You will be entitled to a share of 40% of the
total amount.
(3) 55% of the total amount will be for us while the
remaining 5% will be for any expenses incurred in the
course of this transaction.
If this business terms and conditions are ok by you,
kindly contact me on this email address, also, furnish
me with your full names, mailing address and your
personal telephone / fax numbers, for easier
communication and procurement of documents.
Note that this business is 100% risk free, as all
relevant documents to back up the claim will be
procure on your name, however we advice you to keep
the entire transaction close to yourself until you
received the luggage. For security reasons other
modalities will be discussed as soon as you response
to me.
Yours Faithfully
Mr. Robert Nadin
Director Cargo Dept
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Entry for this page on WikiLeaks |
Discussion page on WikiLeaks |
wikileaks.org
Main Index |
Thread Index |
Author Index


{{gateblu.name || 'Gateblu'}}
UUID:
~{{gateblu.uuid}}
Service Version
: {{serviceVersion}}
UI Version
: {{uiVersion}}
Gateblu Service is not running!
Gateblu Service has an update available! (v{{newServiceVersion}})
Install
Gateblu has an update available! (v{{newUiVersion}})
Install
Gateblu Service is not installed!
Install


Blacksmith Altran:
What do you want now? Spit it out!!
Ask about the Journeyman Gem
Ask about Journeyman Deco Beads


{% extends 'portal/base.html' %} {% load static %} {% block title %} Frequently Asked Questions {% endblock %} {% block content_header %} FAQ {% endblock %} {% block breadcrumb %}
It depends on what you have used it for. If you simply want to acknowledge you used the last version, use:
Khan, A., Fornes, O., Stigliani, A., et al. (2018). JASPAR 2018: update of the open-access database of transcription factor binding profiles and its web framework. Nucleic Acids Res. 2018 (In print)
Otherwise:
This is due to historical reasons. JASPAR CORE was originally built in order to create familial binding profiles for as many structural classes of transcription factor classes as possible. In some experimental literature, only matrices and not sequences are available. For this project, we were forced to include some matrices to gain coverage of certain binding site classes. For recent additions, it is a requirement to have the sequences available.
There are two principal explanations. The most likely is that we were not aware of your work: please let us know! The other possible reason is that the publication did not live up to the demands of the curators. As we have human curation of all JASPAR CORE matrices, this is to some degree an arbitrary call – we are happy to discuss it with you.
We appreciate that other services wants to link to JASPAR. However, if your are using the CPU-intensive services (matrix comparison, randomization or clustering), please ask the maintainers (see contact information below) before you do this – otherwise your server might be rejected without warning. In that case, we strongly suggest setting up a local JASPAR database, as the database and resources are freely available.
The data from JASPAR can be downloaded in four different motif formats:
1. Raw PFM: Each matrix is separated by a fasta like header starting with the > symbol and then a matrix ID. The count for each base (ACGT) is specified on its own space separated line where each element corresponds to one column. The order of the lines for the bases is A,C,G and finally T.
13 13 3 1 54 1 1 1 0 3 2 5
13 39 5 53 0 1 50 1 0 37 0 17
17 2 37 0 0 52 3 0 53 8 37 12
11 0 9 0 0 0 0 52 1 6 15 20
2. JASPAR: This is similar to the raw format, having an identical header. The lines for each base however starts with a label for the nucleotide (A,C,G or T) and then the columns follow enclosed in brackets: [].
A [13 13 3 1 54 1 1 1 0 3 2 5 ]
C [13 39 5 53 0 1 50 1 0 37 0 17 ]
G [17 2 37 0 0 52 3 0 53 8 37 12 ]
T [11 0 9 0 0 0 0 52 1 6 15 20 ]
3. TRANSFAC: This is a TRANSFAC-like format having a header starting with “DE” then the matrix ID, the matrix name and the matrix class. The data itself is transposed as compared to the other formats, meaning that each line correspond to a column in the matrix. The column lines start with a number denoting the column index (counting
from 0). After that follows tab separated counts for each base in that column in the order: A,C,G and T. After the lines with the counts follows a final line containing the string: “XX”.
DE MA0048 NHLH1 bHLH
00 13 13 17 11
01 13 39 2 0
02 3 5 37 9
03 1 53 0 0
04 54 0 0 0
05 1 1 52 0
06 1 50 3 0
07 1 1 0 52
08 0 0 53 1
09 3 37 8 6
10 2 0 37 15
11 5 17 12 20
XX
4. MEME: MEME motif format is a simple text format for motifs that is accepted by the programs in the MEME Suite that require MEME Motif Format. A text file in MEME minimal motif format can contain more than one motif, and also (optionally) specifies the motif alphabet, background frequencies of the letters in the alphabet, and strand information (for motifs of complementable alphabets like DNA), as illustrated in the example below:
MEME version 4
ALPHABET= ACGT
strands: + -
Background letter frequencies
A 0.25 C 0.25 G 0.25 T 0.25
MOTIF MA0048.2 NHLH1
letter-probability matrix: alength= 4 w= 10 nsites= 3246 E= 0
0.242760 0.667283 0.055761 0.034196
0.142021 0.055145 0.667283 0.043746
0.000924 0.667283 0.000000 0.000000
0.667283 0.000924 0.000308 0.000000
0.000000 0.092730 0.667283 0.035120
0.029575 0.667283 0.038201 0.000000
0.000000 0.001232 0.001232 0.667283
0.000616 0.001232 0.667283 0.000308
0.091189 0.667283 0.031423 0.107825
0.094886 0.226741 0.667283 0.458718
URL http://jaspar.genereg.net/matrix/MA0048.2
JASPAR was originally the name of a master student project algorithm for comparing matrix profiles, an obscure tribute to an even more obscure dialog from the Black Adder episode “The Black Seal” between the Seven Most Evil Men in the Kingdom:
…and with all haste, we will meet at Old Jaspar’s tavern
How is old Jaspar these days?
Dead.
How?
I killed him.
[Loud cheer].


| Top |
| gchar * | address | Write / Construct Only |
| GDBusAuthObserver * | authentication-observer | Write / Construct Only |
| GDBusCapabilityFlags | capabilities | Read |
| gboolean | closed | Read |
| gboolean | exit-on-close | Read / Write |
| GDBusConnectionFlags | flags | Write / Construct Only |
| gchar * | guid | Read / Write / Construct Only |
| GIOStream * | stream | Read / Write / Construct Only |
| gchar * | unique-name | Read |
| enum | GBusType |
| GDBusConnection | |
| enum | GDBusConnectionFlags |
| enum | GDBusCapabilityFlags |
| enum | GDBusCallFlags |
| enum | GDBusSignalFlags |
| enum | GDBusSendMessageFlags |
| GDBusInterfaceVTable | |
| GDBusSubtreeVTable | |
| enum | GDBusSubtreeFlags |
GFlags ├── GDBusCapabilityFlags ╰── GDBusConnectionFlags GObject ╰── GDBusConnection
The GDBusConnection type is used for D-Bus connections to remote peers such as a message buses. It is a low-level API that offers a lot of flexibility. For instance, it lets you establish a connection over any transport that can by represented as an GIOStream.
This class is rarely used directly in D-Bus clients. If you are writing
a D-Bus client, it is often easier to use the g_bus_own_name()
,
g_bus_watch_name()
or g_dbus_proxy_new_for_bus()
APIs.
As an exception to the usual GLib rule that a particular object must not
be used by two threads at the same time, GDBusConnection's methods may be
called from any thread. This is so that g_bus_get()
and g_bus_get_sync()
can safely return the same GDBusConnection when called from any thread.
Most of the ways to obtain a GDBusConnection automatically initialize it
(i.e. connect to D-Bus): for instance, g_dbus_connection_new()
and
g_bus_get()
, and the synchronous versions of those methods, give you an
initialized connection. Language bindings for GIO should use
g_initable_new()
or g_async_initable_new_async()
, which also initialize the
connection.
If you construct an uninitialized GDBusConnection, such as via
g_object_new()
, you must initialize it via g_initable_init()
or
g_async_initable_init_async()
before using its methods or properties.
Calling methods or accessing properties on a GDBusConnection that has not
completed initialization successfully is considered to be invalid, and leads
to undefined behaviour. In particular, if initialization fails with a
GError, the only valid thing you can do with that GDBusConnection is to
free it with g_object_unref()
.
Here is an example for exporting a subtree: gdbus-example-subtree.c
Here is an example for passing UNIX file descriptors: gdbus-unix-fd-client.c
Here is an example for exporting a GObject: gdbus-example-export.c
void g_bus_get (GBusType bus_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously connects to the message bus specified by bus_type
.
When the operation is finished, callback
will be invoked. You can
then call g_bus_get_finish()
to get the result of the operation.
This is a asynchronous failable function. See g_bus_get_sync()
for
the synchronous version.
bus_type |
a GBusType |
|
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
the data to pass to |
Since 2.26
GDBusConnection * g_bus_get_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with g_bus_get()
.
The returned object is a singleton, that is, shared with other
callers of g_bus_get()
and g_bus_get_sync()
for bus_type
. In the
event that you need a private message bus connection, use
g_dbus_address_get_for_bus_sync()
and
g_dbus_connection_new_for_address()
.
Note that the returned GDBusConnection object will (usually) have
the “exit-on-close” property set to TRUE
.
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed
to |
|
error |
return location for error or |
Since 2.26
GDBusConnection * g_bus_get_sync (GBusType bus_type
,GCancellable *cancellable
,GError **error
);
Synchronously connects to the message bus specified by bus_type
.
Note that the returned object may shared with other callers,
e.g. if two separate parts of a process calls this function with
the same bus_type
, they will share the same object.
This is a synchronous failable function. See g_bus_get()
and
g_bus_get_finish()
for the asynchronous version.
The returned object is a singleton, that is, shared with other
callers of g_bus_get()
and g_bus_get_sync()
for bus_type
. In the
event that you need a private message bus connection, use
g_dbus_address_get_for_bus_sync()
and
g_dbus_connection_new_for_address()
.
Note that the returned GDBusConnection object will (usually) have
the “exit-on-close” property set to TRUE
.
bus_type |
a GBusType |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
Since 2.26
void g_dbus_connection_new (GIOStream *stream
,const gchar *guid
,GDBusConnectionFlags flags
,GDBusAuthObserver *observer
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by stream
.
If stream
is a GSocketConnection, then the corresponding GSocket
will be put into non-blocking mode.
The D-Bus connection will interact with stream
from a worker thread.
As a result, the caller should not interact with stream
after this
method has been called, except by calling g_object_unref()
on it.
If observer
is not NULL
it may be used to control the
authentication process.
When the operation is finished, callback
will be invoked. You can
then call g_dbus_connection_new_finish()
to get the result of the
operation.
This is a asynchronous failable constructor. See
g_dbus_connection_new_sync()
for the synchronous
version.
stream |
||
guid |
the GUID to use if a authenticating as a server or |
[allow-none] |
flags |
flags describing how to make the connection |
|
observer |
a GDBusAuthObserver or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
the data to pass to |
Since 2.26
GDBusConnection * g_dbus_connection_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_new()
.
res |
a GAsyncResult obtained from the GAsyncReadyCallback
passed to |
|
error |
return location for error or |
Since 2.26
GDBusConnection * g_dbus_connection_new_sync (GIOStream *stream
,const gchar *guid
,GDBusConnectionFlags flags
,GDBusAuthObserver *observer
,GCancellable *cancellable
,GError **error
);
Synchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by stream
.
If stream
is a GSocketConnection, then the corresponding GSocket
will be put into non-blocking mode.
The D-Bus connection will interact with stream
from a worker thread.
As a result, the caller should not interact with stream
after this
method has been called, except by calling g_object_unref()
on it.
If observer
is not NULL
it may be used to control the
authentication process.
This is a synchronous failable constructor. See
g_dbus_connection_new()
for the asynchronous version.
stream |
||
guid |
the GUID to use if a authenticating as a server or |
[allow-none] |
flags |
flags describing how to make the connection |
|
observer |
a GDBusAuthObserver or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
Since 2.26
void g_dbus_connection_new_for_address (const gchar *address
,GDBusConnectionFlags flags
,GDBusAuthObserver *observer
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by address
which must be in the D-Bus address format.
This constructor can only be used to initiate client-side
connections - use g_dbus_connection_new()
if you need to act as the
server. In particular, flags
cannot contain the
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER
or
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS
flags.
When the operation is finished, callback
will be invoked. You can
then call g_dbus_connection_new_finish()
to get the result of the
operation.
If observer
is not NULL
it may be used to control the
authentication process.
This is a asynchronous failable constructor. See
g_dbus_connection_new_for_address_sync()
for the synchronous
version.
address |
a D-Bus address |
|
flags |
flags describing how to make the connection |
|
observer |
a GDBusAuthObserver or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
the data to pass to |
Since 2.26
GDBusConnection * g_dbus_connection_new_for_address_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_new_for_address()
.
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed
to |
|
error |
return location for error or |
Since 2.26
GDBusConnection * g_dbus_connection_new_for_address_sync (const gchar *address
,GDBusConnectionFlags flags
,GDBusAuthObserver *observer
,GCancellable *cancellable
,GError **error
);
Synchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by address
which must be in the D-Bus address format.
This constructor can only be used to initiate client-side
connections - use g_dbus_connection_new_sync()
if you need to act
as the server. In particular, flags
cannot contain the
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER
or
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS
flags.
This is a synchronous failable constructor. See
g_dbus_connection_new_for_address()
for the asynchronous version.
If observer
is not NULL
it may be used to control the
authentication process.
address |
a D-Bus address |
|
flags |
flags describing how to make the connection |
|
observer |
a GDBusAuthObserver or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
Since 2.26
void
g_dbus_connection_start_message_processing
(GDBusConnection *connection
);
If connection
was created with
G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING
, this method
starts processing messages. Does nothing on if connection
wasn't
created with this flag or if the method has already been called.
Since 2.26
void g_dbus_connection_close (GDBusConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Closes connection
. Note that this never causes the process to
exit (this might only happen if the other end of a shared message
bus connection disconnects, see “exit-on-close”).
Once the connection is closed, operations such as sending a message
will return with the error G_IO_ERROR_CLOSED
. Closing a connection
will not automatically flush the connection so queued messages may
be lost. Use g_dbus_connection_flush()
if you need such guarantees.
If connection
is already closed, this method fails with
G_IO_ERROR_CLOSED
.
When connection
has been closed, the “closed”
signal is emitted in the
thread-default main context
of the thread that connection
was constructed in.
This is an asynchronous method. When the operation is finished,
callback
will be invoked in the
thread-default main context
of the thread you are calling this method from. You can
then call g_dbus_connection_close_finish()
to get the result of the
operation. See g_dbus_connection_close_sync()
for the synchronous
version.
connection |
||
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is
satisfied or |
[allow-none] |
user_data |
The data to pass to |
Since 2.26
gboolean g_dbus_connection_close_finish (GDBusConnection *connection
,GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_close()
.
connection |
||
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed
to |
|
error |
return location for error or |
Since 2.26
gboolean g_dbus_connection_close_sync (GDBusConnection *connection
,GCancellable *cancellable
,GError **error
);
Synchronously closees connection
. The calling thread is blocked
until this is done. See g_dbus_connection_close()
for the
asynchronous version of this method and more details about what it
does.
connection |
||
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
Since 2.26
gboolean
g_dbus_connection_is_closed (GDBusConnection *connection
);
Gets whether connection
is closed.
Since 2.26
void g_dbus_connection_flush (GDBusConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously flushes connection
, that is, writes all queued
outgoing message to the transport and then flushes the transport
(using g_output_stream_flush_async()
). This is useful in programs
that wants to emit a D-Bus signal and then exit immediately. Without
flushing the connection, there is no guaranteed that the message has
been sent to the networking buffers in the OS kernel.
This is an asynchronous method. When the operation is finished,
callback
will be invoked in the
thread-default main context
of the thread you are calling this method from. You can
then call g_dbus_connection_flush_finish()
to get the result of the
operation. See g_dbus_connection_flush_sync()
for the synchronous
version.
connection |
||
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the
request is satisfied or |
[allow-none] |
user_data |
The data to pass to |
Since 2.26
gboolean g_dbus_connection_flush_finish (GDBusConnection *connection
,GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_flush()
.
connection |
||
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed
to |
|
error |
return location for error or |
Since 2.26
gboolean g_dbus_connection_flush_sync (GDBusConnection *connection
,GCancellable *cancellable
,GError **error
);
Synchronously flushes connection
. The calling thread is blocked
until this is done. See g_dbus_connection_flush()
for the
asynchronous version of this method and more details about what it
does.
connection |
||
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
Since 2.26
gboolean
g_dbus_connection_get_exit_on_close (GDBusConnection *connection
);
Gets whether the process is terminated when connection
is
closed by the remote peer. See
“exit-on-close” for more details.
Since 2.26
void g_dbus_connection_set_exit_on_close (GDBusConnection *connection
,gboolean exit_on_close
);
Sets whether the process should be terminated when connection
is
closed by the remote peer. See “exit-on-close” for
more details.
Note that this function should be used with care. Most modern UNIX
desktops tie the notion of a user session the session bus, and expect
all of a users applications to quit when their bus connection goes away.
If you are setting exit_on_close
to FALSE
for the shared session
bus connection, you should make sure that your application exits
when the user session ends.
connection |
||
exit_on_close |
whether the process should be terminated
when |
Since 2.26
GIOStream *
g_dbus_connection_get_stream (GDBusConnection *connection
);
Gets the underlying stream used for IO.
While the GDBusConnection is active, it will interact with this stream from a worker thread, so it is not safe to interact with the stream directly.
Since 2.26
const gchar *
g_dbus_connection_get_guid (GDBusConnection *connection
);
The GUID of the peer performing the role of server when authenticating. See “guid” for more details.
Since 2.26
const gchar *
g_dbus_connection_get_unique_name (GDBusConnection *connection
);
Gets the unique name of connection
as assigned by the message
bus. This can also be used to figure out if connection
is a
message bus connection.
the unique name or NULL
if connection
is not a message
bus connection. Do not free this string, it is owned by
connection
.
Since 2.26
GDBusCapabilityFlags
g_dbus_connection_get_capabilities (GDBusConnection *connection
);
Gets the capabilities negotiated with the remote peer
Since 2.26
GCredentials *
g_dbus_connection_get_peer_credentials
(GDBusConnection *connection
);
Gets the credentials of the authenticated peer. This will always
return NULL
unless connection
acted as a server
(e.g. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER
was passed)
when set up and the client passed credentials as part of the
authentication process.
In a message bus setup, the message bus is always the server and
each application is a client. So this method will always return
NULL
for message bus clients.
a GCredentials or NULL
if not available.
Do not free this object, it is owned by connection
.
[transfer none]
Since 2.26
guint32
g_dbus_connection_get_last_serial (GDBusConnection *connection
);
Retrieves the last serial number assigned to a GDBusMessage on
the current thread. This includes messages sent via both low-level
API such as g_dbus_connection_send_message()
as well as
high-level API such as g_dbus_connection_emit_signal()
,
g_dbus_connection_call()
or g_dbus_proxy_call()
.
Since 2.34
void g_dbus_connection_call (GDBusConnection *connection
,const gchar *bus_name
,const gchar *object_path
,const gchar *interface_name
,const gchar *method_name
,GVariant *parameters
,const GVariantType *reply_type
,GDBusCallFlags flags
,gint timeout_msec
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the method_name
method on the
interface_name
D-Bus interface on the remote object at
object_path
owned by bus_name
.
If connection
is closed then the operation will fail with
G_IO_ERROR_CLOSED
. If cancellable
is canceled, the operation will
fail with G_IO_ERROR_CANCELLED
. If parameters
contains a value
not compatible with the D-Bus protocol, the operation fails with
G_IO_ERROR_INVALID_ARGUMENT
.
If reply_type
is non-NULL
then the reply will be checked for having this type and an
error will be raised if it does not match. Said another way, if you give a reply_type
then any non-NULL
return value will be of this type.
If the parameters
GVariant is floating, it is consumed. This allows
convenient 'inline' use of g_variant_new()
, e.g.:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
g_dbus_connection_call (connection, "org.freedesktop.StringThings", "/org/freedesktop/StringThings", "org.freedesktop.StringThings", "TwoStrings", g_variant_new ("(ss)", "Thing One", "Thing Two"), NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) two_strings_done, NULL); |
This is an asynchronous method. When the operation is finished,
callback
will be invoked in the
thread-default main context
of the thread you are calling this method from. You can then call
g_dbus_connection_call_finish()
to get the result of the operation.
See g_dbus_connection_call_sync()
for the synchronous version of this
function.
If callback
is NULL
then the D-Bus method call message will be sent with
the G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED
flag set.
connection |
||
bus_name |
a unique or well-known bus name or |
[allow-none] |
object_path |
path of remote object |
|
interface_name |
D-Bus interface to invoke method on |
|
method_name |
the name of the method to invoke |
|
parameters |
a GVariant tuple with parameters for the method
or |
[allow-none] |
reply_type |
the expected type of the reply, or |
[allow-none] |
flags |
flags from the GDBusCallFlags enumeration |
|
timeout_msec |
the timeout in milliseconds, -1 to use the default
timeout or |
|
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request
is satisfied or |
[allow-none] |
user_data |
the data to pass to |
Since 2.26
GVariant * g_dbus_connection_call_finish (GDBusConnection *connection
,GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_call()
.
connection |
||
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
return location for error or |
NULL
if error
is set. Otherwise a GVariant tuple with
return values. Free with g_variant_unref()
.
Since 2.26
GVariant * g_dbus_connection_call_sync (GDBusConnection *connection
,const gchar *bus_name
,const gchar *object_path
,const gchar *interface_name
,const gchar *method_name
,GVariant *parameters
,const GVariantType *reply_type
,GDBusCallFlags flags
,gint timeout_msec
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the method_name
method on the
interface_name
D-Bus interface on the remote object at
object_path
owned by bus_name
.
If connection
is closed then the operation will fail with
G_IO_ERROR_CLOSED
. If cancellable
is canceled, the
operation will fail with G_IO_ERROR_CANCELLED
. If parameters
contains a value not compatible with the D-Bus protocol, the operation
fails with G_IO_ERROR_INVALID_ARGUMENT
.
If reply_type
is non-NULL
then the reply will be checked for having
this type and an error will be raised if it does not match. Said
another way, if you give a reply_type
then any non-NULL
return
value will be of this type.
If the parameters
GVariant is floating, it is consumed.
This allows convenient 'inline' use of g_variant_new()
, e.g.:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
g_dbus_connection_call_sync (connection, "org.freedesktop.StringThings", "/org/freedesktop/StringThings", "org.freedesktop.StringThings", "TwoStrings", g_variant_new ("(ss)", "Thing One", "Thing Two"), NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); |
The calling thread is blocked until a reply is received. See
g_dbus_connection_call()
for the asynchronous version of
this method.
connection |
||
bus_name |
a unique or well-known bus name or |
[allow-none] |
object_path |
path of remote object |
|
interface_name |
D-Bus interface to invoke method on |
|
method_name |
the name of the method to invoke |
|
parameters |
a GVariant tuple with parameters for the method
or |
[allow-none] |
reply_type |
the expected type of the reply, or |
[allow-none] |
flags |
flags from the GDBusCallFlags enumeration |
|
timeout_msec |
the timeout in milliseconds, -1 to use the default
timeout or |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
NULL
if error
is set. Otherwise a GVariant tuple with
return values. Free with g_variant_unref()
.
Since 2.26
void g_dbus_connection_call_with_unix_fd_list (GDBusConnection *connection
,const gchar *bus_name
,const gchar *object_path
,const gchar *interface_name
,const gchar *method_name
,GVariant *parameters
,const GVariantType *reply_type
,GDBusCallFlags flags
,gint timeout_msec
,GUnixFDList *fd_list
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Like g_dbus_connection_call()
but also takes a GUnixFDList object.
This method is only available on UNIX.
connection |
||
bus_name |
a unique or well-known bus name or |
[allow-none] |
object_path |
path of remote object |
|
interface_name |
D-Bus interface to invoke method on |
|
method_name |
the name of the method to invoke |
|
parameters |
a GVariant tuple with parameters for the method
or |
[allow-none] |
reply_type |
the expected type of the reply, or |
[allow-none] |
flags |
flags from the GDBusCallFlags enumeration |
|
timeout_msec |
the timeout in milliseconds, -1 to use the default
timeout or |
|
fd_list |
a GUnixFDList or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request is
satisfied or |
[allow-none] |
user_data |
The data to pass to |
Since 2.30
GVariant * g_dbus_connection_call_with_unix_fd_list_finish (GDBusConnection *connection
,GUnixFDList **out_fd_list
,GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_call_with_unix_fd_list()
.
connection |
||
out_fd_list |
return location for a GUnixFDList or |
[out][allow-none] |
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed to
|
|
error |
return location for error or |
NULL
if error
is set. Otherwise a GVariant tuple with
return values. Free with g_variant_unref()
.
Since 2.30
GVariant * g_dbus_connection_call_with_unix_fd_list_sync (GDBusConnection *connection
,const gchar *bus_name
,const gchar *object_path
,const gchar *interface_name
,const gchar *method_name
,GVariant *parameters
,const GVariantType *reply_type
,GDBusCallFlags flags
,gint timeout_msec
,GUnixFDList *fd_list
,GUnixFDList **out_fd_list
,GCancellable *cancellable
,GError **error
);
Like g_dbus_connection_call_sync()
but also takes and returns GUnixFDList objects.
This method is only available on UNIX.
connection |
||
bus_name |
a unique or well-known bus name or |
[allow-none] |
object_path |
path of remote object |
|
interface_name |
D-Bus interface to invoke method on |
|
method_name |
the name of the method to invoke |
|
parameters |
a GVariant tuple with parameters for
the method or |
[allow-none] |
reply_type |
the expected type of the reply, or |
[allow-none] |
flags |
flags from the GDBusCallFlags enumeration |
|
timeout_msec |
the timeout in milliseconds, -1 to use the default
timeout or |
|
fd_list |
a GUnixFDList or |
[allow-none] |
out_fd_list |
return location for a GUnixFDList or |
[out][allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
NULL
if error
is set. Otherwise a GVariant tuple with
return values. Free with g_variant_unref()
.
Since 2.30
gboolean g_dbus_connection_emit_signal (GDBusConnection *connection
,const gchar *destination_bus_name
,const gchar *object_path
,const gchar *interface_name
,const gchar *signal_name
,GVariant *parameters
,GError **error
);
Emits a signal.
If the parameters GVariant is floating, it is consumed.
This can only fail if parameters
is not compatible with the D-Bus protocol.
connection |
||
destination_bus_name |
the unique bus name for the destination
for the signal or |
[allow-none] |
object_path |
path of remote object |
|
interface_name |
D-Bus interface to emit a signal on |
|
signal_name |
the name of the signal to emit |
|
parameters |
a GVariant tuple with parameters for the signal
or |
[allow-none] |
error |
Return location for error or |
Since 2.26
void (*GDBusSignalCallback) (GDBusConnection *connection
,const gchar *sender_name
,const gchar *object_path
,const gchar *interface_name
,const gchar *signal_name
,GVariant *parameters
,gpointer user_data
);
Signature for callback function used in g_dbus_connection_signal_subscribe()
.
connection |
||
sender_name |
The unique bus name of the sender of the signal. |
|
object_path |
The object path that the signal was emitted on. |
|
interface_name |
The name of the interface. |
|
signal_name |
The name of the signal. |
|
parameters |
A GVariant tuple with parameters for the signal. |
|
user_data |
User data passed when subscribing to the signal. |
Since 2.26
guint g_dbus_connection_signal_subscribe (GDBusConnection *connection
,const gchar *sender
,const gchar *interface_name
,const gchar *member
,const gchar *object_path
,const gchar *arg0
,GDBusSignalFlags flags
,GDBusSignalCallback callback
,gpointer user_data
,GDestroyNotify user_data_free_func
);
Subscribes to signals on connection
and invokes callback
with a whenever
the signal is received. Note that callback
will be invoked in the
thread-default main context
of the thread you are calling this method from.
If connection
is not a message bus connection, sender
must be
NULL
.
If sender
is a well-known name note that callback
is invoked with
the unique name for the owner of sender
, not the well-known name
as one would expect. This is because the message bus rewrites the
name. As such, to avoid certain race conditions, users should be
tracking the name owner of the well-known name and use that when
processing the received signal.
If one of G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE
or
G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH
are given, arg0
is
interpreted as part of a namespace or path. The first argument
of a signal is matched against that part as specified by D-Bus.
connection |
||
sender |
sender name to match on (unique or well-known name)
or |
[allow-none] |
interface_name |
D-Bus interface name to match on or |
[allow-none] |
member |
D-Bus signal name to match on or |
[allow-none] |
object_path |
object path to match on or |
[allow-none] |
arg0 |
contents of first string argument to match on or |
[allow-none] |
flags |
flags describing how to subscribe to the signal (currently unused) |
|
callback |
callback to invoke when there is a signal matching the requested data |
|
user_data |
user data to pass to |
|
user_data_free_func |
function to free |
[allow-none] |
Since 2.26
void g_dbus_connection_signal_unsubscribe (GDBusConnection *connection
,guint subscription_id
);
Unsubscribes from signals.
connection |
||
subscription_id |
a subscription id obtained from
|
Since 2.26
gboolean g_dbus_connection_send_message (GDBusConnection *connection
,GDBusMessage *message
,GDBusSendMessageFlags flags
,volatile guint32 *out_serial
,GError **error
);
Asynchronously sends message
to the peer represented by connection
.
Unless flags
contain the
G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
flag, the serial number
will be assigned by connection
and set on message
via
g_dbus_message_set_serial()
. If out_serial
is not NULL
, then the
serial number used will be written to this location prior to
submitting the message to the underlying transport.
If connection
is closed then the operation will fail with
G_IO_ERROR_CLOSED
. If message
is not well-formed,
the operation fails with G_IO_ERROR_INVALID_ARGUMENT
.
See this server and client for an example of how to use this low-level API to send and receive UNIX file descriptors.
Note that message
must be unlocked, unless flags
contain the
G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
flag.
Since 2.26
void g_dbus_connection_send_message_with_reply (GDBusConnection *connection
,GDBusMessage *message
,GDBusSendMessageFlags flags
,gint timeout_msec
,volatile guint32 *out_serial
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously sends message
to the peer represented by connection
.
Unless flags
contain the
G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
flag, the serial number
will be assigned by connection
and set on message
via
g_dbus_message_set_serial()
. If out_serial
is not NULL
, then the
serial number used will be written to this location prior to
submitting the message to the underlying transport.
If connection
is closed then the operation will fail with
G_IO_ERROR_CLOSED
. If cancellable
is canceled, the operation will
fail with G_IO_ERROR_CANCELLED
. If message
is not well-formed,
the operation fails with G_IO_ERROR_INVALID_ARGUMENT
.
This is an asynchronous method. When the operation is finished, callback
will be invoked in the
thread-default main context
of the thread you are calling this method from. You can then call
g_dbus_connection_send_message_with_reply_finish()
to get the result of the operation.
See g_dbus_connection_send_message_with_reply_sync()
for the synchronous version.
Note that message
must be unlocked, unless flags
contain the
G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
flag.
See this server and client for an example of how to use this low-level API to send and receive UNIX file descriptors.
connection |
||
message |
||
flags |
flags affecting how the message is sent |
|
timeout_msec |
the timeout in milliseconds, -1 to use the default
timeout or |
|
out_serial |
return location for serial number assigned
to |
[out][allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
callback |
a GAsyncReadyCallback to call when the request
is satisfied or |
[allow-none] |
user_data |
The data to pass to |
Since 2.26
GDBusMessage * g_dbus_connection_send_message_with_reply_finish (GDBusConnection *connection
,GAsyncResult *res
,GError **error
);
Finishes an operation started with g_dbus_connection_send_message_with_reply()
.
Note that error
is only set if a local in-process error
occurred. That is to say that the returned GDBusMessage object may
be of type G_DBUS_MESSAGE_TYPE_ERROR
. Use
g_dbus_message_to_gerror()
to transcode this to a GError.
See this server and client for an example of how to use this low-level API to send and receive UNIX file descriptors.
connection |
||
res |
a GAsyncResult obtained from the GAsyncReadyCallback passed to
|
|
error |
teturn location for error or |
Since 2.26
GDBusMessage * g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection
,GDBusMessage *message
,GDBusSendMessageFlags flags
,gint timeout_msec
,volatile guint32 *out_serial
,GCancellable *cancellable
,GError **error
);
Synchronously sends message
to the peer represented by connection
and blocks the calling thread until a reply is received or the
timeout is reached. See g_dbus_connection_send_message_with_reply()
for the asynchronous version of this method.
Unless flags
contain the
G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
flag, the serial number
will be assigned by connection
and set on message
via
g_dbus_message_set_serial()
. If out_serial
is not NULL
, then the
serial number used will be written to this location prior to
submitting the message to the underlying transport.
If connection
is closed then the operation will fail with
G_IO_ERROR_CLOSED
. If cancellable
is canceled, the operation will
fail with G_IO_ERROR_CANCELLED
. If message
is not well-formed,
the operation fails with G_IO_ERROR_INVALID_ARGUMENT
.
Note that error
is only set if a local in-process error
occurred. That is to say that the returned GDBusMessage object may
be of type G_DBUS_MESSAGE_TYPE_ERROR
. Use
g_dbus_message_to_gerror()
to transcode this to a GError.
See this server and client for an example of how to use this low-level API to send and receive UNIX file descriptors.
Note that message
must be unlocked, unless flags
contain the
G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
flag.
connection |
||
message |
||
flags |
flags affecting how the message is sent. |
|
timeout_msec |
the timeout in milliseconds, -1 to use the default
timeout or |
|
out_serial |
return location for serial number
assigned to |
[out][allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
return location for error or |
Since 2.26
GDBusMessage * (*GDBusMessageFilterFunction) (GDBusConnection *connection
,GDBusMessage *message
,gboolean incoming
,gpointer user_data
);
Signature for function used in g_dbus_connection_add_filter()
.
A filter function is passed a GDBusMessage and expected to return
a GDBusMessage too. Passive filter functions that don't modify the
message can simply return the message
object:
1 2 3 4 5 6 7 8 9 |
static GDBusMessage * passive_filter (GDBusConnection *connection GDBusMessage *message, gboolean incoming, gpointer user_data) { /<!-- -->* inspect @message *<!-- -->/ return message; } |
Filter functions that wants to drop a message can simply return NULL
:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
static GDBusMessage * drop_filter (GDBusConnection *connection GDBusMessage *message, gboolean incoming, gpointer user_data) { if (should_drop_message) { g_object_unref (message); message = NULL; } return message; } |
Finally, a filter function may modify a message by copying it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
static GDBusMessage * modifying_filter (GDBusConnection *connection GDBusMessage *message, gboolean incoming, gpointer user_data) { GDBusMessage *copy; GError *error; error = NULL; copy = g_dbus_message_copy (message, &error); /<!-- -->* handle @error being is set *<!-- -->/ g_object_unref (message); /<!-- -->* modify @copy *<!-- -->/ return copy; } |
If the returned GDBusMessage is different from message
and cannot
be sent on connection
(it could use features, such as file
descriptors, not compatible with connection
), then a warning is
logged to <emphasis>standard error</emphasis>. Applications can
check this ahead of time using g_dbus_message_to_blob()
passing a
GDBusCapabilityFlags value obtained from connection
.
connection |
[transfer none] | |
message |
A locked GDBusMessage that the filter function takes ownership of. |
[transfer full] |
incoming |
|
|
user_data |
User data passed when adding the filter. |
A GDBusMessage that will be freed with
g_object_unref()
or NULL
to drop the message. Passive filter
functions can simply return the passed message
object.
[transfer full][allow-none]
Since 2.26
guint g_dbus_connection_add_filter (GDBusConnection *connection
,GDBusMessageFilterFunction filter_function
,gpointer user_data
,GDestroyNotify user_data_free_func
);
Adds a message filter. Filters are handlers that are run on all incoming and outgoing messages, prior to standard dispatch. Filters are run in the order that they were added. The same handler can be added as a filter more than once, in which case it will be run more than once. Filters added during a filter callback won't be run on the message being processed. Filter functions are allowed to modify and even drop messages.
Note that filters are run in a dedicated message handling thread so
they can't block and, generally, can't do anything but signal a
worker thread. Also note that filters are rarely needed - use API
such as g_dbus_connection_send_message_with_reply()
,
g_dbus_connection_signal_subscribe()
or g_dbus_connection_call()
instead.
If a filter consumes an incoming message the message is not
dispatched anywhere else - not even the standard dispatch machinery
(that API such as g_dbus_connection_signal_subscribe()
and
g_dbus_connection_send_message_with_reply()
relies on) will see the
message. Similary, if a filter consumes an outgoing message, the
message will not be sent to the other peer.
connection |
||
filter_function |
a filter function |
|
user_data |
user data to pass to |
|
user_data_free_func |
function to free |
Since 2.26
void g_dbus_connection_remove_filter (GDBusConnection *connection
,guint filter_id
);
Removes a filter.
Since 2.26
void (*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection
,const gchar *sender
,const gchar *object_path
,const gchar *interface_name
,const gchar *method_name
,GVariant *parameters
,GDBusMethodInvocation *invocation
,gpointer user_data
);
The type of the method_call
function in GDBusInterfaceVTable.
connection |
||
sender |
The unique bus name of the remote caller. |
|
object_path |
The object path that the method was invoked on. |
|
interface_name |
The D-Bus interface name the method was invoked on. |
|
method_name |
The name of the method that was invoked. |
|
parameters |
A GVariant tuple with parameters. |
|
invocation |
A GDBusMethodInvocation object that can be used to return a value or error. |
|
user_data |
The |
Since 2.26
GVariant * (*GDBusInterfaceGetPropertyFunc) (GDBusConnection *connection
,const gchar *sender
,const gchar *object_path
,const gchar *interface_name
,const gchar *property_name
,GError **error
,gpointer user_data
);
The type of the get_property
function in GDBusInterfaceVTable.
connection |
||
sender |
The unique bus name of the remote caller. |
|
object_path |
The object path that the method was invoked on. |
|
interface_name |
The D-Bus interface name for the property. |
|
property_name |
The name of the property to get the value of. |
|
error |
Return location for error. |
|
user_data |
The |
A GVariant with the value for property_name
or NULL
if
error
is set. If the returned GVariant is floating, it is
consumed - otherwise its reference count is decreased by one.
Since 2.26
gboolean (*GDBusInterfaceSetPropertyFunc) (GDBusConnection *connection
,const gchar *sender
,const gchar *object_path
,const gchar *interface_name
,const gchar *property_name
,GVariant *value
,GError **error
,gpointer user_data
);
The type of the set_property
function in GDBusInterfaceVTable.
connection |
||
sender |
The unique bus name of the remote caller. |
|
object_path |
The object path that the method was invoked on. |
|
interface_name |
The D-Bus interface name for the property. |
|
property_name |
The name of the property to get the value of. |
|
value |
The value to set the property to. |
|
error |
Return location for error. |
|
user_data |
The |
Since 2.26
guint g_dbus_connection_register_object (GDBusConnection *connection
,const gchar *object_path
,GDBusInterfaceInfo *interface_info
,const GDBusInterfaceVTable *vtable
,gpointer user_data
,GDestroyNotify user_data_free_func
,GError **error
);
Registers callbacks for exported objects at object_path
with the
D-Bus interface that is described in interface_info
.
Calls to functions in vtable
(and user_data_free_func
) will happen
in the
thread-default main context
of the thread you are calling this method from.
Note that all GVariant values passed to functions in vtable
will match
the signature given in interface_info
- if a remote caller passes
incorrect values, the org.freedesktop.DBus.Error.InvalidArgs
is returned to the remote caller.
Additionally, if the remote caller attempts to invoke methods or
access properties not mentioned in interface_info
the
org.freedesktop.DBus.Error.UnknownMethod
resp.
org.freedesktop.DBus.Error.InvalidArgs
errors
are returned to the caller.
It is considered a programming error if the
GDBusInterfaceGetPropertyFunc function in vtable
returns a
GVariant of incorrect type.
If an existing callback is already registered at object_path
and
interface_name
, then error
is set to G_IO_ERROR_EXISTS.
GDBus automatically implements the standard D-Bus interfaces org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable and org.freedesktop.Peer, so you don't have to implement those for the objects you export. You can implement org.freedesktop.DBus.Properties yourself, e.g. to handle getting and setting of properties asynchronously.
Note that the reference count on interface_info
will be
incremented by 1 (unless allocated statically, e.g. if the
reference count is -1, see g_dbus_interface_info_ref()
) for as long
as the object is exported. Also note that vtable
will be copied.
See this server for an example of how to use this method.
connection |
||
object_path |
the object path to register at |
|
interface_info |
introspection data for the interface |
|
vtable |
a GDBusInterfaceVTable to call into or |
[allow-none] |
user_data |
data to pass to functions in |
[allow-none] |
user_data_free_func |
function to call when the object path is unregistered |
|
error |
return location for error or |
0 if error
is set, otherwise a registration id (never 0)
that can be used with g_dbus_connection_unregister_object()
Since 2.26
gboolean g_dbus_connection_unregister_object (GDBusConnection *connection
,guint registration_id
);
Unregisters an object.
connection |
||
registration_id |
a registration id obtained from
|
Since 2.26
gchar ** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection
,const gchar *sender
,const gchar *object_path
,gpointer user_data
);
The type of the enumerate
function in GDBusSubtreeVTable.
This function is called when generating introspection data and also
when preparing to dispatch incoming messages in the event that the
G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES
flag is not
specified (ie: to verify that the object path is valid).
Hierarchies are not supported; the items that you return should not contain the '/' character.
The return value will be freed with g_strfreev()
.
connection |
||
sender |
The unique bus name of the remote caller. |
|
object_path |
The object path that was registered with |
|
user_data |
The |
Since 2.26
GDBusInterfaceInfo ** (*GDBusSubtreeIntrospectFunc) (GDBusConnection *connection
,const gchar *sender
,const gchar *object_path
,const gchar *node
,gpointer user_data
);
The type of the introspect
function in GDBusSubtreeVTable.
Subtrees are flat. node
, if non-NULL
, is always exactly one
segment of the object path (ie: it never contains a slash).
This function should return NULL
to indicate that there is no object
at this node.
If this function returns non-NULL
, the return value is expected to
be a NULL
-terminated array of pointers to GDBusInterfaceInfo
structures describing the interfaces implemented by node
. This
array will have g_dbus_interface_info_unref()
called on each item
before being freed with g_free()
.
The difference between returning NULL
and an array containing zero
items is that the standard DBus interfaces will returned to the
remote introspector in the empty array case, but not in the NULL
case.
connection |
||
sender |
The unique bus name of the remote caller. |
|
object_path |
The object path that was registered with |
|
node |
A node that is a child of |
|
user_data |
The |
Since 2.26
const GDBusInterfaceVTable * (*GDBusSubtreeDispatchFunc) (GDBusConnection *connection
,const gchar *sender
,const gchar *object_path
,const gchar *interface_name
,const gchar *node
,gpointer *out_user_data
,gpointer user_data
);
The type of the dispatch
function in GDBusSubtreeVTable.
Subtrees are flat. node
, if non-NULL
, is always exactly one
segment of the object path (ie: it never contains a slash).
connection |
||
sender |
The unique bus name of the remote caller. |
|
object_path |
The object path that was registered with |
|
interface_name |
The D-Bus interface name that the method call or property access is for. |
|
node |
A node that is a child of |
|
out_user_data |
Return location for user data to pass to functions in the returned GDBusInterfaceVTable (never |
|
user_data |
The |
Since 2.26
guint g_dbus_connection_register_subtree (GDBusConnection *connection
,const gchar *object_path
,const GDBusSubtreeVTable *vtable
,GDBusSubtreeFlags flags
,gpointer user_data
,GDestroyNotify user_data_free_func
,GError **error
);
Registers a whole subtree of dynamic objects.
The enumerate
and introspection
functions in vtable
are used to
convey, to remote callers, what nodes exist in the subtree rooted
by object_path
.
When handling remote calls into any node in the subtree, first the
enumerate
function is used to check if the node exists. If the node exists
or the G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
the introspection
function is used to check if the node supports the
requested method. If so, the dispatch
function is used to determine
where to dispatch the call. The collected GDBusInterfaceVTable and
gpointer will be used to call into the interface vtable for processing
the request.
All calls into user-provided code will be invoked in the thread-default main context of the thread you are calling this method from.
If an existing subtree is already registered at object_path
or
then error
is set to G_IO_ERROR_EXISTS.
Note that it is valid to register regular objects (using
g_dbus_connection_register_object()
) in a subtree registered with
g_dbus_connection_register_subtree()
- if so, the subtree handler
is tried as the last resort. One way to think about a subtree
handler is to consider it a fallback handler for object paths not
registered via g_dbus_connection_register_object()
or other bindings.
Note that vtable
will be copied so you cannot change it after
registration.
See this server for an example of how to use this method.
connection |
||
object_path |
the object path to register the subtree at |
|
vtable |
a GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree |
|
flags |
flags used to fine tune the behavior of the subtree |
|
user_data |
data to pass to functions in |
|
user_data_free_func |
function to call when the subtree is unregistered |
|
error |
return location for error or |
0 if error
is set, otherwise a subtree registration id (never 0)
that can be used with g_dbus_connection_unregister_subtree()
.
Since 2.26
gboolean g_dbus_connection_unregister_subtree (GDBusConnection *connection
,guint registration_id
);
Unregisters a subtree.
connection |
||
registration_id |
a subtree registration id obtained from
|
Since 2.26
typedef struct _GDBusConnection GDBusConnection;
The GDBusConnection structure contains only private data and should only be accessed using the provided API.
Since 2.26
Flags used when creating a new GDBusConnection.
|
No flags set. |
||
|
Perform authentication against server. |
||
|
Perform authentication against client. |
||
|
When authenticating as a server, allow the anonymous authentication method. |
||
|
Pass this flag if connecting to a peer that is a
message bus. This means that the |
||
|
If set, processing of D-Bus messages is
delayed until |
Since 2.26
Flags used when subscribing to signals via g_dbus_connection_signal_subscribe()
.
|
No flags set. |
||
|
Don't actually send the AddMatch D-Bus call for this signal subscription. This gives you more control over which match rules you add (but you must add them manually). |
||
|
Match first arguments that contain a bus or interface name with the given namespace. |
||
|
Match first arguments that contain an object path that is either equivalent to the given path, or one of the paths is a subpath of the other. |
Since 2.26
Flags used when sending GDBusMessages on a GDBusConnection.
|
No flags set. |
||
|
Do not automatically assign a serial number from the GDBusConnection object when sending a message. |
Since 2.26
typedef struct { GDBusInterfaceMethodCallFunc method_call; GDBusInterfaceGetPropertyFunc get_property; GDBusInterfaceSetPropertyFunc set_property; } GDBusInterfaceVTable;
Virtual table for handling properties and method calls for a D-Bus interface.
Since 2.38, if you want to handle getting/setting D-Bus properties
asynchronously, give NULL
as your get_property()
or set_property()
function. The D-Bus call will be directed to your method_call
function,
with the provided interface_name
set to "org.freedesktop.DBus.Properties".
The usual checks on the validity of the calls is performed. For
Get
calls, an error is automatically returned if the property does
not exist or the permissions do not allow access. The same checks are
performed for Set
calls, and the provided value is also checked for
being the correct type.
For both Get
and Set
calls, the GDBusMethodInvocation
passed to the method_call
handler can be queried with
g_dbus_method_invocation_get_property_info()
to get a pointer
to the GDBusPropertyInfo of the property.
If you have readable properties specified in your interface info,
you must ensure that you either provide a non-NULL
function or provide implementations of both the get_property()
Get
and GetAll
methods on org.freedesktop.DBus.Properties interface in your method_call
function. Note that the required return type of the Get
call is
(v)
, not the type of the property. GetAll
expects a return value
of type a{sv}
.
If you have writable properties specified in your interface info,
you must ensure that you either provide a non-NULL
function or provide an implementation of the set_property()
Set
call. If implementing
the call, you must return the value of type G_VARIANT_TYPE_UNIT
.
GDBusInterfaceMethodCallFunc |
Function for handling incoming method calls. |
|
GDBusInterfaceGetPropertyFunc |
Function for getting a property. |
|
GDBusInterfaceSetPropertyFunc |
Function for setting a property. |
Since 2.26
typedef struct { GDBusSubtreeEnumerateFunc enumerate; GDBusSubtreeIntrospectFunc introspect; GDBusSubtreeDispatchFunc dispatch; } GDBusSubtreeVTable;
Virtual table for handling subtrees registered with g_dbus_connection_register_subtree()
.
GDBusSubtreeEnumerateFunc |
Function for enumerating child nodes. |
|
GDBusSubtreeIntrospectFunc |
Function for introspecting a child node. |
|
GDBusSubtreeDispatchFunc |
Function for dispatching a remote call on a child node. |
Since 2.26
“address”
property“address” gchar *
A D-Bus address specifying potential endpoints that can be used when establishing the connection.
Flags: Write / Construct Only
Default value: NULL
Since 2.26
“authentication-observer”
property“authentication-observer” GDBusAuthObserver *
A GDBusAuthObserver object to assist in the authentication process or NULL
.
Flags: Write / Construct Only
Since 2.26
“capabilities”
property“capabilities” GDBusCapabilityFlags
Flags from the GDBusCapabilityFlags enumeration representing connection features negotiated with the other peer.
Flags: Read
Since 2.26
“closed”
property“closed” gboolean
A boolean specifying whether the connection has been closed.
Flags: Read
Default value: FALSE
Since 2.26
“exit-on-close”
property“exit-on-close” gboolean
A boolean specifying whether the process will be terminated (by
calling raise(SIGTERM)
) if the connection is closed by the
remote peer.
Note that GDBusConnection objects returned by g_bus_get_finish()
and g_bus_get_sync()
will (usually) have this property set to TRUE
.
Flags: Read / Write
Default value: FALSE
Since 2.26
“flags”
property“flags” GDBusConnectionFlags
Flags from the GDBusConnectionFlags enumeration.
Flags: Write / Construct Only
Since 2.26
“guid”
property“guid” gchar *
The GUID of the peer performing the role of server when authenticating.
If you are constructing a GDBusConnection and pass
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER
in the
“flags” property then you MUST also set this
property to a valid guid.
If you are constructing a GDBusConnection and pass
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT
in the
“flags” property you will be able to read the GUID
of the other peer here after the connection has been successfully
initialized.
Flags: Read / Write / Construct Only
Default value: NULL
Since 2.26
“stream”
property“stream” GIOStream *
The underlying GIOStream used for I/O.
If this is passed on construction and is a GSocketConnection, then the corresponding GSocket will be put into non-blocking mode.
While the GDBusConnection is active, it will interact with this stream from a worker thread, so it is not safe to interact with the stream directly.
Flags: Read / Write / Construct Only
Since 2.26
“closed”
signalvoid user_function (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
Emitted when the connection is closed.
The cause of this event can be
If g_dbus_connection_close()
is called. In this case
remote_peer_vanished
is set to FALSE
and error
is NULL
.
If the remote peer closes the connection. In this case
remote_peer_vanished
is set to TRUE
and error
is set.
If the remote peer sends invalid or malformed data. In this
case remote_peer_vanished
is set to FALSE
and error
is set.
Upon receiving this signal, you should give up your reference to
connection
. You are guaranteed that this signal is emitted only
once.
connection |
the GDBusConnection emitting the signal |
|
remote_peer_vanished |
|
|
error |
[allow-none] | |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.26


Class rex_effect_filter_blur
- rex_effect_abstract
- rex_effect_filter_blur
Package: redaxo\media-manager
Located at redaxo/src/addons/media_manager/lib/effects/effect_filter_blur.php
Located at redaxo/src/addons/media_manager/lib/effects/effect_filter_blur.php
Methods summary
public
|
||
public
|
||
public
|
||
public
|
Methods inherited from rex_effect_abstract
keepTransparent()
,
setMedia()
,
setParams()
Properties summary
protected
mixed
|
$options
|
|
protected
mixed
|
$options_smoothit
|


---
layout: page
title: "About"
description: "A few words"
active: about
header-img: "img/about-bg.jpg"
---
A few words about this !PhotograpHi blog
The main blog purpose is to play with Jekyll blogging engine and see if it
delivers value for multimedia blog. All photos are real and valid with no any doubts.
Credits
Thanks to @sunbliss for kindly shared Jekyll theme.


To Select: Click select button and then click desired shape on the canvas. The shape's outline will become bolded. To move the selected shape, click a different point on the canvas. To deselect, click the select button again.
Polygons: To draw a polygon, click a polygon button. Clicking once on the canvas will begin a new line. Click again to draw the line and start a new one. Double click to stop drawing (closed polygon will close shape's path).


x
SchedMe
Whats going on?
Me + 3
Research meeting tonight
Me + Bethany
Dinner at PieSociety
Brian + 3
ACL Music Festival


A Victorious Union
by Oliver Optic
Chapter XXXI: “A Victorious Union”
Additional Information
- Year Published: 1893
- Language: English
- Country of Origin: United States of America
- Source: Optic, O. (1893). A Victorious Union. Boston, MA: Lee and Shepherd Publishers.
-
Readability:
- Flesch–Kincaid Level: 9.0
- Word Count: 3,390
- Genre: Adventure
- Keywords: 19th century literature, american literature, blue and the gray, civil war
- ✎ Cite This
Downloads
The fog was coming and going in the distance, and at times the land could be just discerned. In spite of the number and vigilance of the blockading fleet, several hundred blockade-runners had succeeded in making their way into Cape Fear River, though several hundred also had been captured, not to mention a very considerable number that had been run ashore or burned when escape became hopeless.
It was the policy of the Confederacy to send out vessels to prey upon the commerce of the United States. Some of them began their depredations without making a port in the South, and a few of the swift steamers that succeeded in getting into Mobile, Wilmington, and other safe places, were fitted out for the work of destruction. The fog that prevailed inshore was favorable to blockade-runners; and if there was a vessel of this character in Cape Fear River, the early morning had been such as to tempt her to try to make her way through the blockaders to sea.
“She is not one of the ordinary steamers that run in and out of the river,” said Mr. Baskirk, while he and the commander were still watching the progress of the chase, and Paul Vapoor was warming up the engine as he had done before.
“She is larger than the St. Regis, but hardly equal in size to the Bellevite,” added Christy. “She cannot draw more than twelve or fourteen feet of water, or she could not have come out through those shallow channels at the mouth of Cape Fear River. She seems to have the speed to run away from her pursuers; but probably not one of them can make fifteen knots an hour.”
The three pursuers of the blockade-runner had changed their course when the chase did so; but it was already evident that they had no chance to overhaul her. They were still three miles astern of her, while the St. Regis, at sunset, was not more than three. Not a shot had been fired by any one of the steamers, and it would have been a waste of ammunition to do so.
“We are gaining on her,” said Christy, half an hour later. “That steamer is making sixteen knots at least.”
“If she has found out that we can outsail her, very likely she will count upon the darkness to enable her to give us the slip,” suggested Mr. Baskirk.
“Mr. Vapoor has come to his bearings, and in another half hour we shall be within one mile of her. But I am afraid we shall not be able to settle this affair finally to-night,” replied Christy.
The darkness gathered around the two ships, and none of the steamers in the distance could any longer be seen. The officers could just make out the steamer ahead, which still kept on her course. The midship gun was now brought into use, and a round shot was sent on its mission to her; but with little chance of hitting her in the increasing gloom, for the sky was obscured with clouds, and all the signs indicated fog during the night, which would be exceedingly favorable to the chase. A flash was seen in the distance, and then came the roar of a heavy gun.
“She is not merely a blockade-runner; for it appears now that she is an armed vessel, and has some heavy metal on board,” said Christy.
“But no shot has come within hearing,” added Mr. Baskirk. “Perhaps she only wished to inform us that she could bite as well as bark.”
The St. Regis kept on her course for another hour. Christy was very anxious, for the chase was plainly a Confederate man-of-war, or a privateer; and if she escaped she might begin her work of destruction the very next day. At two bells in the first watch she could not be seen; but the commander kept on his course another half-hour, and then he ran into a fog.
The log indicated that the ship was making her best speed; and if the chase continued on her former course, she must have been within sight or hearing by this time. Christy peered through the gloom of the night and the fog, and listened for any sound. He kept up a tremendous thinking all the time, and acted as though he was in doubt.
“Make the course east, Mr. Baskirk,” said he, calling the executive officer.
“East, Captain Passford?” interrogated the lieutenant; and if he tried to conceal the astonishment he felt, his tones failed him.
“East, Mr. Baskirk,” repeated the commander.
The course was given to the quartermaster at the wheel; and the St. Regis came about gradually, and stood off in the direction indicated. Christy had a theory of his own, in regard to the probable movements of the chase, and he desired to be solely responsible for the result: therefore he kept his plan to himself.
“Call all hands, Mr. Baskirk, but without any noise at all,” continued the commander, while the ship was still driving ahead at the rate of twenty knots an hour.
The ship’s company silently took their stations, and no one on the deck spoke a loud word, though no order to this effect had been given. All the white cotton cloth that could be found on board was brought to the waist, where it was torn into strips about three inches wide, and two feet in length. These two pieces were distributed among the ship’s company, with the order to tie them around the left arm, above the elbow.
The fog was deep and dense; and the lookouts, who were stationed on the top-gallant forecastle and aloft, could not see a ship’s length ahead. Christy had gone forward, and made his way out on the bowsprit, in order to get as far as possible from the noise of the engine. He listened there for a full half-hour, and while the ship had made ten miles.
“Starboard a little, Mr. Baskirk,” he called to the executive officer, who had followed him forward.
“Starboard, sir,” repeated the officer, as he sent the order aft.
“Port! Port!” exclaimed the commander with more energy.
The orders were passed rapidly through the line of officers till they reached the quartermaster conning the wheel. The captain continued to listen for another quarter of an hour.
“Steady!” he shouted aloud, and left his position on the bowsprit to take another on the top-gallant forecastle. “We are close aboard of her, Mr. Baskirk! Have your grappling irons ready! Lay her aboard as we come alongside!”
By this time all hands forward could see the dark hull of the enemy. The St. Regis was rapidly running alongside of her, for the chase did not seem to be going at her former speed; and no doubt her commander was busy working out some manœuvre he had devised to escape from his pursuers. The boarders threw their grappling-irons, and fastened to the side of the enemy.
The drum was heard on board of her, beating to quarters; but it was too late, for the boarders were springing over her rail. Christy heard one bell on the gong of the other ship, and instantly made the same signal on his own. It was evidently a surprise to the enemy, but the ship’s company were promptly rallied. The enemy was overwhelmed in a few minutes, though not till several had fallen on both sides. The captain seemed to have been too busy with his manœuvre to escape to attend to present conditions.
While the commander of the St. Regis remained on the deck, or even on the top-gallant forecastle, the clang of his own engine prevented him from hearing any other sounds; and the enemy appeared not to have seen the ship till she emerged from the fog. The crew of the prize, as she was by this time, were all driven below, and the victory was complete.
“Do you surrender?” demanded Mr. Baskirk of the officer who appeared to be the captain.
“There appears to be no alternative,” replied the commander very gloomily: and he did not attempt to explain how his misfortune had come upon him. He had counted upon the fog to insure his salvation; but it appeared to have been the primary cause of his capture, though he certainly had not been as vigilant as a commander should be. Christy came on board, and Mr. Baskirk introduced him.
“I am glad to see you, Captain Passford,” said the commander as a matter of form. “I was absolutely sure that you would chase me to the westward, sir; and I had not the slightest expectation of encountering you on this course.”
“I took my chances of finding you in this direction rather than in the opposite one,” replied Christy. “It appears that I correctly interpreted your strategy, though I dared not even mention my plan to my executive officer.”
“I have fallen into my own trap, and being captured as I was, is disgraceful to me,” added Captain Winnlock, as his name proved to be; and the steamer was the Watauga.
Christy’s opinion of the capture did not differ from that of the commander of the prize, but he made no remark upon it. The Watauga was loaded with cotton, which was to be sent to England from Nassau, while the steamer was to go on a cruise in search of defenceless merchantmen of the United States.
“I have a passenger on board, Captain Passford, who bears the same name that you do, and possibly he may be one of your relatives, though he is by no means a Federalist,” said Captain Winnlock.
“Indeed! May I ask his name?” replied Christy very much surprised.
“Colonel Homer Passford, sir.”
“My uncle again!”
Mr. French, the master, had already been appointed prize-master; and while Mr. Baskirk was making the arrangements for her departure for New York, Christy accompanied the captain to the cabin. Colonel Passford had learned the fate of the Watauga; and he sat at a table, his face covered with both hands.
“I have brought down to see you, Colonel Passford, your nephew,” said the commander; and his uncle sprang to his feet, and gazed at his brother’s son as though he had been a spectre.
“Christy!” he exclaimed; but he could say no more, and groaned in his anguish.
“He is a lieutenant-commander now, and captain of the steamer St. Regis, formerly the Tallahatchie. The Watauga is now unfortunately the prize of his ship,” added Captain Winnlock, as he retired from the cabin.
“Captured again by my nephew,” groaned the unhappy colonel. “I believe you are the emissary of the Evil One, sent to torment me.”
“I am sent by the opposite Power, Uncle Homer,” replied Christy very gently. “But I am more astonished to see you here than you ought to be to see me, for I go wherever the fortunes of war carry me.”
“I was still trying to serve my country in her misfortunes. I raised another cargo of cotton among my friends, and it is now on board of this vessel. It has fallen into your hands, where most of my cotton has gone.”
The victorious commander inquired for his aunt and cousins in the South, and informed him that his mother and sister were very well. He added that he should be obliged to send him to New York in the prize, and insured him a brotherly welcome at Bonnydale. He parted with his uncle pitying him very much; but he had chosen for himself which side he would take in the great conflict.
The Watauga had a crew of sixty men, who were to be re-enforced at Nassau, and a large prize-crew had to be sent with her; but French returned with his force in three weeks, and the St. Regis was again fully manned. Christy received a letter from the flag-officer, who commended him very highly for the service he had rendered; and the St. Regis was continued on her present station through the remainder of the summer, and during the winter on the outer limit of the blockaders.
She made several captures, though all of them without any fighting, for no more Confederate men-of-war, actually or intended as such, came out of Wilmington, or attempted to enter the Cape Fear; but he sent a large number of blockade-runners, loaded with cotton coming out, or with supplies for the Confederate armies going in, to New York.
One day in August a large steamer was reported to the commander of the St. Regis as coming from the South. Christy was all ready for a battle if she proved to be a Confederate cruiser; but to his great joy she turned out to be the Bellevite. The ocean was as smooth as glass, and she came alongside the St. Regis. The young commander hastened on board of her, followed by his chief engineer.
Captain Breaker actually hugged him amid the repeated cheers and applause of the ship’s company, and Paul Vapoor was received with hardly less enthusiasm. Christy had to shake hands for the next half-hour.
“But how do you and the Bellevite happen to be in this latitude, Captain Breaker?” asked the young commander when he had an opportunity to speak.
“Haven’t you heard the news, Captain Passford?” demanded the captain of the Bellevite.
“What news? We don’t get the news so far off shore,” replied Christy.
“There was no farther use for my ship in the Gulf, and I am sent here to report to the flag-officer. Admiral Farragut turned his attention to Mobile Bay with his fleet; and I gave him the information you procured for me. The Bellevite took part in the battle, and it was the hottest action in which I was ever engaged. My ship was badly cut up in her upper works, but she came out all right.”
“This is glorious news, Captain Breaker!” exclaimed Christy, waving his hat, whereupon the tars in the waist broke out in a volley of cheers.
“The carpenters have been busy since the action, and the Bellevite is as good as new,” added her commander, as he proceeded to tell the story of the great battle, to which Christy and Paul listened with breathless interest. “Fort Morgan and Fort Gaines surrendered, and the bay is open to our ships.”
The narrative has gone into history, and it is not necessary to repeat it. The Bellevite reported to the flag officer; and as her great speed fitted her for duty like that in which the St. Regis was engaged, she was employed as a cruiser till the end of the war, though she and Christy’s ship took part in the bombardment and capture of Fort Fisher in January. The end was rapidly approaching. The Bellevite continued to cruise until the end of the war, announced to the world by the surrender of General Lee.
Among the steamers ordered up the James River were the Bellevite and the St. Regis, and the sailors of both were among those who put out the fire which threatened to consume the city of Richmond. Christy saw the President there, and was presented to him, which he will remember as long as he lives. In due time the St. Regis was ordered to the navy yard at New York. As early as possible he hastened to Bonnydale, where all the family and Bertha Pembroke were waiting for him. It was a sort of united embrace which welcomed him; and all the day and half the night were given to the narrative of the young commander’s adventures. They were all supremely happy.
Peace had come, and the whole North was ringing with the rejoicings of the people. Thousands upon thousands had laid down their lives in the army and the navy in their devotion to their country, and were laid in graves far from home and kindred, or committed to the silent depths of the ocean.
They had won Peace and A Victorious Union.
It was far otherwise in the South, though Peace spread her mantle over the whole united nation. Her people had fought valiantly, and made sacrifices which no one beyond their borders can understand or appreciate. If the devotion and self-sacrifice of the South, the bravery and determination with which her sons fought, and the heroism with which they suffered and died, were the only considerations, they deserved success. But thirty years of peace have made the South more prosperous than ever before, and her people enjoy the benefits of the Victorious Union.
Homer Passford, like thousands of others in the South, was a ruined man at the close of the war. He had lost his plantation, and he and his family had nowhere to lay their heads. But he was a true Southerner, and he did not regret or repent of what he had done for what he called his country. His brother chartered a steamer to bring the family to Bonnydale, but only for a friendly visit. The reunion was a happy one; and neither brother was disposed to talk politics, and those of the North did not indulge in a single “I told you so!” in the presence of their defeated relatives. They were the same as they had been before the war; and it is needless to say that Horatio generously helped out Homer financially; and now he is as wealthy and prosperous as ever before.
When it came to disposing of the vessels that were no longer needed for the navy, Christy bought the St. Regis, for in a moderate way compared with his father he was a rich man. On the day he was twenty-one years old, Bertha Pembroke became his wife; and Paul Vapoor became the husband of Florry Passford on the same occasion. Over a year had elapsed since the war, and the St. Regis had been entirely reconstructed in her interior, and furnished in the most elegant manner.
Her first mission was a voyage to Mobile to bring the family of Uncle Homer to the wedding. It was the grandest occasion that had ever been known in the region of Bonnydale. The young couple were to spend the summer on their bridal trip on board of the elegant steam-yacht, visiting various ports of Europe.
In the multitude who came to Bonnydale to assist at the marriage of the young hero was Monsieur Gilfleur, who was received with distinguished consideration by all the family, including the bride elect; and it can be safely asserted that he was one of the happiest of the guests who rejoiced in the felicity of the ex-lieutenant-commander, for he had resigned his commission at the close of the war. This was not the first time they had met since their memorable campaigns in Bermuda and Nassau; for the detective had spent a fortnight at Bonnydale with his young friend, during which they had told the stories of their experience in secret service. They are fast friends for life.
Captain Passford, senior, presented to his son an elegant house, built and magnificently furnished while Christy and his wife were voyaging in European waters. It is on the Bonnydale estate: and the grandfather of two boys and a girl does not have to go far to visit the family, for he is nearly eighty years old. Christy is somewhat grizzled with iron gray hair and whiskers; but he is still the same as when he was a young officer, and still as devoted as ever to the country he helped to make A Victorious Union.


Evaluated outcomes
Tips:
Nice! These learning outcomes are:
- measurable, and succint sentences
- focused skills and context are laid out clearly
Improve your learning outcomes by:
- starting with a measurable, active verb
- provide sufficient information with context and skills
Rate our service
How useful were our evaluations?
5 stars
4 stars
3 stars
2 stars
1 star
home
Return home


S&P notches high by a nose on low-key day for Wall Street
NEW YORK: The S&P 500 on Thursday (Nov 14) rose to its second straight record close on an otherwise subdued day for Wall Street marked by concerns about slowing global growth and stalled trade talks.
Markets got encouraging signals from Federal Reserve Chairman Jerome Powell, who in his second day of congressional testimony said he expected America's record economic expansion to continue.
Stocks finished little changed overall.
The Dow Jones Industrial Average finished a fraction lower at 27,781.96, while the broader S&P 500 added 2.59 points (0.08 per cent) at 3,096.63 - marking its sixth new high since the start of November.
Meanwhile, the Nasdaq was down 3.08 points (0.04 per cent) at 8,479.02.
China's Commerce Ministry on Thursday said the lifting of tariffs imposed by President Donald Trump was a "condition" to reaching the preliminary deal announced last month - suggesting a deal is not imminent.
Peter Cardillo of Spartan Capital Securities told AFP the markets needed positive news in the trade talks to continue gains.
"We need to see any new trade developments to resume the rally," he said.
Economic data released on Thursday showed further signs of strain in China's economy, with a sharp slowdown in consumer spending and factory production, while investment growth hit a record low as the trade war with the United States takes its toll.
Germany's economy narrowly avoided recession as it eked out 0.1 per cent quarter-on-quarter growth, beating forecasts of a 0.1 per cent contraction but confirming the trade-dependent nation's struggles.
Global retailer and Dow member Walmart finished in the red, shedding 0.3 per cent despite reporting better-than-expected quarterly earnings.
Walmart executives said they are watching the tariff discussions and hoping for a prompt resolution to the dispute.
Networking and telecoms firm Cisco, also a Dow member, plunged 7.3 per cent a day after cutting earnings guidance for its upcoming fiscal quarter.


|
Symmetric Polynomials
V3.1
A C++ library for generating symmetric polynomials with relations
|
The twisted Chern generators as variables \(\gamma_{s,j}\). More...
#include <Half_Idempotent.hpp>
Public Types | |
| typedef _deg | deg_t |
| Degree typedef. More... | |
Public Member Functions | |
| TwistedChernVariables | operator+ (const TwistedChernVariables &b) const |
| Multiplies monomials by adding their exponents. More... | |
| size_t | operator() () const |
| Hashes monomial. More... | |
The twisted Chern generators as variables \(\gamma_{s,j}\).
Monomial \(\prod_{s,j}\gamma_{s,j}^{a_{s_j}}\) is stored as: \([a_{0,1},...,a_{0,n},a_{1,0},a_{1,1},...,a_{n-1,1},a_{n,0}]\)
| T | The (integral) value type of the exponent vector. |
| _deg | The (integral) value type used in the degree function. |
| typedef _deg deg_t |
Degree typedef.
| TwistedChernVariables operator+ | ( | const TwistedChernVariables< T, _deg > & | b | ) | const |
Multiplies monomials by adding their exponents.
| b | The exponent \([b_{0,1},...,b_{n,0}]\) we add to *this = \([a_{0,1},...,a_{n,0}]\) |
| size_t operator() | ( | ) | const |
Hashes monomial.


The Software Company|<PHONE_NUMBER> | software.com
Invoice INV00015
client:
Mr. Wyle E. Coyote
| Stock Code | Item Description | price |
|---|---|---|
| BCR902I45 | Acme Company Roadrunner Catch'em Kit | $300 |
| Booster Skates | $200 |
|
| Emergency Parachute | $100 |
|
| BFT547J78 | Very Sneaky Trick Seed Kit | $800 |
| Giant Magnet and Lead Roadrunner Seeds | $500 |
|
| Rollerblades | $300 |
|


EU court cancels decision against UKIP ally over misspending
The European Court of Justice over-ruled a $190,000 fine issued to the Alliance for Direct Democracy in Europe group.
The European Union's top court has annulled a decision from the European Parliament that requested a political group linked to the British political party UKIP to reimburse tens of thousands of euros in EU funds for a lack of impartiality.
The Alliance for Direct Democracy in Europe had been asked to repay 172,655 euros (about $190,000) in 2016 after the European Parliament ruled the group had misspent EU funds on the party's domestic campaign in the United Kingdom, breaking the bloc's spending rules.
The ADDE brought the case to court, arguing that the Parliament's bureau, which took the decision, did not include a single representative of "eurosceptic" parties, and that a member of the body made hostile comments towards the party before the decision was made.
In its ruling Thursday, the European Court of Justice said that "appearances of impartiality were seriously compromised".


StormLib API Reference
SFileAddFileEx
bool WINAPI SFileAddFileEx( HANDLE hMpq, // Handle to the MPQ const char * szFileName, // The name of a file to be removed const char * szArchivedName, // The name under which the file will be stored DWORD dwFlags, // Specifies archive flags for the file DWORD dwCompression, // Compression for the first block of the file DWORD dwCompressionNext // Compression for rest of the file (except the first block) );
Function SFileAddFileEx adds a file to the MPQ archive. The MPQ must have been open by SFileOpenArchive or created by SFileCreateArchive. Note that this operation might cause MPQ fragmentation. To reduce size of the MPQ, use SFileCompactArchive.
| Value | Meaning |
|---|---|
| MPQ_FILE_IMPLODE (0x00000100) |
The file will be compressed using IMPLODE compression method. This flag cannot be used together with MPQ_FILE_COMPRESS. If this flag is present, then the dwCompression and dwCompressionNext parameters are ignored. This flag is obsolete and was used only in Diablo I. |
| MPQ_FILE_COMPRESS (0x00000200) |
The file will be compressed. This flag cannot be used together with MPQ_FILE_IMPLODE. |
| MPQ_FILE_ENCRYPTED (0x00010000) |
The file will be stored as encrypted. |
| MPQ_FILE_FIX_KEY (0x00020000) |
The file's encryption key will be adjusted according to file size in the archive. This flag must be used together with MPQ_FILE_ENCRYPTED. |
| MPQ_FILE_DELETE_MARKER (0x02000000) |
The file will have the deletion marker. |
| MPQ_FILE_SECTOR_CRC (0x04000000) |
The file will have CRC for each file sector. Ignored if the file is not compressed or if the file is stored as single unit. |
| MPQ_FILE_SINGLE_UNIT (0x01000000) |
The file will be added as single unit. Files stored as single unit cannot be encrypted, because Blizzard doesn't support them. |
| MPQ_FILE_REPLACEEXISTING (0x80000000) |
If this flag is specified and the file is already in the MPQ, it will be replaced. |
| Value | Meaning |
|---|---|
| MPQ_COMPRESSION_HUFFMANN (0x01) |
Use Huffman compression. This bit can only be combined with MPQ_COMPRESSION_ADPCM_MONO or MPQ_COMPRESSION_ADPCM_STEREO. |
| MPQ_COMPRESSION_ZLIB (0x02) |
Use ZLIB compression library. This bit cannot be combined with MPQ_COMPRESSION_BZIP2 or MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_PKWARE (0x08) |
Use Pkware Data Compression Library. This bit cannot be combined with MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_BZIP2 (0x10) |
Use BZIP2 compression library. This bit cannot be combined with MPQ_COMPRESSION_ZLIB or MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_SPARSE (0x20) |
Use SPARSE compression. This bit cannot be combined with MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_ADPCM_MONO (0x40) |
Use IMA ADPCM compression for 1-channel (mono) WAVE files. This bit can only be combined with MPQ_COMPRESSION_HUFFMANN. This is lossy compression and should only be used for compressing WAVE files. |
| MPQ_COMPRESSION_ADPCM_STEREO (0x80) |
Use IMA ADPCM compression for 2-channel (stereo) WAVE files. This bit can only be combined with MPQ_COMPRESSION_HUFFMANN. This is lossy compression and should only be used for compressing WAVE files. |
| MPQ_COMPRESSION_LZMA (0x12) |
Use LZMA compression. This value can not be combined with any other compression method. |
When the function succeeds, it returns nonzero. On an error, the function returns false and GetLastError gives the error code.
| Available in Storm.dll | No |
| Ordinal number in Storm.dll 1.00 | N/A |
| Ordinal number in Storm.dll 1.09 | N/A |
Copyright (c) Ladislav Zezula 2003 - 2010


GDG TCP socket connection example (Dart version)
Connect
Status:
Not connected
Send message
GET / HTTP/1.1 Host: www.google.pl
Send