The source-side-opposite of the arrow category Given a category $C$, is there a name for the following category:


*

*$\mathrm{Obj}(D) = \left\{ (x, y, f) \middle| x, y \in \mathrm{Obj}(C), f \in C(x, y) \right\}$

*$D((x, y, f), (x', y', f')) = \left\{ (g, h) \middle| g \in C(x', x), h \in C(y, y'), h \circ f \circ g = f' \right\}$


This is, if you want, the final category $D$ that has a covariant functor $P : D \to C$, a contravariant functor $Q : D \to C$ and a dinatural transformation $Q \to P$.
If this is a known construct, then I am also interested in higher-dimensional generalizations (i.e. if $C$ is an $n$-category, I would like an $n$-category $D$ with similar properties).
 A: As Zhen Lin suggests, what you are describing is called the "twisted arrow category" $C_\#$ in Mac Lane's Categories for the Working Mathematician (see exercise IX.6.3, p.227).  It goes by other names as well: for example "category of factorizations".  A quick way of defining $C_\#$ is as the category of elements of $hom_C : C^{op} \times C \to \mathrm{Set}$ (in particular, the pairing of the projection functors is a discrete fibration $C_\# \to C^{op} \times C$). You can find more discussion (including higher dimensional generalizations) at the nlab.
A: The term "twisted arrow category" was used by Dwyer and Kan in 1983, but this is maybe not the origin. However you see, the construction is strongly related to simplicial sets, aka $(\infty,1)$-categories. 
Often its homotopy type is considered. For example in a proof of Quillen's Theorem A (and B). Along these lines its referred as "subdivision category". This name should reveal a lot of material. I also vaguely remember a double application somewhere in this context..
As Noam pointed out, you can get this category by applying the (contravariant) Grothendieck-construction to the $Hom$-functor. This idea does generalize to higher categories, but I am not aware of any references. 
[Dwyer,Kan,'83 - Function complexes for diagrams of simplicial sets]
